delete external plugins

add submodules
Dieser Commit ist enthalten in:
o.pinke 2021-11-23 14:18:03 +01:00
Ursprung 797bc023fe
Commit 50d0eb41d9
125 geänderte Dateien mit 4 neuen und 18323 gelöschten Zeilen

3
.gitmodules vendored Normale Datei
Datei anzeigen

@ -0,0 +1,3 @@
[submodule "/var/www/html/conlite213/conlite/plugins/cl-mod-rewrite"]
path = /var/www/html/conlite213/conlite/plugins/cl-mod-rewrite
url = https://gitport.de/ConLite/cl-mod-rewrite.git

Datei anzeigen

@ -1 +0,0 @@
/.project

Datei anzeigen

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <https://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:
<program> Copyright (C) <year> <name of author>
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
<https://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
<https://www.gnu.org/licenses/why-not-lgpl.html>.

Datei anzeigen

@ -1,9 +0,0 @@
# cl-content-allocation
Content Allocation Plugin for ConLite
This plugin is f used to ad tags to your articles.
History
V 1.0.0
- initial recode to use with CL pluginmanager

Datei anzeigen

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<plugin>
<general active="1">
<plugin_name>ConLite Conten-Allocation</plugin_name>
<plugin_foldername>cl-content-allocation</plugin_foldername>
<uuid>D02CBEF1-45A5-5144-821F-015F6F81EEE0</uuid>
<description>ConLite Content Allocation</description>
<author>ConLite Team</author>
<copyright>ConLite Team</copyright>
<mail>cl-content-allocation@conlite.org</mail>
<website>https://conlite.org</website>
<version>1.0.0</version>
</general>
<requirements php="7.0">
<conlite minversion="2.1.0" />
</requirements>
<conlite>
<areas>
<area menuless="1">content_allocation</area>
<area parent="con" menuless="0">con_contentallocation</area>
</areas>
<actions>
<action area="con_contentallocation">storeallocation</action>
</actions>
<frames>
<frame area="content_allocation" filetype="main" name="cl-content-allocation/includes/include.left_top.php" frameId="1" />
<frame area="content_allocation" filetype="main" name="cl-content-allocation/includes/include.left_bottom.php" frameId="2" />
<frame area="content_allocation" filetype="main" name="cl-content-allocation/includes/include.right_bottom.php" frameId="4" />
<frame area="con_contentallocation" filetype="main" name="cl-content-allocation/includes/include.contentallocation_article.php" frameId="4" />
</frames>
<nav_sub>
<nav area="content_allocation" level="0" navm="extra">cl-content-allocation/xml/;navigation/extra/content_allocation/main</nav>
<nav area="con_contentallocation" level="1" navm="extra">cl-content-allocation/xml/;navigation/contenido/article/content_allocation</nav>
</nav_sub>
</conlite>
</plugin>

Datei anzeigen

@ -1,400 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Search articles by content allocation
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 0.7.8
* @author Marco Jahn
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created 2005
* modified 2005-10-27, Willi Man, debug option
* modified 2005-11-16, Willi Man, new method findMatchingContentByContentAllocationByCategories
* modified 2005-11-21, Willi Man, new method findMarchingCOntentByContentAllocation_OR_Categories
* modified 2008-04-06, Holger Librenz, direct mysql_* calls remoced, using DB_ConLite:: methods instead
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: class.content_allocation.php 131 2019-07-07 18:14:22Z oldperl $:
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
plugin_include('repository', 'custom/FrontendNavigation.php');
class pApiContentAllocation {
/**
* References database object
*
* @var DB_ConLite
*/
var $db = null;
var $table = null;
var $lang = null;
var $client = null;
var $treeObj = null;
/**
*
* @modified 27.10.2005 new class variable $this->bDebug (if true print debug information)
*/
public function __construct() {
global $db, $cfg, $lang, $client;
$this->db = new DB_ConLite;
$this->table = $cfg['tab'];
$this->lang = $lang;
$this->client = $client;
# use this option carefully and only temporary.
# the hidden debug output as html-comments can cause display problems.
$this->bDebug = false;
$this->treeObj = new pApiTree('f31a4384-e5c1-4ede-b1bb-f43657ec73a5');
}
function storeAllocations($idartlang, $allocations) {
// empty before insert
$this->deleteAllocationsByIdartlang($idartlang);
if (is_array($allocations)) {
foreach ($allocations as $value) {
$sql = "INSERT INTO " . $this->table['pica_alloc_con'] . " (idpica_alloc, idartlang) VALUES (" . Contenido_Security::toInteger($value) . ", " . Contenido_Security::toInteger($idartlang) . ")";
$this->db->query($sql);
}
}
}
function deleteAllocations($idpica_alloc) {
$sql = "DELETE FROM " . $this->table['pica_alloc_con'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc);
$this->db->query($sql);
}
function deleteAllocationsByIdartlang($idartlang) {
$sql = "DELETE FROM " . $this->table['pica_alloc_con'] . " WHERE idartlang = " . Contenido_Security::toInteger($idartlang);
$this->db->query($sql);
}
function loadAllocations($idartlang) {
//$sql = "SELECT idpica_alloc FROM " . $this->table['pica_alloc_con'] . " WHERE idartlang = " . Contenido_Security::toInteger($idartlang);
$this->db->query("-- pApiContentAllocation->loadAllocations()
SELECT
a.idpica_alloc
FROM
`{$this->table['pica_alloc']}` AS a
, `{$this->table['pica_alloc_con']}` AS b
WHERE
idartlang = $idartlang
AND a.idpica_alloc=b.idpica_alloc
;");
$items = array();
while ($this->db->next_record()) {
$items[] = $this->db->f('idpica_alloc');
}
return $items;
}
function loadAllocationsWithNames($idartlang, $parent, $firstonly = false) {
global $cfg;
$sql = "SELECT " . $cfg['tab']['pica_alloc'] . ".idpica_alloc FROM " . $cfg['tab']['pica_alloc'] . "
INNER JOIN " . $cfg['tab']['pica_alloc_con'] . " ON
" . $cfg['tab']['pica_alloc'] . ".idpica_alloc = " . $cfg['tab']['pica_alloc_con'] . ".idpica_alloc
WHERE (" . $cfg['tab']['pica_alloc'] . ".parentid = " . Contenido_Security::toInteger($parent) . ") AND (" . $cfg['tab']['pica_alloc_con'] . ".idartlang=" . Contenido_Security::toInteger($idartlang) . ")
ORDER BY " . $cfg['tab']['pica_alloc'] . ".sortorder";
$this->db->query($sql);
while ($this->db->next_record()) {
$tmp[$this->db->f("idpica_alloc")] = $this->treeObj->_fetchItemNameLang($this->db->f("idpica_alloc"));
if ($firstonly) {
break;
}
}
return $tmp;
}
/**
* Build query to find matching content by content allocation
* @param array $restrictions
* @return string SQL
* @modified 17.11.2005 by Willi Man
*/
function findMatchingContent($restrictions = null, $max = 0) {
if (!is_array($restrictions)) {
return false;
}
global $aCategoriesToExclude; # @see config.local.php!
$sql = $this->_buildQuery($restrictions, $aCategoriesToExclude, $max);
return $sql;
}
/**
* Build query to find matching content by content allocation
* @param array $restrictions
* @return string SQL
*/
function _buildQuery($restrictions, $aCategoriesToExclude, $max) {
global $cfg;
$size = sizeof($restrictions);
if ($size == 0) {
return '';
}
$sql_concat = unserialize('a:78:{i:0;s:2:"aa";i:1;s:2:"ab";i:2;s:2:"ac";i:3;s:2:"ad";i:4;s:2:"ae";i:5;s:2:"af";i:6;s:2:"ag";i:7;s:2:"ah";i:8;s:2:"ai";i:9;s:2:"aj";i:10;s:2:"ak";i:11;s:2:"al";i:12;s:2:"am";i:13;s:2:"an";i:14;s:2:"ao";i:15;s:2:"ap";i:16;s:2:"aq";i:17;s:2:"ar";i:18;s:2:"as";i:19;s:2:"at";i:20;s:2:"au";i:21;s:2:"av";i:22;s:2:"aw";i:23;s:2:"ax";i:24;s:2:"ay";i:25;s:2:"az";i:26;s:2:"ca";i:27;s:2:"cb";i:28;s:2:"cc";i:29;s:2:"cd";i:30;s:2:"ce";i:31;s:2:"cf";i:32;s:2:"cg";i:33;s:2:"ch";i:34;s:2:"ci";i:35;s:2:"cj";i:36;s:2:"ck";i:37;s:2:"cl";i:38;s:2:"cm";i:39;s:2:"cn";i:40;s:2:"co";i:41;s:2:"cp";i:42;s:2:"cq";i:43;s:2:"cr";i:44;s:2:"cs";i:45;s:2:"ct";i:46;s:2:"cu";i:47;s:2:"cv";i:48;s:2:"cw";i:49;s:2:"cx";i:50;s:2:"cy";i:51;s:2:"cz";i:52;s:1:"a";i:53;s:1:"b";i:54;s:1:"c";i:55;s:1:"d";i:56;s:1:"e";i:57;s:1:"f";i:58;s:1:"g";i:59;s:1:"h";i:60;s:1:"i";i:61;s:1:"j";i:62;s:1:"k";i:63;s:1:"l";i:64;s:1:"m";i:65;s:1:"n";i:66;s:1:"o";i:67;s:1:"p";i:68;s:1:"q";i:69;s:1:"r";i:70;s:1:"s";i:71;s:1:"t";i:72;s:1:"u";i:73;s:1:"v";i:74;s:1:"w";i:75;s:1:"x";i:76;s:1:"y";i:77;s:1:"z";}');
$sqlTemplate = "SELECT cal.idart, cal.online, aa.idartlang, cat.idcat FROM {TABLES} WHERE {WHERE} ";
$tables = array();
$where = array();
for ($i = 0; $i < $size; $i++) {
if ($i == 0) { // first
$tables[] = " " . $cfg['tab']['pica_alloc_con'] . " AS " . $sql_concat[$i];
} else {
$tables[] = " LEFT JOIN " . $cfg['tab']['pica_alloc_con'] . " AS " . $sql_concat[$i] . " USING (idartlang)";
}
if (is_int((int) $restrictions[$i]) AND $restrictions[$i] > 0) {
$where[] = $sql_concat[$i] . ".idpica_alloc = " . $restrictions[$i];
}
}
# fetch only articles which are online
$where[] = 'cal.online = 1';
# fetch only articles which are not in following categories
if (count($aCategoriesToExclude) > 0) {
$where[] = "cat.idcat NOT IN (" . implode(',', $aCategoriesToExclude) . ")";
}
// join art_lang for idart
$tables[] = " LEFT JOIN " . $this->table['art_lang'] . " AS cal USING (idartlang)";
$tables[] = " LEFT JOIN " . $this->table['cat_art'] . " AS cart USING (idart)";
$tables[] = " LEFT JOIN " . $this->table['cat'] . " as cat USING (idcat)";
$tables = implode('', $tables);
$where = implode(' AND ', $where);
$sql = str_replace('{TABLES}', $tables, $sqlTemplate);
$sql = str_replace('{WHERE}', $where, $sql);
$sql .= " ORDER BY cal.published DESC";
if ($max != 0 && is_integer($max)) {
$sql .= " LIMIT " . $max;
}
if ($this->bDebug) {
print "<!-- ";
print $sql;
print " -->";
} # @modified 27.10.2005
return $sql;
}
/**
* Search articles by content allocation and catgories
* @param array $aContentAllocation
* @param array $aCategories
*
* @return array of articles
*/
function findMatchingContentByContentAllocationByCategories($aContentAllocation, $aCategories = array(), $iOffset = 0, $iNumOfRows = 0) {
if (!is_array($aContentAllocation)) {
return array();
}
for ($i = 0; $i < count($aContentAllocation); $i++) {
if (!is_int((int) $aContentAllocation[$i]) OR ! $aContentAllocation[$i] > 0) {
return array();
}
}
for ($i = 0; $i < count($aCategories); $i++) {
if (!is_int((int) $aCategories[$i]) OR ! $aCategories[$i] > 0) {
return array();
}
}
$sql = $this->_buildQuery_MatchingContentByContentAllocationByCategories($aContentAllocation, $aCategories, $iOffset, $iNumOfRows);
$this->db->query($sql);
$aResult = array();
while ($oRow = $this->db->getResultObject()) {
$aResult[] = $oRow;
}
return $aResult;
}
/**
* build SQL query to find articles by content allocation and catgories
*
*/
function _buildQuery_MatchingContentByContentAllocationByCategories($aContentAllocation, $aCategories, $iOffset, $iNumOfRows) {
global $cfg;
$size = sizeof($aContentAllocation);
$sql_concat = unserialize('a:78:{i:0;s:2:"aa";i:1;s:2:"ab";i:2;s:2:"ac";i:3;s:2:"ad";i:4;s:2:"ae";i:5;s:2:"af";i:6;s:2:"ag";i:7;s:2:"ah";i:8;s:2:"ai";i:9;s:2:"aj";i:10;s:2:"ak";i:11;s:2:"al";i:12;s:2:"am";i:13;s:2:"an";i:14;s:2:"ao";i:15;s:2:"ap";i:16;s:2:"aq";i:17;s:2:"ar";i:18;s:2:"as";i:19;s:2:"at";i:20;s:2:"au";i:21;s:2:"av";i:22;s:2:"aw";i:23;s:2:"ax";i:24;s:2:"ay";i:25;s:2:"az";i:26;s:2:"ca";i:27;s:2:"cb";i:28;s:2:"cc";i:29;s:2:"cd";i:30;s:2:"ce";i:31;s:2:"cf";i:32;s:2:"cg";i:33;s:2:"ch";i:34;s:2:"ci";i:35;s:2:"cj";i:36;s:2:"ck";i:37;s:2:"cl";i:38;s:2:"cm";i:39;s:2:"cn";i:40;s:2:"co";i:41;s:2:"cp";i:42;s:2:"cq";i:43;s:2:"cr";i:44;s:2:"cs";i:45;s:2:"ct";i:46;s:2:"cu";i:47;s:2:"cv";i:48;s:2:"cw";i:49;s:2:"cx";i:50;s:2:"cy";i:51;s:2:"cz";i:52;s:1:"a";i:53;s:1:"b";i:54;s:1:"c";i:55;s:1:"d";i:56;s:1:"e";i:57;s:1:"f";i:58;s:1:"g";i:59;s:1:"h";i:60;s:1:"i";i:61;s:1:"j";i:62;s:1:"k";i:63;s:1:"l";i:64;s:1:"m";i:65;s:1:"n";i:66;s:1:"o";i:67;s:1:"p";i:68;s:1:"q";i:69;s:1:"r";i:70;s:1:"s";i:71;s:1:"t";i:72;s:1:"u";i:73;s:1:"v";i:74;s:1:"w";i:75;s:1:"x";i:76;s:1:"y";i:77;s:1:"z";}');
$sqlTemplate = "SELECT cal.idart, cal.online, aa.idartlang, cat.idcat, aa.idpica_alloc FROM {TABLES} WHERE {WHERE} ";
$tables = array();
$where = array();
for ($i = 0; $i < $size; $i++) {
if ($i == 0) { // first
$tables[] = " " . $cfg['tab']['pica_alloc_con'] . " AS " . $sql_concat[$i];
} else {
$tables[] = " LEFT JOIN " . $cfg['tab']['pica_alloc_con'] . " AS " . $sql_concat[$i] . " USING (idartlang)";
}
if (is_int((int) $aContentAllocation[$i]) AND $aContentAllocation[$i] > 0) {
$where[] = $sql_concat[$i] . ".idpica_alloc = " . $aContentAllocation[$i];
}
}
# fetch only articles which are online
$where[] = 'cal.online = 1';
# fetch only articles in following categories
if (count($aCategories) > 0) {
$where[] = "cat.idcat IN (" . implode(',', $aCategories) . ")";
}
// join art_lang for idart
$tables[] = " LEFT JOIN " . $this->table['art_lang'] . " AS cal USING (idartlang)";
$tables[] = " LEFT JOIN " . $this->table['cat_art'] . " AS cart USING (idart)";
$tables[] = " LEFT JOIN " . $this->table['cat'] . " as cat USING (idcat)";
$tables = implode('', $tables);
$where = implode(' AND ', $where);
$sql = str_replace('{TABLES}', $tables, $sqlTemplate);
$sql = str_replace('{WHERE}', $where, $sql);
$sql .= " ORDER BY cal.published DESC";
if (is_integer($iNumOfRows) AND $iNumOfRows > 0) {
$sql .= " LIMIT " . $iOffset . ", " . $iNumOfRows;
}
if ($this->bDebug) {
print "<!-- ";
print $sql;
print " -->";
} # @modified 27.10.2005
return $sql;
}
/**
* Search articles by catgories without start articles
* @param array $aCategories
* @param int $iOffset
* @param int $iNumOfRows
* @param string $sResultType element of {article_id, object}
*
* @return array of articles
*/
function findMatchingContentByCategories($aCategories = array(), $iOffset = 0, $iNumOfRows = 0, $sResultType = '') {
for ($i = 0; $i < count($aCategories); $i++) {
if (!is_int((int) $aCategories[$i]) OR ! $aCategories[$i] > 0) {
return array();
}
}
$sql = $this->_buildQuery_MatchingContentByCategories($aCategories, $iOffset, $iNumOfRows);
$this->db->query($sql);
$aResult = array();
while ($oRow = $this->db->getResultObject()) {
if ($sResultType == 'article_language_id') {
$aResult[] = $oRow->idartlang;
} else {
$aResult[] = $oRow;
}
}
return $aResult;
}
/**
* build SQL query to find articles by catgories
*
*/
function _buildQuery_MatchingContentByCategories($aCategories, $iOffset, $iNumOfRows) {
if (count($aCategories) > 0) {
$sWHERE_Category_IN = " c.idcat IN (" . implode(',', $aCategories) . ") AND ";
} else {
$sWHERE_Category_IN = '';
}
if (is_integer($iNumOfRows) AND $iNumOfRows > 0) {
$sLimit = " LIMIT " . Contenido_Security::toInteger($iOffset) . ", " . Contenido_Security::toInteger($iNumOfRows);
} else {
$sLimit = '';
}
$sql = '
SELECT
a.idart, a.online, a.idartlang, c.idcat
FROM
' . $this->table['art_lang'] . ' AS a,
' . $this->table['art'] . ' AS b,
' . $this->table['cat_art'] . ' AS c,
' . $this->table['cat_lang'] . ' AS d
WHERE
' . $sWHERE_Category_IN . '
b.idclient = ' . Contenido_Security::toInteger($this->client) . ' AND
a.idlang = ' . Contenido_Security::toInteger($this->lang) . ' AND
a.idartlang != d.startidartlang AND
a.online = 1 AND
c.idcat = d.idcat AND
b.idart = c.idart AND
a.idart = b.idart
' . $sLimit . ' ';
if ($this->bDebug) {
print "<!-- ";
print $sql;
print " -->";
}
return $sql;
}
}
?>

Datei anzeigen

@ -1,117 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Content Allocation article
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 0.2.1
* @author Marco Jahn
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: class.content_allocation_article.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class pApiContentAllocationArticle extends pApiTree {
var $tpl = null;
var $template = '';
var $load = array();
public function __construct($uuid) {
global $cfg;
parent::pApiTree($uuid);
$this->tpl = new Template;
$this->template = $cfg['pica']['treetemplate_article'];
}
function _buildRenderTree($tree) {
global $action, $frame, $area, $sess, $idart;
$result = array();
foreach ($tree as $item_tmp) {
$item = array();
$expandCollapseImg = 'images/spacer.gif';
$expandCollapse = '<img src="' . $expandCollapseImg . '" border="0" style="vertical-align: middle;" width="11" height="11">';
$item['ITEMNAME'] = $expandCollapse . ' ' . $item_tmp['name'];
$item['ITEMINDENT'] = $item_tmp['level'] * 15 + 3;
// set checked!
$checked = '';
if (in_array($item_tmp['idpica_alloc'], $this->load)) {
$checked = ' checked="checked"';
}
$item['CHECKBOX'] = '<input type="checkbox" name="allocation[]" value="' . $item_tmp['idpica_alloc'] . '" ' . $checked . ' />';
array_push($result, $item);
if ($item_tmp['children']) {
$children = $this->_buildRenderTree($item_tmp['children']);
$result = array_merge($result, $children);
}
}
return $result;
}
function setChecked($load) {
$this->load = $load;
}
function renderTree($return = true) {
$this->tpl->reset();
$tree = $this->fetchTree();
if ($tree === false) {
return false;
}
$tree = $this->_buildRenderTree($tree);
$even = true;
foreach ($tree as $item) {
$even = !$even;
$bgcolor = ($even) ? '#FFFFFF' : '#F1F1F1';
$this->tpl->set('d', 'BACKGROUND_COLOR', $bgcolor);
foreach ($item as $key => $value) {
$this->tpl->set('d', $key, $value);
}
$this->tpl->next();
}
$this->tpl->set('s', "CATEGORY", i18n("Category", "cl-content-allocation"));
if ($return === true) {
return $this->tpl->generate($this->template, true);
} else {
$this->tpl->generate($this->template);
}
}
}
?>

Datei anzeigen

@ -1,114 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Content Allocation
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 0.2.1
* @author Marco Jahn
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: class.content_allocation_complexlist.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class pApiContentAllocationComplexList extends pApiTree {
var $idSetter = true;
var $load = array();
public function __construct($uuid) {
global $cfg;
parent::__construct($uuid);
}
public function _buildRenderTree($tree) {
global $action, $frame, $area, $sess, $idart;
$oldIdSetter = $this->idSetter;
$this->idSetter = false;
$result = '';
$even = true;
$levelElms = sizeof($tree);
$cnt = 1;
foreach ($tree as $item_tmp) {
$item = '';
$checked = '';
if (in_array($item_tmp['idpica_alloc'], $this->load)) {
$checked = ' checked="checked"';
}
$li_closeElm = '';
if ($cnt == $levelElms) {
$li_closeElm = 'style="border-bottom: 0;"';
}
$cnt++;
$even = !$even;
$bgcolor = ($even) ? 'bright' : 'dark';
// for wrapping purposes
$item_tmp['name'] = str_replace('-', '- ', $item_tmp['name']);
$checkbox = '<input type="checkbox" name="allocation[]" onClick="addToList(this);" ' . $checked . '" id="e' . $item_tmp['idpica_alloc'] . '" value="' . $item_tmp['idpica_alloc'] . '" />';
$item = "\n<li style=\"border-bottom: 1px solid #B3B3B3\" baseClass=\"" . $bgcolor . "\" " . $li_closeElm . ">" . $checkbox . " " . $item_tmp['name'];
$result .= $item;
if ($item_tmp['children']) {
$children = $this->_buildRenderTree($item_tmp['children']);
$result .= "\n<ul>" . $children . "</li>";
} else {
$result .= "\n</li>";
}
}
if ($oldIdSetter === true) {
return "\n<ul id=\"finder\">" . $result . "\n</ul>";
} else {
return $result . "\n</ul>";
}
}
public function setChecked($load) {
$this->load = $load;
}
public function renderTree($return = true) {
$tree = $this->fetchTree();
if ($tree === false) {
return false;
}
$tree = $this->_buildRenderTree($tree);
if ($return === true) {
return $tree;
}
}
}
?>

Datei anzeigen

@ -1,87 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* @package Contenido Backend plugins
* @version 0.2.1
* @author Marco Jahn
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* $Id: class.content_allocation_selectbox.php 128 2019-07-03 11:58:28Z oldperl $:
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
class pApiContentAllocationSelectBox extends pApiTree {
var $idSetter = true;
var $load = array();
public function __construct($uuid) {
global $cfg;
parent::__construct($uuid);
}
public function _buildRenderTree($tree) {
global $action, $frame, $area, $sess, $idart;
$oldIdSetter = $this->idSetter;
$this->idSetter = false;
$result = '';
$levelElms = sizeof($tree);
$cnt = 1;
foreach ($tree as $item_tmp) {
$item = '';
$spacer = '|-';
$spacer = str_pad($spacer, (($item_tmp['level'] + 1) * 2), "--", STR_PAD_RIGHT);
$result .= '<option value="' . $item_tmp['idpica_alloc'] . '_' . $item_tmp['level'] . '">' . $spacer . $item_tmp['name'] . '</option>';
if ($item_tmp['children']) {
$children = $this->_buildRenderTree($item_tmp['children']);
$result .= $children;
}
}
return $result;
}
public function setChecked($load) {
return false;
}
/**
*
* @modified 27.10.2005 $bUseTreeStatus = false (content allocation tree in selectbox is always expanded)
*/
public function renderTree($return = true, $parentId = false, $bUseTreeStatus = false) {
$tree = $this->fetchTree($parentId, 0, $bUseTreeStatus);
if ($tree === false) {
return false;
}
$tree = $this->_buildRenderTree($tree);
if ($return === true) {
return $tree;
} else {
echo $tree;
}
}
}
?>

Datei anzeigen

@ -1,558 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Stores and handles content allocation management
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 0.10.1
* @author Marco Jahn
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: class.content_allocation_tree.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Todo
* addslashes to all string db inserts
* check if default language exists if new entry is added (otherwise)
*/
class pApiTree {
/**
*
*/
var $db = null;
/**
*
*/
var $table = null;
/**
*
*/
var $lang = 1;
/**
*
*/
var $client = 1;
/**
*
*/
var $defaultLang = 1;
/**
*
*/
var $logger = null;
/**
*
*/
var $user = null;
/**
*
*/
var $treeStatus = array();
/**
*
*/
var $uuid = null;
/**
*
*/
var $_arrInFilters = array('urlencode', 'clHtmlSpecialChars', 'addslashes');
/**
*
*/
var $_arrOutFilters = array('stripslashes', 'htmldecode', 'urldecode');
public function __construct($uuid) {
global $db, $cfg, $lang, $client, $auth;
$this->db = new DB_ConLite;
$this->table = $cfg['tab'];
$this->lang = $lang;
$this->client = $client;
$this->bDebug = false;
$this->uuid = $uuid;
$this->user = new cApiUser($auth->auth["uid"]);
$this->loadTreeStatus();
}
/**
*
* @param mixed $parentId
* @param int $level
* @param boolean $bUseTreeStatus (if true use expand/collapsed status of the tree, otherwise not)
* @modified 27.10.2005 Willi Man
*/
function fetchTree($parentId = false, $level = 0, $bUseTreeStatus = true) {
// fetch current lang category
$sql = "SELECT
tree.idpica_alloc, tree.parentid, tree.sortorder
FROM
" . $this->table['pica_alloc'] . " as tree";
if ($parentId === false) { // fetch from root node
$sql .= " WHERE tree.parentid = '0'";
} else { // fetch by given id
$sql .= " WHERE tree.parentid = " . Contenido_Security::toInteger($parentId);
}
$sql .= " ORDER BY sortorder ASC";
$this->db->query($sql);
$result_tmp = array(); // tmp result array
while ($this->db->next_record()) { // walk resultset
$item = $this->_fetchItemNameLang($this->db->f('idpica_alloc'));
$itemStatus = 'expanded';
if ($bUseTreeStatus) { # modified 27.10.2005
if (is_array($this->treeStatus) && array_key_exists($this->db->f('idpica_alloc'), $this->treeStatus)) {
$itemStatus = 'collapsed';
}
}
$rs = array(
'idpica_alloc' => $this->db->f('idpica_alloc'),
'parentid' => ($this->db->f('parentid') == NULL) ? false : $this->db->f('parentid'),
'sortorder' => $this->db->f('sortorder'),
'name' => $this->_outFilter($item['name']),
'idlang' => $item['idlang'],
'level' => $level,
'status' => $itemStatus,
'online' => $item['online']
);
array_push($result_tmp, $rs); // append recordset
}
if (count($result_tmp) > 0) {
$result = array(); // result array
foreach ($result_tmp as $rs) { // run results
$children = $this->fetchTree($rs['idpica_alloc'], $level + 1, $bUseTreeStatus);
if ($children !== false && $rs['status'] == 'expanded') {
$rs['children'] = $children;
}
array_push($result, $rs);
}
return $result;
} else {
return false;
}
}
/**
* Fetch content allocation tree
* Consider offline/online status
*
* @created 21.11.2005 Willi Man
*
* @param mixed $parentId
* @param int $level
* @return array with content allocation id's
*/
function fetchTreeIds($parentId = false, $level = 0, $showOffline = false) {
// fetch current lang category
$sql = "SELECT
tree.idpica_alloc, tree.parentid, tree.sortorder
FROM
" . $this->table['pica_alloc'] . " as tree";
if ($parentId === false) { // fetch from root node
$sql .= " WHERE tree.parentid IS NULL";
} else { // fetch by given id
$sql .= " WHERE tree.parentid = " . Contenido_Security::toInteger($parentId);
}
$sql .= " ORDER BY sortorder ASC";
if ($this->bDebug) {
print "<!-- ";
print $sql;
print " -->";
}
$this->db->query($sql);
$result_tmp = array(); // tmp result array
while ($this->db->next_record()) { // walk resultset
$item = $this->_fetchItemNameLang($this->db->f('idpica_alloc'));
if ($this->bDebug) {
print "<!-- ";
print_r($item);
print " -->";
}
if ($showOffline OR $item['online'] == 1) {
$rs = array(
'idpica_alloc' => $this->db->f('idpica_alloc')
);
array_push($result_tmp, $rs); // append recordset
}
}
if (count($result_tmp) > 0) {
$result = array(); // result array
foreach ($result_tmp as $rs) { // run results
$children = $this->fetchTreeIds($rs['idpica_alloc'], $level + 1, $bUseTreeStatus);
if ($children !== false) {
$rs['children'] = $children;
}
array_push($result, $rs);
}
return $result;
} else {
return false;
}
}
function setTreeStatus($idpica_alloc) {
if (is_array($this->treeStatus) && array_key_exists($idpica_alloc, $this->treeStatus)) { // expand
unset($this->treeStatus[$idpica_alloc]);
} else { // collapse
$this->treeStatus[$idpica_alloc] = true;
}
$this->user->setProperty("expandstate", $this->_uuid, serialize($this->treeStatus));
}
function loadTreeStatus() {
$status = $this->user->getProperty("expandstate", $this->_uuid);
if ($status !== false) {
$this->treeStatus = unserialize($status);
}
}
function fetchParent($idpica_alloc) {
$sql = "SELECT idpica_alloc FROM " . $this->table['pica_alloc'] . " WHERE parentId = " . Contenido_Security::toInteger($idpica_alloc);
$this->db->query($sql);
if ($this->db->next_record()) {
return $this->fetchItem($this->db->f('idpica_alloc'));
} else {
return false;
}
}
function fetchParents() {
}
function fetchLevel($parentId = false, $showOffline = false) {
// fetch current lang category
$sql = "SELECT
tree.idpica_alloc, tree.parentid, tree.sortorder
FROM
" . $this->table['pica_alloc'] . " as tree
LEFT JOIN " . $this->table['pica_lang'] . " as treelang USING (idpica_alloc)";
if ($parentId === false) { // fetch from root node
$sql .= " WHERE tree.parentid IS NULL";
} else { // fetch by given id
$sql .= " WHERE tree.parentid = " . Contenido_Security::toInteger($parentId);
}
if ($showOffline === false) {
$sql .= " AND treelang.online = 1";
}
$sql .= " ORDER BY sortorder ASC";
$this->db->query($sql);
$result_tmp = array(); // tmp result array
while ($this->db->next_record()) { // walk resultset
$item = $this->_fetchItemNameLang($this->db->f('idpica_alloc'));
$itemStatus = 'expanded';
if (is_array($this->treeStatus) && array_key_exists($this->db->f('idpica_alloc'), $this->treeStatus)) {
$itemStatus = 'collapsed';
}
$rs = array(
'idpica_alloc' => $this->db->f('idpica_alloc'),
'parentid' => ($this->db->f('parentid') == NULL) ? false : $this->db->f('parentid'),
'sortorder' => $this->db->f('sortorder'),
'name' => $this->_outFilter($item['name']),
'idlang' => $item['idlang'],
'level' => 0,
'status' => $itemStatus,
'online' => $item['online']
);
array_push($result_tmp, $rs); // append recordset
}
return $result_tmp;
}
function storeItem($treeItem) {
if (!$treeItem['idpica_alloc']) { // insert
$treeItem['idpica_alloc'] = $this->db->nextid($this->table['pica_alloc']);
$treeItem['sortorder'] = $this->_fetchMaxOrder($treeItem['parentid']) + 1;
if ($treeItem['parentid'] == 'root') {
$treeItem['parentid'] = 'NULL';
}
$treeItem['name'] = $this->_inFilter($treeItem['name']);
$sql = "INSERT INTO " . $this->table['pica_alloc'] . "
(idpica_alloc, parentid, sortorder)
VALUES
(" . Contenido_Security::toInteger($treeItem['idpica_alloc']) . ", " . Contenido_Security::toInteger($treeItem['parentid']) . ", " . Contenido_Security::toInteger($treeItem['sortorder']) . ")";
$this->db->query($sql);
$sql = "INSERT INTO " . $this->table['pica_lang'] . "
(idpica_alloc, idlang, name)
VALUES
(" . Contenido_Security::toInteger($treeItem['idpica_alloc']) . ", " . Contenido_Security::toInteger($this->lang) . ", '" . Contenido_Security::escapeDB($treeItem['name'], $this->db) . "')";
$this->db->query($sql);
} else { // update
$treeItem['name'] = $this->_inFilter($treeItem['name']);
$sql = "SELECT * FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($treeItem['idpica_alloc']) . " AND idlang = " . Contenido_Security::toInteger($this->lang);
$this->db->query($sql);
if ($this->db->num_rows() > 0) {
#Update existing translation
$sql = "UPDATE " . $this->table['pica_lang'] . " SET name = '" . Contenido_Security::escapeDB($treeItem['name'], $this->db) . "' WHERE idpica_alloc = " . Contenido_Security::toInteger($treeItem['idpica_alloc']) . "
AND idlang = " . Contenido_Security::toInteger($this->lang);
} else {
#Get current online status for item
$sql = "SELECT * FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . $treeItem['idpica_alloc'] . " ORDER BY idlang";
$this->db->query($sql);
if ($this->db->next_record()) {
$online_status = $this->db->f('online');
} else {
$online_status = 0;
}
#Insert new translation
$sql = "INSERT INTO " . $this->table['pica_lang'] . "(idpica_alloc, idlang, name, online) VALUES ( " . Contenido_Security::toInteger($treeItem['idpica_alloc']) . ", " . Contenido_Security::toInteger($this->lang) . ",
'" . Contenido_Security::escapeDB($treeItem['name'], $this->db) . "', " . Contenido_Security::toInteger($online_status) . ")";
}
$this->db->query($sql);
}
return $treeItem;
}
function setOnline($idpica_alloc) {
$this->_switchOnOffline($idpica_alloc, 1);
}
function setOffline($idpica_alloc) {
$this->_switchOnOffline($idpica_alloc, 0);
}
function _switchOnOffline($idpica_alloc, $status) {
$sql = "UPDATE " . $this->table['pica_lang'] . " SET online = " . Contenido_Security::toInteger($status) . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc) . "
AND idlang = " . Contenido_Security::toInteger($this->lang);
$this->db->query($sql);
}
function itemMoveUp($idpica_alloc) {
$treeItem = $this->fetchItem($idpica_alloc);
$treeItem_old = $treeItem;
$treeItem['sortorder'] --;
if ($treeItem['sortorder'] < $treeItem_old['sortorder']) {
if ($treeItem['sortorder'] >= 1) {
$this->_decreaseOrder($treeItem['parentid'], $treeItem_old['sortorder']);
$this->_increaseOrder($treeItem['parentid'], $treeItem['sortorder']);
} else {
$treeItem['sortorder'] = $treeItem_old['sortorder'];
}
}
$sql = "UPDATE " . $this->table['pica_alloc'] . " SET sortorder = " . $treeItem['sortorder'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc);
$this->db->query($sql);
}
function itemMoveDown() {
}
function deleteItem($idpica_alloc) {
$sql = "DELETE FROM " . $this->table['pica_alloc'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc);
$this->db->query($sql);
$sql = "DELETE FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc);
$this->db->query($sql);
$sql = "DELETE FROM " . $this->table['pica_alloc_con'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc);
$this->db->query($sql);
}
function fetchItem($idpica_alloc) {
$sql = "SELECT parentid, sortorder FROM " . $this->table['pica_alloc'] . " WHERE idpica_alloc = " . $idpica_alloc;
$this->db->query($sql);
$item = $this->_fetchItemNameLang($idpica_alloc);
if ($this->db->next_record()) {
$row = array(
'idpica_alloc' => $idpica_alloc,
'parentid' => ($this->db->f('parentid') == NULL) ? false : $this->db->f('parentid'),
'sortorder' => $this->db->f('sortorder'),
'name' => $item['name'],
'idlang' => $item['idlang'],
'online' => $item['online']
);
return $row;
} else {
return false;
}
}
function _fetchItemNameLang($idpica_alloc) {
$oDB = new DB_ConLite; // temp instance
$sSQL = "SELECT name, idlang, online FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc) . " AND idlang = " . Contenido_Security::toInteger($this->lang);
$oDB->query($sSQL);
$aResult = array();
if ($oDB->next_record()) { // item found for this language
$aResult['name'] = $this->_outFilter($oDB->f('name'));
$aResult['idlang'] = $oDB->f('idlang');
$aResult['online'] = $oDB->f('online');
} else { // no item in this language found
// fetch alternative language name
// HerrB, 2008-04-21: Get all translations, try to use defaultLang translation, use
// first available, otherwise. Only using defaultLang results in "ghost" elements, if
// created in a non-default language. See CON-110 for details.
$sSQL = "SELECT name, idlang, online FROM " . $this->table['pica_lang'] . " WHERE idpica_alloc = " . Contenido_Security::toInteger($idpica_alloc) . " ORDER BY idlang";
$oDB->query($sSQL);
$aNames = array();
while ($oDB->next_record()) {
$sKey = "k" . $oDB->f('idlang');
$aNames[$sKey] = array();
$aNames[$sKey]['name'] = $this->_outFilter($oDB->f('name'));
$aNames[$sKey]['idlang'] = $oDB->f('idlang');
$aNames[$sKey]['online'] = $oDB->f('online');
}
if ($aNames["k" . $this->defaultLang]) {
// defaultLang translation available
$aResult = $aNames["k" . $this->defaultLang];
} else {
// no defaultLang translation available, use first in line (reset returns first element)
$aResult = reset($aNames);
}
}
unset($oDB);
unset($aNames);
return $aResult;
}
function _fetchMaxOrder($parentId = false) {
if ($parentId == 'root') {
$parentId = false;
}
$sql = "SELECT MAX(sortorder) as max FROM " . $this->table['pica_alloc'];
if ($parentId === false) {
$sql .= " WHERE parentid = 0";
} else {
$sql .= " WHERE parentid = " . Contenido_Security::toInteger($parentId);
}
$this->db->query($sql);
if ($this->db->next_record()) {
return $this->db->f('max');
} else {
return 0;
}
}
function _decreaseOrder($parentId = false, $fromOrder) {
$sql = "UPDATE " . $this->table['pica_alloc'] . " SET sortorder = sortorder - 1 WHERE sortorder >= " . Contenido_Security::toInteger($fromOrder);
if ($parentId === false) {
$sql .= " AND parentid IS NULL";
} else {
$sql .= " AND parentid = " . Contenido_Security::toInteger($parentId);
}
$this->db->query($sql);
}
function _increaseOrder($parentId = false, $fromOrder) {
$sql = "UPDATE " . $this->table['pica_alloc'] . " SET sortorder = sortorder + 1 WHERE sortorder >= " . Contenido_Security::toInteger($fromOrder);
if ($parentId === false) {
$sql .= " AND parentid IS NULL";
} else {
$sql .= " AND parentid = " . Contenido_Security::toInteger($parentId);
}
$this->db->query($sql);
}
function setFilters($arrInFilters = array(), $arrOutFilters = array()) {
$this->_arrInFilters = $arrInFilters;
$this->_arrOutFilters = $arrOutFilters;
}
function _inFilter($data) {
foreach ($this->_arrInFilters as $_function) {
if (function_exists($_function)) {
$data = $_function($data);
}
}
return $data;
}
function _outFilter($data) {
foreach ($this->_arrOutFilters as $_function) {
if (function_exists($_function)) {
$data = $_function($data);
}
}
return $data;
}
}
?>

Datei anzeigen

@ -1,234 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Stores and handles content allocation management
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 0.2.3
* @author Marco Jahn
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-06-26, Timo Trautmann, changed post var from treeItem to treeItemPost (security issue)
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: class.content_allocation_treeview.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Todo
* - generalize this and papitree !!!!
* - Comments!
*/
class pApiContentAllocationTreeView extends pApiTree {
/**
*
*/
var $tpl = null;
/**
*
*/
var $template = '';
/**
*
*/
public function __construct($uuid) {
global $cfg;
parent::__construct($uuid);
$this->tpl = new Template;
$this->template = $cfg['pica']['treetemplate'];
}
/**
*
*/
function _buildRenderTree($tree) {
global $action, $frame, $area, $sess;
$result = array();
foreach ($tree as $item_tmp) {
$item = array();
// update item
if ($_GET['step'] == 'rename' && $item_tmp['idpica_alloc'] == $_GET['idpica_alloc']) {
$item = array();
$item['ITEMNAME'] = '
<table cellspacing="0" cellpaddin="0" border="0">
<form name="rename" action="main.php" method="POST" onsubmit="return fieldCheck();">
<input type="hidden" name="action" value="' . $action . '" />
<input type="hidden" name="frame" value="' . $frame . '" />
<input type="hidden" name="contenido" value="' . $sess->id . '" />
<input type="hidden" name="area" value="' . $area . '" />
<input type="hidden" name="step" value="storeRename" />
<input type="hidden" name="treeItemPost[idpica_alloc]" value="' . $item_tmp['idpica_alloc'] . '" />
<tr>
<td class="text_medium"><input id="itemname" class="text_medium" type="text" name="treeItemPost[name]" value="' . $item_tmp['name'] . '"></td>
<td>&nbsp;
<a href="main.php?action=' . $action . '&frame=' . $frame . '&area=' . $area . '&contenido=' . $sess->id . '"><img src="images/but_cancel.gif" border="0" /></a>
<input type="image" src="images/but_ok.gif" />
</td></tr>
</form>
</table>
<script language="JavaScript">
controller = document.getElementById("itemname");
controller.focus();
function fieldCheck() {
if (controller.value == "") {
alert("' . i18n("Please enter a category name", "cl-content-allocation") . '");
controller.focus();
return false;
}
return true;
}
</script>';
} else {
if ($item_tmp['children'] || $item_tmp['status'] == 'collapsed') {
$expandCollapseImg = 'images/close_all.gif';
if ($item_tmp['status'] == 'collapsed') {
$expandCollapseImg = 'images/open_all.gif';
}
$expandCollapse = '<a href="main.php?contenido=' . $sess->id . '&idart=' . $idart . '&action=' . $action . '&frame=' . $frame . '&area=' . $area . '&step=collapse&idpica_alloc=' . $item_tmp['idpica_alloc'] . '"><img src="' . $expandCollapseImg . '" border="0" style="vertical-align: middle; padding:4px;" width="7" height="7"></a>';
} else {
$expandCollapseImg = 'images/spacer.gif';
$expandCollapse = '<img src="' . $expandCollapseImg . '" border="0" style="vertical-align: middle;" width="11" height="11">';
}
$item['ITEMNAME'] = $expandCollapse . ' ' . $item_tmp['name'];
}
$item['ITEMINDENT'] = $item_tmp['level'] * 15 + 3;
$item['ACTION_CREATE'] = '<a href="main.php?contenido=' . $sess->id . '&action=' . $action . '&frame=' . $frame . '&area=' . $area . '&step=add&parentid=' . $item_tmp['idpica_alloc'] . '"><img src="images/folder_new.gif" border="0" title="' . i18n("New category", "cl-content-allocation") . '" alt="' . i18n("New category", "cl-content-allocation") . '" /></a>';
$item['ACTION_RENAME'] = '<a href="main.php?contenido=' . $sess->id . '&action=' . $action . '&frame=' . $frame . '&area=' . $area . '&step=rename&idpica_alloc=' . $item_tmp['idpica_alloc'] . '"><img src="images/but_todo.gif" width="16" height="16" border="0" alt="' . i18n("Rename category", "cl-content-allocation") . '" title="' . i18n("Rename category", "cl-content-allocation") . '" /></a>';
$item['ACTION_MOVE_UP'] = (count($result) >= 1) ? '<a href="main.php?contenido=' . $sess->id . '&action=' . $action . '&frame=' . $frame . '&area=' . $area . '&step=moveup&idpica_alloc=' . $item_tmp['idpica_alloc'] . '"><img src="images/folder_moveup.gif" border="0" alt="' . i18n("Move category up", "cl-content-allocation") . '" title="' . i18n("Move category up", "cl-content-allocation") . '" /></a>' : '<img src="images/spacer.gif" width="16" height="16" /></a>';
$item['ACTION_MOVE_DOWN'] = (count($result) >= 1) ? '<img src="images/folder_movedown.gif" border="0" alt="' . i18n("Move category down", "cl-content-allocation") . '" title="' . i18n("Move category down", "cl-content-allocation") . '" />' : '<img src="images/spacer.gif" width="16" height="16" />';
$item['ACTION_MOVE_DOWN'] = '';
if ($item_tmp['online'] == 1) { // set offline
$item['ACTION_ONOFFLINE'] = '<a href="main.php?contenido=' . $sess->id . '&action=' . $action . '&frame=' . $frame . '&area=' . $area . '&step=offline&idpica_alloc=' . $item_tmp['idpica_alloc'] . '""><img src="images/online.gif" alt="' . i18n("Set category offline", "cl-content-allocation") . '" title="' . i18n("Set category offline", "cl-content-allocation") . '"></a>';
} else {
$item['ACTION_ONOFFLINE'] = '<a href="main.php?contenido=' . $sess->id . '&action=' . $action . '&frame=' . $frame . '&area=' . $area . '&step=online&idpica_alloc=' . $item_tmp['idpica_alloc'] . '""><img src="images/offline.gif" alt="' . i18n("Set category online", "cl-content-allocation") . '" title="' . i18n("Set category online", "cl-content-allocation") . '"></a>';
}
if ($item_tmp['children']) {
$item['ACTION_DELETE'] = '<img src="images/delete_inact.gif" border="0" alt="' . i18n("One or more subcategories exist, unable to delete", "cl-content-allocation") . '" title="' . i18n("One or more subcategories exist, unable to delete", "cl-content-allocation") . '">';
} else {
$item['ACTION_DELETE'] = '<a href="javascript://" onclick="box.confirm(&quot;' . i18n("Delete category", "cl-content-allocation") . '&quot;, &quot;' . i18n("Are you sure to delete the following category", "cl-content-allocation") . ':<br><br><b>' . str_replace("'", "\'", $item_tmp['name']) . '</b>&quot;,&quot;deleteCategory(' . $item_tmp['idpica_alloc'] . ')&quot;);"><img src="images/delete.gif" border="0" alt="' . i18n("Delete category", "cl-content-allocation") . '" title="' . i18n("Delete category", "cl-content-allocation") . '"></a>';
}
array_push($result, $item);
if ($item_tmp['children']) {
$children = $this->_buildRenderTree($item_tmp['children']);
$result = array_merge($result, $children);
}
// add new item -> show formular
if ($_GET['step'] == 'add' && $item_tmp['idpica_alloc'] == $_GET['parentid']) {
$item = array();
$item['ITEMNAME'] = '
<table cellspacing="0" cellpaddin="0" border="0">
<form name="create" action="main.php" method="POST" onsubmit="return fieldCheck();">
<input type="hidden" name="action" value="' . $action . '" />
<input type="hidden" name="frame" value="' . $frame . '" />
<input type="hidden" name="contenido" value="' . $sess->id . '" />
<input type="hidden" name="area" value="' . $area . '" />
<input type="hidden" name="step" value="store" />
<input type="hidden" name="treeItemPost[parentid]" value="' . $_GET['parentid'] . '" />
<tr>
<td class="text_medium"><input id="itemname" class="text_medium" type="text" name="treeItemPost[name]" value=""></td>
<td>&nbsp;
<a href="main.php?action=' . $action . '&frame=' . $frame . '&area=' . $area . '&contenido=' . $sess->id . '"><img src="images/but_cancel.gif" border="0" /></a>
<input type="image" src="images/but_ok.gif" />
</td></tr>
</form>
</table>
<script language="JavaScript">
controller = document.getElementById("itemname");
controller.focus();
function fieldCheck() {
if (controller.value == "") {
alert("' . i18n("Please enter a category name", "cl-content-allocation") . '");
controller.focus();
return false;
}
return true;
}
</script>';
$item['ITEMINDENT'] = ($item_tmp['level'] + 1) * 15;
$item['ACTION_CREATE'] = '<img src="images/spacer.gif" width="15" height="13" />';
$item['ACTION_RENAME'] = '<img src="images/spacer.gif" width="23" height="14" />';
$item['ACTION_MOVE_UP'] = '<img src="images/spacer.gif" width="15" height="13" />';
$item['ACTION_MOVE_DOWN'] = '<img src="images/spacer.gif" width="15" height="13" />';
$item['ACTION_MOVE_DOWN'] = '';
$item['ACTION_DELETE'] = '<img src="images/spacer.gif" width="14" height="13" />';
$item['ACTION_ONOFFLINE'] = '<img src="images/spacer.gif" width="11" height="12" />';
array_push($result, $item);
}
}
return $result;
}
/**
*
*/
function renderTree($return = true) {
$this->tpl->reset();
$tree = $this->fetchTree(false, 0, true); # modified 27.10.2005
if ($tree === false) {
return false;
}
$tree = $this->_buildRenderTree($tree);
$even = true;
foreach ($tree as $item) {
$even = !$even;
$bgcolor = ($even) ? '#FFFFFF' : '#F1F1F1';
$this->tpl->set('d', 'BACKGROUND_COLOR', $bgcolor);
foreach ($item as $key => $value) {
$this->tpl->set('d', $key, $value);
}
$this->tpl->next();
}
$this->tpl->set('s', 'CATEGORY', i18n("Category", "cl-content-allocation"));
$this->tpl->set('s', 'ACTIONS', i18n("Actions", "cl-content-allocation"));
if ($return === true) {
return $this->tpl->generate($this->template, true);
} else {
$this->tpl->generate($this->template);
}
}
}
?>

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 56 B

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 90 B

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 112 B

Datei anzeigen

@ -1,30 +0,0 @@
<?php
/**
* File:
* config.autoloader.php
*
* @package Plugins
* @subpackage Newsletter
* @version $Rev: 128 $
* @since 2.0
* @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright 2015 CL-Team
* @link http://www.conlite.org
*
* $Id: config.autoloader.php 128 2019-07-03 11:58:28Z oldperl $
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
$sAutoloadClassPath = 'conlite/plugins/cl-content-allocation/classes/';
return array(
'pApiContentAllocation' => $sAutoloadClassPath.'class.content_allocation.php',
'pApiContentAllocationArticle' => $sAutoloadClassPath.'class.content_allocation_article.php',
'pApiContentAllocationComplexList' => $sAutoloadClassPath.'class.content_allocation_complexlist.php',
'pApiContentAllocationSelectBox' => $sAutoloadClassPath.'class.content_allocation_selectbox.php',
'pApiTree' => $sAutoloadClassPath.'class.content_allocation_tree.php',
'pApiContentAllocationTreeView' => $sAutoloadClassPath.'class.content_allocation_treeview.php'
);
?>

Datei anzeigen

@ -1,57 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Config file for Content Allocation plugin
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 1.0.1
* @author unknown
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: config.plugin.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
// plugin_variables
$cfg['tab']['pica_alloc'] = $cfg['sql']['sqlprefix'].'_pica_alloc';
$cfg['tab']['pica_alloc_con'] = $cfg['sql']['sqlprefix'].'_pica_alloc_con';
$cfg['tab']['pica_lang'] = $cfg['sql']['sqlprefix'].'_pica_lang';
$cfg['pica']['logpath'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'repository/log/data/';
$cfg['pica']['loglevel'] = 'warn';
$cfg['pica']['treetemplate'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-content-allocation/templates/template.tree_structure.html';
$cfg['pica']['treetemplate_article'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-content-allocation/templates/template.tree_article.html';
$cfg['pica']['treetemplate_complexlist'] = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-content-allocation/templates/template.tree_complexlist.html';
$cfg['pica']['style_complexlist'] = $cfg['path']['contenido_fullhtml'] . $cfg['path']['plugins'] . 'cl-content-allocation/style/complexlist.css';
$cfg['pica']['script_complexlist'] = $cfg['path']['contenido_fullhtml'] . $cfg['path']['plugins'] . 'cl-content-allocation/scripts/complexlist.js';
// administration > users > area translations
global $lngAct, $_cecRegistry;
$lngAct['con_contentallocation']['storeallocation'] = i18n("Store content allocations", "cl-content-allocation");
plugin_include('cl-content-allocation', 'includes/functions.chains.php');
$_cecRegistry->addChainFunction("Contenido.Article.RegisterCustomTab", "pica_RegisterCustomTab");
$_cecRegistry->addChainFunction("Contenido.Article.GetCustomTabProperties", "pica_GetCustomTabProperties");
?>

Datei anzeigen

@ -1,67 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Chains for Content Allocation
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 1.0.1
* @author unknown
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: functions.chains.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
function pica_RegisterCustomTab ()
{
return array("con_contentallocation");
}
function pica_GetCustomTabProperties ($sIntName)
{
if ($sIntName == "con_contentallocation")
{
return array("con_contentallocation", "con_edit", "");
}
}
function pica_ArticleListActions ($aActions)
{
$aTmpActions["con_contentallocation"] = "con_contentallocation";
return $aTmpActions + $aActions;
}
function pica_RenderArticleAction ($idcat, $idart, $idartlang, $actionkey)
{
global $sess;
if ($actionkey == "con_contentallocation")
{
return '<a title="'.i18n("Content Allocation", "cl-content-allocation").'" alt="'. i18n("Content Allocation", "cl-content-allocation").'" href="'.$sess->url('main.php?area=con_contentallocation&action=con_edit&idart='.$idart.'&idartlang='.$idartlang.'&idcat='.$idcat.'&frame=4').'"><img src="plugins/cl-content-allocation/images/call_contentallocation.gif"></a>';
} else {
return "";
}
}
?>

Datei anzeigen

@ -1,132 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Content Allocation Articles
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 1.0.1
* @author unknown
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: include.contentallocation_article.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
// check requests
Contenido_Security::checkRequests();
if (!($perm->have_perm_area_action($area, "storeallocation") || $perm->have_perm_area_action_item($area, "storeallocation", $idcat))) {
$notification->displayNotification("error", i18n("Permission denied", "cl-content-allocation"));
return;
}
cInclude("includes", "functions.pathresolver.php");
function str_replace_recursive($array) {
if (!is_array($array))
return false;
$result = array();
foreach ($array as $value) {
$result[] = str_replace("e", "", $value);
}
return $result;
}
// fetch idartlang for idart
$sql = "SELECT idartlang FROM " . $cfg['tab']['art_lang'] . " WHERE idart=" . Contenido_Security::toInteger($idart) . " AND idlang=" . Contenido_Security::toInteger($lang);
$db->query($sql);
$db->next_record();
$this_idartlang = $db->f('idartlang');
$oPage = new cPage;
$oPage->setMargin(10);
$oTree = new pApiContentAllocationComplexList('06bd456d-fe76-40cb-b041-b9ba90dc400a');
$oAlloc = new pApiContentAllocation;
if ($_POST['action'] == 'storeallocation') {
$oAlloc->storeAllocations($this_idartlang, $_POST['allocation']);
}
if ($_GET['step'] == 'collapse') {
$oTree->setTreeStatus($_GET['idpica_alloc']);
}
#build category path
$catString = '';
prCreateURLNameLocationString($idcat, '/', $catString);
$oArticle = new Article($idart, $client, $lang);
$sArticleTitle = $oArticle->getField('title');
$sLocationString = "<div class=\"categorypath\">" . $catString . '/' . clHtmlSpecialChars($sArticleTitle) . "</div>";
// load allocations
$loadedAllocations = $oAlloc->loadAllocations($this_idartlang);
$oTree->setChecked($loadedAllocations);
$result = $oTree->renderTree(true);
if ($result == false) {
$result = $notification->returnNotification("warning", i18n('There is no Content Allocation tree.', "cl-content-allocation"));
} else {
if (!is_object($tpl)) {
$tpl = new Template;
}
$hiddenfields = '<input type="hidden" name="action" value="storeallocation">
<input type="hidden" name="idart" value="' . $idart . '">
<input type="hidden" name="contenido" value="' . $sess->id . '">
<input type="hidden" name="area" value="' . $area . '">
<input type="hidden" name="frame" value="' . $frame . '">
<input type="hidden" name="idcat" value="' . $idcat . '">';
$tpl->set('s', 'HIDDENFIELDS', $hiddenfields);
if (sizeof($loadedAllocations) > 0) {
$tpl->set('s', 'ARRAY_CHECKED_BOXES', 'var checkedBoxes = [' . implode(',', $loadedAllocations) . '];');
} else {
$tpl->set('s', 'ARRAY_CHECKED_BOXES', 'var checkedBoxes = [];');
}
$oDiv = new cHTMLDiv;
$oDiv->updateAttributes(array('style' => 'text-align: right; padding: 5px; width: 730px; border: 1px #B3B3B3 solid; background-color: #FFFFFF;'));
$oDiv->setContent('<input type="image" src="images/but_ok.gif" />');
$tpl->set('s', 'DIV', '<br>' . $oDiv->render());
$tpl->set('s', 'TREE', $result);
$tpl->set('s', 'REMOVE_ALL', i18n("Remove all", "cl-content-allocation"));
$tpl->set('s', 'REMOVE', i18n("Remove", "cl-content-allocation"));
$result = $tpl->generate($cfg['pica']['treetemplate_complexlist'], true);
$script = '<link rel="stylesheet" type="text/css" href="' . $cfg['pica']['style_complexlist'] . '"/>
<script language="javascript" src="' . $cfg['pica']['script_complexlist'] . '"></script>';
$oPage->addScript('style', $script);
}
$oPage->setContent($sLocationString . $result . markSubMenuItem(5, true));
$oPage->render();
?>

Datei anzeigen

@ -1,22 +0,0 @@
<?php
/**
*
* @package Plugins
* @subpackage ContentAllocation
* @version $Rev: 128 $
* @since 2.0
* @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright 2017 CL-Team
* @link http://www.conlite.org
*
* $Id: include.left_bottom.php 128 2019-07-03 11:58:28Z oldperl $
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
$oPage = new cPage();
$oPage->setHtml5();
$oPage->render();

Datei anzeigen

@ -1,39 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Rendering left_top frame
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 1.0.1
* @author unknown
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: include.left_top.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if(!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
$oPage = new UI_Left_Top;
$oPage->render();
?>

Datei anzeigen

@ -1,164 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* right_bottom frame for Content Allocation
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend plugins
* @version 1.0.1
* @author unknown
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since contenido release <= 4.6
*
* {@internal
* created unknown
* modified 2008-07-02, Frederic Schneider, add security fix
*
* $Id: include.right_bottom.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
if (isset($_REQUEST['treeItem'])) {
die('Illegal call!');
}
#added 24.06.08 timo.trautmann security fix filter submitted treeItemPost array before insertion, name also changed according to security fix
$aPostTreeItem = array();
if (!is_object($db)) {
$db = new DB_ConLite();
}
if (isset($_REQUEST['treeItemPost']['idpica_alloc'])) {
$aPostTreeItem['idpica_alloc'] = (int) $_REQUEST['treeItemPost']['idpica_alloc'];
}
if (isset($_REQUEST['treeItemPost']['parentid'])) {
$aPostTreeItem['parentid'] = (int) $_REQUEST['treeItemPost']['parentid'];
}
if (isset($_REQUEST['treeItemPost']['name'])) {
$sName = stripslashes($_REQUEST['treeItemPost']['name']);
$sName = $db->escape($sName);
$aPostTreeItem['name'] = $sName;
}
$_GET['idpica_alloc'] = (int) $_GET['idpica_alloc'];
#end added 24.06.08 timo.trautmann
$oPage = new cPage();
$oPage->setMargin(10);
$oPage->setMessageBox();
$oTree = new pApiContentAllocationTreeView('f7771624-4874-4745-8b7e-21a49a71a447');
// store item
if ($_POST['step'] == 'store') {
$pNotify = '<div style="width:410px;margin-bottom:20px;">';
$sMessage = sprintf(i18n("New Category %s successfully stored!", "cl-content-allocation"), $treeItem['name']);
$notification->displayNotification("info", $sMessage);
$pNotify .= '</div>';
$oTree->storeItem($aPostTreeItem);
}
// rename item
if ($_POST['step'] == 'storeRename') {
$pNotify = '<div style="width:410px;margin-bottom:20px;">';
$sMessage = sprintf(i18n("Category %s successfully renamed!", "cl-content-allocation"), $treeItem['name']);
$notification->displayNotification("info", $sMessage);
$pNotify .= '</div>';
$oTree->storeItem($aPostTreeItem);
}
// rename item
if ($_GET['step'] == 'moveup') {
$oTree->itemMoveUp($_GET['idpica_alloc']);
}
if ($_GET['step'] == 'deleteItem') { // delete item
$pNotify = '<div style="width:410px;margin-bottom:20px;">';
$sMessage = i18n("Category successfully deleted!", "cl-content-allocation");
$notification->displayNotification("info", $sMessage);
$pNotify .= '</div>';
$oTree->deleteItem($_GET['idpica_alloc']);
}
if ($_GET['step'] == 'collapse') {
$oTree->setTreeStatus($_GET['idpica_alloc']);
}
if ($_GET['step'] == 'online') {
$oTree->setOnline($_GET['idpica_alloc']);
}
if ($_GET['step'] == 'offline') {
$oTree->setOffline($_GET['idpica_alloc']);
}
$oDiv = new cHTMLDiv;
$oDiv->updateAttributes(array('style' => 'padding: 5px; width: 400px; border: 1px #B3B3B3 solid; background-color: #FFFFFF;'));
$sTemp = '';
if ($_GET['step'] == 'createRoot') { // create new root item
$form = '
<table cellspacing="0" cellpaddin="0" border="0">
<form name="create" action="main.php" method="POST" onsubmit="return fieldCheck();">
<input type="hidden" name="action" value="' . $action . '" />
<input type="hidden" name="frame" value="' . intval($frame) . '" />
<input type="hidden" name="contenido" value="' . $sess->id . '" />
<input type="hidden" name="area" value="' . $area . '" />
<input type="hidden" name="step" value="store" />
<input type="hidden" name="treeItemPost[parentid]" value="root" />
<tr><td colspan="2" class="text_medium">' . i18n("Create new tree", "cl-content-allocation") . '</td></tr>
<tr>
<td class="text_medium"><input id="itemname" class="text_medium" type="text" name="treeItemPost[name]" value=""></td>
<td>&nbsp;<a href="main.php?action=' . $action . '&frame=' . $frame . '&area=' . $area . '&contenido=' . $sess->id . '"><img src="images/but_cancel.gif" border="0" /></a>
<input type="image" src="images/but_ok.gif" /></td>
</tr>
</form>
</table>
<script language="JavaScript">
controller = document.getElementById("itemname");
controller.focus();
function fieldCheck() {
if (controller.value == "") {
alert("' . i18n("Please enter a category name.", "cl-content-allocation") . '");
controller.focus();
return false;
}
return true;
}
</script>';
$oDiv->setContent($form);
$sTemp = $oDiv->render();
} else {
$newTree = '<a href="main.php?action=' . $action . '&step=createRoot&frame=' . $frame . '&area=' . $area . '&contenido=' . $sess->id . '"><img src="images/folder_new.gif" border="0" style="vertical-align: middle; margin-right: 5px;">' . i18n("Create new tree", "cl-content-allocation") . '</a><div style="height:10px"></div>';
}
$result = $oTree->renderTree(true);
if ($result === false) {
$result = '&nbsp;';
}
$js = '
<script language="javascript">
/* Function for deleting categories*/
function deleteCategory(idpica_alloc) {
var url = "main.php?area=' . $area . '&action=' . $action . '&step=deleteItem&idpica_alloc=" + idpica_alloc + "&frame=' . $frame . '&contenido=' . $sess->id . '";
window.location.href = url;
}
</script>';
$oPage->addScript('deleteCategory', $js);
$oPage->setContent($pNotify . $newTree . $sTemp . '<br/>' . $result);
$oPage->render();
?>

Datei anzeigen

@ -1,109 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-05-18 10:55+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: includes/config.plugin.php:59
msgid "Store content allocations"
msgstr ""
#: includes/include.contentallocation_article.php:86
msgid "There is no Content Allocation tree."
msgstr ""
#: includes/include.contentallocation_article.php:111
msgid "Remove all"
msgstr ""
#: includes/include.contentallocation_article.php:112
msgid "Remove"
msgstr ""
#: includes/include.right_bottom.php:70
#, php-format
msgid "New Category %s successfully stored!"
msgstr ""
#: includes/include.right_bottom.php:78
#, php-format
msgid "Category %s successfully renamed!"
msgstr ""
#: includes/include.right_bottom.php:90
msgid "Category successfully deleted!"
msgstr ""
#: includes/include.right_bottom.php:119 includes/include.right_bottom.php:142
msgid "Create new tree"
msgstr ""
#: includes/include.right_bottom.php:132
msgid "Please enter a category name."
msgstr ""
#: includes/functions.chains.php:61
msgid "Content Allocation"
msgstr ""
#: classes/class.content_allocation_treeview.php:100
#: classes/class.content_allocation_treeview.php:176
msgid "Please enter a category name"
msgstr ""
#: classes/class.content_allocation_treeview.php:124
msgid "New category"
msgstr ""
#: classes/class.content_allocation_treeview.php:126
msgid "Rename category"
msgstr ""
#: classes/class.content_allocation_treeview.php:127
msgid "Move category up"
msgstr ""
#: classes/class.content_allocation_treeview.php:128
msgid "Move category down"
msgstr ""
#: classes/class.content_allocation_treeview.php:132
msgid "Set category offline"
msgstr ""
#: classes/class.content_allocation_treeview.php:134
msgid "Set category online"
msgstr ""
#: classes/class.content_allocation_treeview.php:138
msgid "One or more subcategories exist, unable to delete"
msgstr ""
#: classes/class.content_allocation_treeview.php:140
msgid "Delete category"
msgstr ""
#: classes/class.content_allocation_treeview.php:140
msgid "Are you sure to delete the following category"
msgstr ""
#: classes/class.content_allocation_treeview.php:223
#: classes/class.content_allocation_article.php:107
msgid "Category"
msgstr ""
#: classes/class.content_allocation_treeview.php:224
msgid "Actions"
msgstr ""

Datei anzeigen

@ -1,112 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Contenido ContentAllocation\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-05-18 10:55+0200\n"
"PO-Revision-Date: 2013-09-11 14:31+0100\n"
"Last-Translator: Ortwin Pinke <translation@dceonline.de>\n"
"Language-Team: Ortwin Pinke <o.pinke@php-backoffice.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: i18n\n"
"Language: de_DE\n"
"X-Generator: Poedit 1.5.7\n"
#: includes/config.plugin.php:59
msgid "Store content allocations"
msgstr "Content Allocation speichern"
#: includes/include.contentallocation_article.php:86
msgid "There is no Content Allocation tree."
msgstr "Es existiert kein Content Allocation Baum"
#: includes/include.contentallocation_article.php:111
msgid "Remove all"
msgstr "Alle entfernen"
#: includes/include.contentallocation_article.php:112
msgid "Remove"
msgstr "Entfernen"
#: includes/include.right_bottom.php:70
#, php-format
msgid "New Category %s successfully stored!"
msgstr "Neue Kategorie %s gespeichert!"
#: includes/include.right_bottom.php:78
#, php-format
msgid "Category %s successfully renamed!"
msgstr "Kategorie %s umbenannt!"
#: includes/include.right_bottom.php:90
msgid "Category successfully deleted!"
msgstr "Kategorie gel&ouml;scht!"
#: includes/include.right_bottom.php:119 includes/include.right_bottom.php:142
msgid "Create new tree"
msgstr "Neuen Baum erstellen"
#: includes/include.right_bottom.php:132
msgid "Please enter a category name."
msgstr "Bitte geben Sie einen Kategorienamen ein."
#: includes/functions.chains.php:61
msgid "Content Allocation"
msgstr "Content Allocation"
#: classes/class.content_allocation_treeview.php:100
#: classes/class.content_allocation_treeview.php:176
msgid "Please enter a category name"
msgstr "Bitte geben Sie einen Kategorienamen ein"
#: classes/class.content_allocation_treeview.php:124
msgid "New category"
msgstr "Neue Kategorie"
#: classes/class.content_allocation_treeview.php:126
msgid "Rename category"
msgstr "Kategorie umbenennen"
#: classes/class.content_allocation_treeview.php:127
msgid "Move category up"
msgstr "Kategorie aufw&auml;rts bewegen"
#: classes/class.content_allocation_treeview.php:128
msgid "Move category down"
msgstr "Kategorie abw&auml;rts bewegen"
#: classes/class.content_allocation_treeview.php:132
msgid "Set category offline"
msgstr "Kategorie offline schalten"
#: classes/class.content_allocation_treeview.php:134
msgid "Set category online"
msgstr "Kategorie online schalten"
#: classes/class.content_allocation_treeview.php:138
msgid "One or more subcategories exist, unable to delete"
msgstr ""
"Es gibt eine oder mehrer Unterkategorien, L&ouml;schen nicht m&ouml;glich"
#: classes/class.content_allocation_treeview.php:140
msgid "Delete category"
msgstr "L&ouml;sche Kategorie"
#: classes/class.content_allocation_treeview.php:140
msgid "Are you sure to delete the following category"
msgstr "Wollen Sie folgende Kategorien wirklich l&oeschen?"
#: classes/class.content_allocation_treeview.php:223
#: classes/class.content_allocation_article.php:107
msgid "Category"
msgstr "Kategorie"
#: classes/class.content_allocation_treeview.php:224
msgid "Actions"
msgstr "Aktionen"

Datei anzeigen

@ -1,15 +0,0 @@
./includes/config.plugin.php
./includes/include.left_bottom.php
./includes/include.left_top.php
./includes/include.contentallocation_article.php
./includes/include.right_bottom.php
./includes/functions.chains.php
./templates/template.tree_structure.html
./templates/template.tree_complexlist.html
./templates/template.tree_article.html
./classes/class.content_allocation_tree.php
./classes/class.content_allocation_treeview.php
./classes/class.content_allocation.php
./classes/class.content_allocation_article.php
./classes/class.content_allocation_complexlist.php
./classes/class.content_allocation_selectbox.php

Datei anzeigen

@ -1,30 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: oldperl
* Created: 06.05.2021
*/
CREATE TABLE `!PREFIX!ca_alloc` (
`idpica_alloc` int(10) NOT NULL DEFAULT 0,
`parentid` int(10) DEFAULT NULL,
`sortorder` int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (`idpica_alloc`)
);
CREATE TABLE `!PREFIX!ca_alloc_con` (
`idpica_alloc` int(10) NOT NULL DEFAULT 0,
`idartlang` int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (`idpica_alloc`)
);
CREATE TABLE `!PREFIX!ca_lang` (
`idpica_alloc` int(10) NOT NULL DEFAULT 0,
`idlang` int(10) NOT NULL DEFAULT 0,
`name` varchar(255) DEFAULT NULL,
`online` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`idpica_alloc`)
);

Datei anzeigen

@ -1,13 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: oldperl
* Created: 06.05.2021
*/
DROP TABLE IF EXISTS !PREFIX!ca_alloc;
DROP TABLE IF EXISTS !PREFIX!ca_alloc_con;
DROP TABLE IF EXISTS !PREFIX!ca_lang;

Datei anzeigen

@ -1,133 +0,0 @@
/*
* ul2finder
* written by Christian Heilmann (http://icant.co.uk)
* turns the nested list with the ID "finder" into a dynamic list
* uses the CSS classes defined in the variables
*/
function ul2finder()
{
// Define variables used and classes to be applied/removed
var i,uls,als,finder;
var parentClass='parent';
var showClass='shown';
var hideClass='hidden';
var openClass='open';
// check if our finder list exists, if not, stop all activities
finder=document.getElementById('finder');
if(!finder){return;}
// add the class domenabled to the body
cssjs('add',document.body,'domenabled')
// loop through all lists inside finder, position and hide them
// by applying the class hidden
uls=document.getElementById('finder').getElementsByTagName('ul');
for(i=0;i<uls.length;i++)
{
cssjs('add',uls[i],hideClass);
}
// loop through all links of inside finder
lis=document.getElementById('finder').getElementsByTagName('li');
for(i=0;i<lis.length;i++)
{
var styleBgColor = lis[i].attributes["baseClass"].value
// if the li containing the link has no nested list, skip this one
if(!lis[i].getElementsByTagName('ul')[0])
{
//lis[i].className = "bright";
//cssjs('add',lis[i],styleBgColor);
lis[i].className = styleBgColor;
continue;
}
var newa=document.createElement('a');
newa.href='#';
newa.appendChild(document.createTextNode(lis[i].firstChild.nextSibling.nodeValue));
lis[i].replaceChild(newa,lis[i].firstChild.nextSibling);
// otherwise apply the parent class
//alert(lis[i].innerHTML);
cssjs('add',newa,styleBgColor);
// if the user clicks on the link
lis[i].getElementsByTagName('a')[0].onclick=function()
{
// loop through all lists inside finder
for(var i=0;i<uls.length;i++)
{
// avoid the list connected to this link
var found=false;
for(j=0;j<uls[i].getElementsByTagName('ul').length;j++)
{
if(uls[i].getElementsByTagName('ul')[j] ==
this.parentNode.getElementsByTagName('ul')[0])
{
found=true;
break;
}
}
// and hide all others
if(!found)
{
cssjs('add',uls[i],hideClass)
cssjs('remove',uls[i],showClass)
cssjs('remove',uls[i].parentNode.getElementsByTagName('a')[0],openClass)
cssjs('add',uls[i].parentNode.getElementsByTagName('a')[0],parentClass)
// remove all old "open" elements
styleColor = uls[i].parentNode.getElementsByTagName('a')[0].style.backgroundColor;
if (styleColor == "#E2E2E2" || styleColor == "rgb(226, 226, 226)") {
uls[i].parentNode.getElementsByTagName('a')[0].style.backgroundColor = '';
}
}
}
// change the current link from parent to open
cssjs('swap',this,parentClass,openClass)
this.style.backgroundColor = "#E2E2E2";
// show the current nested list
cssjs('add',this.parentNode.getElementsByTagName('ul')[0],showClass)
// don't follow the real HREF of the link
return false;
}
}
/*
* cssjs
* written by Christian Heilmann (http://icant.co.uk)
* eases the dynamic application of CSS classes via DOM
* parameters: action a, object o and class names c1 and c2 (c2 optional)
* actions: swap exchanges c1 and c2 in object o
* add adds class c1 to object o
* remove removes class c1 from object o
* check tests if class c1 is applied to object o
* example: cssjs('swap',document.getElementById('foo'),'bar','baz');
*/
function cssjs(a,o,c1,c2)
{
switch (a){
case 'swap':
o.className=!cssjs('check',o,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2);
break;
case 'add':
if(!cssjs('check',o,c1)){o.className+=o.className?' '+c1:c1;}
break;
case 'remove':
var rep=o.className.match(' '+c1)?' '+c1:c1;
o.className=o.className.replace(rep,'');
break;
case 'check':
return new RegExp('\\b'+c1+'\\b').test(o.className)
break;
}
}
}
// Check if the browser supports DOM, and start the script if it does.
if(document.getElementById && document.createTextNode)
{
window.onload=ul2finder;
}

Datei anzeigen

@ -1,105 +0,0 @@
.domenabled #finderparent {
border: 0px solid #000;
position: relative;
/*min-height: 250px;*/
height: 360px;
width: 730px;
overflow: auto;
margin-bottom: 10px;
}
.domenabled #finder {
/*position:absolute;
top:1em;
left:1em;*/
}
.domenabled ul#finder,
.domenabled ul#finder li,
.domenabled ul#finder ul {
width: 180px;
list-style-type: none;
margin: 0;
padding: 0;
line-height: 20px;
}
.domenabled ul#finder ul.hidden {
top: 0px;
left: -1px;
position: absolute;
/*display: none;*/
visibility: hidden;
border-left: 5px #fff solid;
}
.domenabled ul#finder ul.shown {
top: 0px;
left: 185px;
position: absolute;
float: left;
/*border-left: 5px #fff solid;*/
/*display: block;*/
visibility: visible;
}
.domenabled #finder a.open {
background: url(../images/arrow.gif) no-repeat #CCCCCC 140px 50%;
padding-right: 16px;
padding-left: 0px;
display: block;
}
.domenabled ul#finder li a {
color: #000;
background: url(../images/normal.gif) no-repeat transparent 0 50%;
/*adding-left: 16px;*/
text-decoration: none;
padding-right: 16px;
padding-left: 0px;
display: block;
}
.domenabled ul#finder li a.dark {
background: url(../images/arrow.gif) no-repeat #fff 170px 50%;
}
.domenabled ul#finder li.dark,
.domenabled ul#finder li a.dark {
background-color: #E2E2E2;
}
.domenabled ul#finder li a.bright {
background: url(../images/arrow.gif) no-repeat #ddd 170px 50%;
}
.domenabled ul#finder li.bright,
.domenabled ul#finder li a.bright {
background-color: #F4F4F7;
}
.domenabled ul#finder li,
.domenabled ul#finder ul.hidden li,
.domenabled ul#finder ul.shown li {
border: 1px #B3B3B3 solid;
border-bottom: 0px;
}
.domenabled ul#finder input {
float: left;
}
#choosenList {
border: 1px #B3B3B3 solid;
background-color: #E2E2E2;
width: 730px;
padding: 5px;
}
#choosenList ul {
margin: 0;
}
#choosenList li {
list-style-type: square;
}

Datei anzeigen

@ -1,17 +0,0 @@
<form method="post" action="main.php" name="contentallocation">
{HIDDENFIELDS}
<table border="0" cellpadding="2" cellspacing="0" width="500" style="border:0px; border-left:1px; border-bottom: 1px;border-color: #B3B3B3; border-style: solid;">
<tr class="text_medium" style="font-weight:bold; background-color: #E2E2E2;">
<td width="450" class="textg_medium" style="border: 0px; border-top:1px; border-right:1px; border-color: #B3B3B3; border-style: solid">{CATEGORY}</td>
<td width="50" class="textg_medium" style="border: 0px; border-top:1px; border-right:1px; border-color: #B3B3B3; border-style: solid">&nbsp;</td>
</tr>
<!-- BEGIN:BLOCK -->
<tr style="background-color: {BACKGROUND_COLOR};" onmouseover="row.over(this)" onmouseout="row.out(this)" onclick="row.click(this)">
<td style="border: 0px; border-top:1px; border-right:1px;border-color: #B3B3B3; border-style: solid; padding-left: {ITEMINDENT} ;">{ITEMNAME}</td>
<td style="border: 0px; border-top:1px; border-right:1px; border-color: #B3B3B3; border-style: solid;">{CHECKBOX}</td>
</tr>
<!-- END:BLOCK -->
</table>
{DIV}
</form>

Datei anzeigen

@ -1,76 +0,0 @@
<form method="post" action="main.php" name="contentallocation">
{HIDDENFIELDS}
<div id="finderparent">
{TREE}
</div>
<div id="choosenList">
<ul id="choosenValues">
</ul>
<br /><a href="javascript:removeAll();">{REMOVE_ALL}</a>
</div>
{DIV}
</form>
<script language="javascript">
function addToList(obj) {
var list = document.getElementById("choosenValues");
var elmId = obj.attributes["id"].value;
elmId = elmId.replace(/e/, "");
if (obj.checked == false) {
removeFromList(elmId);
} else {
if (obj.nextSibling.innerHTML == undefined) {
text = obj.nextSibling.data;
} else {
text = obj.nextSibling.innerHTML;
}
var removeLink = "<a href=\"javascript:removeFromList("+elmId+")\">[{REMOVE}]</a> " + text;
listelm = document.createElement("LI");
listelm.innerHTML = removeLink;
listelm.id = "rl" + elmId;
//list.appendChild(listelm);
list.appendChild(listelm);
}
}
function removeFromList (id) {
var list = document.getElementById("choosenValues");
var remElm = document.getElementById("rl" + id);
if (remElm != null) {
list.removeChild(remElm);
var uncheckElm = document.getElementById("e" + id);
uncheckElm.checked = false;
}
}
function removeAll () {
var list = document.getElementById("choosenValues");
formElms = document.forms["contentallocation"].elements;
for (i = 0; i < formElms.length; i++) {
if (formElms[i].type == "checkbox") {
formElms[i].checked = false;
}
}
list.innerHTML = '';
}
{ARRAY_CHECKED_BOXES}
function listAllCheckedBoxes () {
if (checkedBoxes.length == 0) return false;
for (i = 0; i < checkedBoxes.length; i++) {
obj = document.getElementById("e" + checkedBoxes[i]);
addToList(obj);
}
}
listAllCheckedBoxes();
</script>

Datei anzeigen

@ -1,13 +0,0 @@
<table border="0" cellpadding="2" cellspacing="0" width="800" style="border:0px; border-left:1px; border-bottom: 1px;border-color: #B3B3B3; border-style: solid;">
<tr class="text_medium" style="font-weight:bold; background-color: #E2E2E2;">
<td width="600" class="textg_medium" style="border: 0px; border-top:1px; border-right:1px; border-color: #B3B3B3; border-style: solid">{CATEGORY}</td>
<td width="200" class="textg_medium" style="border: 0px; border-top:1px; border-right:1px; border-color: #B3B3B3; border-style: solid">{ACTIONS}</td>
</tr>
<!-- BEGIN:BLOCK -->
<tr style="background-color: {BACKGROUND_COLOR};" onmouseover="row.over(this)" onmouseout="row.out(this)" onclick="row.click(this)">
<td style="border: 0px; border-top:0px; border-right:1px;border-color: #B3B3B3; border-style: solid; padding-left: {ITEMINDENT} ;">{ITEMNAME}</td>
<td style="border: 0px; border-top:0px; border-right:1px; border-color: #B3B3B3; border-style: solid;">{ACTION_CREATE} {ACTION_RENAME} {ACTION_ONOFFLINE} {ACTION_MOVE_UP} {ACTION_MOVE_DOWN} {ACTION_DELETE}</td>
</tr>
<!-- END:BLOCK -->
</table>

Datei anzeigen

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Contenido XML language file -->
<language>
<navigation>
<extra>
<content_allocation>
<main>Tagging</main>
</content_allocation>
</extra>
<contenido>
<article>
<content_allocation>Tagging</content_allocation>
</article>
</contenido>
</language>

Datei anzeigen

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Contenido XML language file -->
<language>
<navigation>
<extra>
<content_allocation>
<main>Tagging</main>
</content_allocation>
</extra>
<contenido>
<article>
<content_allocation>Tagging</content_allocation>
</article>
</contenido>
</navigation>
</language>

Datei anzeigen

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Contenido XML language file -->
<language>
<navigation>
<extra>
<content_allocation>
<main>Tagging</main>
</content_allocation>
</extra>
<contenido>
<article>
<content_allocation>Tagging</content_allocation>
</article>
</contenido>
</navigation>
</language>

Datei anzeigen

@ -1 +0,0 @@
/.project

Datei anzeigen

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <https://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:
<program> Copyright (C) <year> <name of author>
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
<https://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
<https://www.gnu.org/licenses/why-not-lgpl.html>.

Datei anzeigen

@ -1,2 +0,0 @@
# cl-mod-rewrite
Mod Rewrite Plugin for ConLite

Datei anzeigen

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<plugin>
<general active="1">
<plugin_name>ConLite ModRewrite</plugin_name>
<plugin_foldername>cl-mod-rewrite</plugin_foldername>
<uuid>B54918AD-A6DB-5FFB-B8DB-37BFF779D97C</uuid>
<description>ConLite ModRewrite</description>
<author>ConLite Team</author>
<copyright>ConLite Team</copyright>
<mail>plugins@conlite.org</mail>
<website>https://conlite.org</website>
<version>1.0.1</version>
</general>
<requirements php="7.1">
<conlite minversion="2.1.0" />
</requirements>
<conlite>
<areas>
<area menuless="1">mod_rewrite</area>
<area parent="mod_rewrite" menuless="1">mod_rewrite_expert</area>
<area parent="mod_rewrite" menuless="1">mod_rewrite_test</area>
</areas>
<actions>
<action area="mod_rewrite">mod_rewrite</action>
<action area="mod_rewrite">mod_rewrite_expert</action>
<action area="mod_rewrite">mod_rewrite_test</action>
</actions>
<frames>
<frame area="mod_rewrite" filetype="main" name="cl-mod-rewrite/includes/include.mod_rewrite_content.php" frameId="4" />
<frame area="mod_rewrite_expert" filetype="main" name="cl-mod-rewrite/includes/include.mod_rewrite_contentexpert.php" frameId="4" />
<frame area="mod_rewrite_test" filetype="main" name="cl-mod-rewrite/includes/include.mod_rewrite_contenttest.php" frameId="4" />
</frames>
<nav_sub>
<nav area="mod_rewrite" level="0" navm="extra">cl-mod-rewrite/xml/;navigation/extras/mod_rewrite/main</nav>
<nav area="mod_rewrite" level="1" navm="0">cl-mod-rewrite/xml/;navigation/extras/mod_rewrite/settings</nav>
<nav area="mod_rewrite_expert" level="1" navm="0">cl-mod-rewrite/xml/;navigation/extras/mod_rewrite/expert</nav>
<nav area="mod_rewrite_test" level="1" navm="0">cl-mod-rewrite/xml/;navigation/extras/mod_rewrite/test</nav>
</nav_sub>
</conlite>
</plugin>

Datei anzeigen

@ -1,87 +0,0 @@
<?php
/**
* AMR base Mod Rewrite class
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewritebase.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Abstract base mod rewrite class.
*
* Provides some common features such as common debugging, globals/configuration
* access for childs.
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
abstract class ModRewriteBase {
/**
* Initialization, is to call at least once by an child.
* @deprecated
*/
protected static function initialize($clientId) {
}
/**
* Returns enabled state of mod rewrite plugin
*
* @return bool
*/
public static function isEnabled() {
return (self::getConfig('use', 0) == 1) ? true : false;
}
/**
* Sets the enabled state of mod rewrite plugin
*
* @param bool $bEnabled
*/
public static function setEnabled($bEnabled) {
self::setConfig('use', (bool) $bEnabled);
}
/**
* Returns configuration of mod rewrite, content of gobal $cfg['cl-mod-rewrite']
*
* @param string $key Name of configuration key
* @param mixed $default Default value to return as a fallback
* @return mixed Desired value mr configuration, either the full configuration
* or one of the desired subpart
*/
public static function getConfig($key = null, $default = null) {
global $cfg;
if ($key == null) {
return $cfg['cl-mod-rewrite'];
} elseif ((string) $key !== '') {
return (isset($cfg['cl-mod-rewrite'][$key])) ? $cfg['cl-mod-rewrite'][$key] : $default;
} else {
return $default;
}
}
/**
* Sets the configuration of mod rewrite, content of gobal $cfg['cl-mod-rewrite']
*
* @param string $key Name of configuration key
* @param mixed $value The value to set
*/
public static function setConfig($key, $value) {
global $cfg;
$cfg['cl-mod-rewrite'][$key] = $value;
}
}

Datei anzeigen

@ -1,676 +0,0 @@
<?php
/**
* AMR controller class
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewritecontroller.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Mod Rewrite controller class. Extracts url parts and sets some necessary globals like:
* - $idart
* - $idcat
* - $client
* - $changeclient
* - $lang
* - $changelang
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
class ModRewriteController extends ModRewriteBase {
// Error constants
const ERROR_CLIENT = 1;
const ERROR_LANGUAGE = 2;
const ERROR_CATEGORY = 3;
const ERROR_ARTICLE = 4;
const ERROR_POST_VALIDATION = 5;
const FRONT_CONTENT = 'front_content.php';
/**
* Extracted request uri path parts by path separator '/'
*
* @var array
*/
private $_aParts;
/**
* Extracted article name from request uri
*
* @var string
*/
private $_sArtName;
/**
* Remaining path for path resolver (see $GLOBALS['path'])
*
* @var string
*/
private $_sPath;
/**
* Incomming URL
*
* @var string
*/
private $_sIncommingUrl;
/**
* Resolved URL
*
* @var string
*/
private $_sResolvedUrl;
/**
* Client id used by this class
*
* @var int
*/
private $_iClientMR;
/**
* Language id used by this class
*
* @var int
*/
private $_iLangMR;
/**
* Flag about occured errors
*
* @var bool
*/
private $_bError = false;
/**
* One of ERROR_* constants or 0
*
* @var int
*/
private $_iError = 0;
/**
* Flag about found routing definition
*
* @var bool
*/
private $_bRoutingFound = false;
/**
* Constructor, sets several properties.
*
* @param string $incommingUrl Incomming URL
*/
public function __construct($incommingUrl) {
// CON-1266 make incomming URL lowercase if option "URLS to
// lowercase" is set
if (1 == $this->getConfig('use_lowercase_uri')) {
$incommingUrl = strtolower($incommingUrl);
}
$this->_sIncommingUrl = $incommingUrl;
$this->_aParts = array();
$this->_sArtName = '';
}
/**
* Getter for overwritten client id (see $GLOBALS['client'])
*
* @return int Client id
*/
public function getClient() {
return $GLOBALS['client'];
}
/**
* Getter for overwritten change client id (see $GLOBALS['changeclient'])
*
* @return int Change client id
*/
public function getChangeClient() {
return $GLOBALS['changeclient'];
}
/**
* Getter for article id (see $GLOBALS['idart'])
*
* @return int Article id
*/
public function getIdArt() {
return $GLOBALS['idart'];
}
/**
* Getter for category id (see $GLOBALS['idcat'])
*
* @return int Category id
*/
public function getIdCat() {
return $GLOBALS['idcat'];
}
/**
* Getter for language id (see $GLOBALS['lang'])
*
* @return int Language id
*/
public function getLang() {
return $GLOBALS['lang'];
}
/**
* Getter for change language id (see $GLOBALS['changelang'])
*
* @return int Change language id
*/
public function getChangeLang() {
return $GLOBALS['changelang'];
}
/**
* Getter for path (see $GLOBALS['path'])
*
* @return string Path, used by path resolver
*/
public function getPath() {
return $this->_sPath;
}
/**
* Getter for resolved url
*
* @return string Resolved url
*/
public function getResolvedUrl() {
return $this->_sResolvedUrl;
}
/**
* Returns a flag about found routing definition
*
* return bool Flag about found routing
*/
public function getRoutingFoundState() {
return $this->_bRoutingFound;
}
/**
* Getter for occured error state
*
* @return bool Flag for occured error
*/
public function errorOccured() {
return $this->_bError;
}
/**
* Getter for occured error state
*
* @return int Numeric error code
*/
public function getError() {
return $this->_iError;
}
/**
* Main function to call for mod rewrite related preprocessing jobs.
*
* Executes some private functions to extract request URI and to set needed membervariables
* (client, language, article id, category id, etc.)
*/
public function execute() {
if (parent::isEnabled() == false) {
return;
}
$this->_extractRequestUri();
$this->_initializeClientId();
$this->_setClientId();
mr_loadConfiguration($this->_iClientMR);
$this->_setLanguageId();
// second call after setting client and language
$this->_extractRequestUri(true);
$this->_setPathresolverSetting();
$this->_setIdart();
ModRewriteDebugger::add($this->_aParts, 'ModRewriteController::execute() _setIdart');
$this->_postValidation();
}
/**
* Extracts request URI and sets member variables $this->_sArtName and $this->_aParts
*
* @param bool $secondCall Flag about second call of this function, is needed
* to re extract url if a routing definition was found
*/
private function _extractRequestUri($secondCall = false) {
global $client;
// get REQUEST_URI
$requestUri = $_SERVER['REQUEST_URI'];
// CON-1266 make request URL lowercase if option "URLS to
// lowercase" is set
if (1 == $this->getConfig('use_lowercase_uri')) {
$requestUri = strtolower($requestUri);
}
// check for defined rootdir
if (parent::getConfig('rootdir') !== '/' && strpos($requestUri, $this->_sIncommingUrl) === 0) {
$this->_sIncommingUrl = str_replace(parent::getConfig('rootdir'), '/', $this->_sIncommingUrl);
}
$aUrlComponents = $this->_parseUrl($this->_sIncommingUrl);
if (isset($aUrlComponents['path'])) {
if (parent::getConfig('rootdir') !== '/' && strpos($aUrlComponents['path'], parent::getConfig('rootdir')) === 0) {
$aUrlComponents['path'] = str_replace(parent::getConfig('rootdir'), '/', $aUrlComponents['path']);
}
if ($secondCall == true) {
// @todo: implement real redirect of old front_content.php style urls
// check for routing definition
$routings = parent::getConfig('routing');
if (is_array($routings) && isset($routings[$aUrlComponents['path']])) {
$aUrlComponents['path'] = $routings[$aUrlComponents['path']];
if (strpos($aUrlComponents['path'], self::FRONT_CONTENT) !== false) {
// routing destination contains front_content.php
$this->_bRoutingFound = true;
// set client language, if not set before
mr_setClientLanguageId($client);
//rebuild URL
$url = mr_buildNewUrl($aUrlComponents['path']);
$aUrlComponents = $this->_parseUrl($url);
// add query parameter to superglobal _GET
if (isset($aUrlComponents['query'])) {
$vars = null;
parse_str($aUrlComponents['query'], $vars);
$_GET = array_merge($_GET, $vars);
}
$this->_aParts = array();
}
} else {
return;
}
}
$aPaths = explode('/', $aUrlComponents['path']);
foreach ($aPaths as $p => $item) {
if (!empty($item)) {
// pathinfo would also work
$arr = explode('.', $item);
$count = count($arr);
if ($count > 0 && '.' . strtolower($arr[$count - 1]) == parent::getConfig('file_extension')) {
array_pop($arr);
$this->_sArtName = trim(implode('.', $arr));
} else {
$this->_aParts[] = $item;
}
}
}
if ($secondCall == true) {
// reprocess extracting client and language
$this->_setClientId();
mr_loadConfiguration($this->_iClientMR);
$this->_setLanguageId();
}
}
ModRewriteDebugger::add($this->_aParts, 'ModRewriteController::_extractRequestUri() $this->_aParts');
// loop parts array and remove existing 'front_content.php'
if ($this->_hasPartArrayItems()) {
foreach ($this->_aParts as $p => $item) {
if ($item == self::FRONT_CONTENT) {
unset($this->_aParts[$p]);
}
}
}
}
/**
* Tries to initialize the client id.
* This is required to load the proper plugin configuration for current client.
*/
private function _initializeClientId() {
global $client, $changeclient, $load_client;
$iClient = (isset($client) && (int) $client > 0) ? $client : 0;
$iChangeClient = (isset($changeclient) && (int) $changeclient > 0) ? $changeclient : 0;
$iLoadClient = (isset($load_client) && (int) $load_client > 0) ? $load_client : 0;
$this->_iClientMR = 0;
if ($iClient > 0 && $iChangeClient == 0) {
$this->_iClientMR = $iClient;
} elseif ($iChangeClient > 0) {
$this->_iClientMR = $iChangeClient;
} else {
$this->_iClientMR = $iLoadClient;
}
if ((int) $this->_iClientMR > 0) {
// set global client variable
$client = (int) $this->_iClientMR;
}
}
/**
* Tries to initialize the language id.
*/
private function _initializeLanguageId() {
global $lang, $changelang, $load_lang;
$iLang = (isset($lang) && (int) $lang > 0) ? $lang : 0;
$iChangeLang = (isset($changelang) && (int) $changelang > 0) ? $changelang : 0;
$iLoadLang = (isset($load_lang) && (int) $load_lang > 0) ? $load_lang : 0;
$this->_iLangMR = 0;
if ($iLang > 0 && $iChangeLang == 0) {
$this->_iLangMR = $iLang;
} elseif ($iChangeLang > 0) {
$this->_iLangMR = $iChangeLang;
} else {
$this->_iLangMR = $iLoadLang;
}
if ((int) $this->_iLangMR > 0) {
// set global lang variable
$lang = (int) $this->_iLangMR;
}
}
/**
* Detects client id from given url
*/
private function _setClientId() {
global $client;
if ($this->_bError) {
return;
} elseif ($this->_isRootRequest()) {
// request to root
return;
} elseif (parent::getConfig('use_client') !== 1) {
return;
}
if (parent::getConfig('use_client_name') == 1) {
$detectedClientId = (int) ModRewrite::getClientId(array_shift($this->_aParts));
} else {
$detectedClientId = (int) array_shift($this->_aParts);
if ($detectedClientId > 0 && !ModRewrite::languageIdExists($detectedClientId)) {
$detectedClientId = 0;
}
}
if ($detectedClientId > 0) {
// overwrite existing client variables
$this->_iClientMR = $detectedClientId;
$client = $detectedClientId;
} else {
$this->_setError(self::ERROR_CLIENT);
}
}
/**
* Sets language id
*/
private function _setLanguageId() {
global $lang;
if ($this->_bError) {
return;
} elseif ($this->_isRootRequest()) {
// request to root
return;
} elseif (parent::getConfig('use_language') !== 1) {
return;
}
if (parent::getConfig('use_language_name') == 1) {
// thanks to Nicolas Dickinson for multi Client/Language BugFix
$languageName = array_shift($this->_aParts);
$detectedLanguageId = (int) ModRewrite::getLanguageId($languageName, $this->_iClientMR);
} else {
$detectedLanguageId = (int) array_shift($this->_aParts);
if ($detectedLanguageId > 0 && !ModRewrite::clientIdExists($detectedLanguageId)) {
$detectedLanguageId = 0;
}
}
if ($detectedLanguageId > 0) {
// overwrite existing language variables
$this->_iLangMR = $detectedLanguageId;
$lang = $detectedLanguageId;
} else {
$this->_setError(self::ERROR_LANGUAGE);
}
}
/**
* Sets path resolver and category id
*/
private function _setPathresolverSetting() {
global $client, $lang, $load_lang, $idcat;
if ($this->_bError) {
return;
} elseif (!$this->_hasPartArrayItems()) {
return;
}
$this->_sPath = '/' . implode('/', $this->_aParts) . '/';
if (!isset($lang) || (int) $lang <= 0) {
if ((int) $load_lang > 0) {
// load_client is set in frontend/config.php
$lang = (int) $load_lang;
} else {
$clCol = new cApiClientLanguageCollection();
$clCol->setWhere('idclient', $client);
$clCol->query();
if ($clItem = $clCol->next()) {
$lang = $clItem->get('idlang');
}
}
}
$idcat = (int) ModRewrite::getCatIdByUrlPath($this->_sPath);
if ($idcat == 0) {
// category couldn't resolved
$this->_setError(self::ERROR_CATEGORY);
$idcat = null;
} else {
// unset $this->_sPath if $idcat could set, otherwhise it would be resolved again.
unset($this->_sPath);
}
ModRewriteDebugger::add($idcat, 'ModRewriteController->_setPathresolverSetting $idcat');
ModRewriteDebugger::add($this->_sPath, 'ModRewriteController->_setPathresolverSetting $this->_sPath');
}
/**
* Sets article id
*/
private function _setIdart() {
global $idcat, $idart, $lang;
if ($this->_bError) {
return;
} else if ($this->_isRootRequest()) {
return;
}
$iIdCat = (isset($idcat) && (int) $idcat > 0) ? $idcat : 0;
$iIdArt = (isset($idart) && (int) $idart > 0) ? $idart : 0;
$detectedIdart = 0;
$defaultStartArtName = parent::getConfig('default_startart_name');
$currArtName = $this->_sArtName;
// startarticle name in url
if (parent::getConfig('add_startart_name_to_url') && !empty($currArtName)) {
if ($currArtName == $defaultStartArtName) {
// stored articlename is the default one, remove it ModRewrite::getArtIdByWebsafeName()
// will find the real article name
$currArtName = '';
}
}
// Last check, before detecting article id
if ($iIdCat == 0 && $iIdArt == 0 && empty($currArtName)) {
// no idcat, idart and article name
// must be a request to root or with language name and/or client name part!
return;
}
if ($iIdCat > 0 && $iIdArt == 0 && !empty($currArtName)) {
// existing idcat with no idart and with article name
$detectedIdart = (int) ModRewrite::getArtIdByWebsafeName($currArtName, $iIdCat, $lang);
} elseif ($iIdCat > 0 && $iIdArt == 0 && empty($currArtName)) {
if (parent::getConfig('add_startart_name_to_url') && ($currArtName == '' || $defaultStartArtName == '' || $defaultStartArtName == $this->_sArtName)) {
// existing idcat without idart and without article name or with default start article name
cInclude('classes', 'class.article.php');
$artColl = new ArticleCollection(array('idcat' => $idcat, 'start' => 1));
if ($artItem = $artColl->startArticle()) {
$detectedIdart = (int) $artItem->get('idart');
}
}
} elseif ($iIdCat == 0 && $iIdArt == 0 && !empty($currArtName)) {
// no idcat and idart but article name
$detectedIdart = (int) ModRewrite::getArtIdByWebsafeName($currArtName, $iIdCat, $lang);
}
if ($detectedIdart > 0) {
$idart = $detectedIdart;
} elseif (!empty($currArtName)) {
$this->_setError(self::ERROR_ARTICLE);
}
ModRewriteDebugger::add($detectedIdart, 'ModRewriteController->_setIdart $detectedIdart');
}
/**
* Does post validation of the extracted data.
*
* One main goal of this function is to prevent duplicated content, which could happen, if
* the configuration 'startfromroot' is activated.
*/
private function _postValidation() {
global $idcat, $idart, $client;
if ($this->_bError || $this->_bRoutingFound || !$this->_hasPartArrayItems()) {
return;
}
if (parent::getConfig('startfromroot') == 1 && parent::getConfig('prevent_duplicated_content') == 1) {
// prevention of duplicated content if '/firstcat/' is directly requested!
$idcat = (isset($idcat) && (int) $idcat > 0) ? $idcat : null;
$idart = (isset($idart) && (int) $idart > 0) ? $idart : null;
// compose new parameter
$param = '';
if ($idcat) {
$param .= 'idcat=' . (int) $idcat;
}
if ($idart) {
$param .= ($param !== '') ? '&idart=' . (int) $idart : 'idart=' . (int) $idart;
}
if ($param == '') {
return;
}
// set client language, if not set before
mr_setClientLanguageId($client);
//rebuild url
$url = mr_buildNewUrl(self::FRONT_CONTENT . '?' . $param);
$aUrlComponents = @parse_url($this->_sIncommingUrl);
$incommingUrl = (isset($aUrlComponents['path'])) ? $aUrlComponents['path'] : '';
ModRewriteDebugger::add($url, 'ModRewriteController->_postValidation validate url');
ModRewriteDebugger::add($incommingUrl, 'ModRewriteController->_postValidation incommingUrl');
// now the new generated uri should be identical with the request uri
if ($incommingUrl !== $url) {
$this->_setError(self::ERROR_POST_VALIDATION);
$idcat = null;
}
}
}
/**
* Parses the url using defined separators
*
* @param string $url Incoming url
* @return string Parsed url
*/
private function _parseUrl($url) {
$this->_sResolvedUrl = $url;
$oMrUrlUtil = ModRewriteUrlUtil::getInstance();
$url = $oMrUrlUtil->toContenidoUrl($url);
return @parse_url($url);
}
/**
* Returns state of parts property.
*
* @return bool True if $this->_aParts propery contains items
*/
private function _hasPartArrayItems() {
return (!empty($this->_aParts));
}
/**
* Checks if current request was a root request.
*
* @return bool
*/
private function _isRootRequest() {
return ($this->_sIncommingUrl == '/' || $this->_sIncommingUrl == '');
}
/**
* Sets error code and error flag (everything greater than 0 is an error)
* @param int $errCode
*/
private function _setError($errCode) {
$this->_iError = (int) $errCode;
$this->_bError = ((int) $errCode > 0);
}
}

Datei anzeigen

@ -1,88 +0,0 @@
<?php
/**
* AMR debugger class
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewritedebugger.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Mod rewrite debugger class.
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
class ModRewriteDebugger {
/**
* Flag to enable debugger
* @var bool
*/
protected static $_bEnabled = false;
/**
* Enable debugger setter.
* @param bool $bEnabled
*/
public static function setEnabled($bEnabled) {
self::$_bEnabled = (bool) $bEnabled;
}
/**
* Adds variable to debugger.
* Wrapper for <code>DebuggerFactory::getDebugger('visible_adv')</code>.
*
* @param mixed $mVar The variable to dump
* @param string $sLabel Describtion for passed $mVar
*/
public static function add($mVar, $sLabel = '') {
if (!self::$_bEnabled) {
return;
}
DebuggerFactory::getDebugger('visible_adv')->add($mVar, $sLabel);
}
/**
* Returns output of all added variables to debug.
* @return string
*/
public static function getAll() {
if (!self::$_bEnabled) {
return '';
}
ob_start();
DebuggerFactory::getDebugger('visible_adv')->showAll();
$output = ob_get_contents();
ob_end_clean();
return $output;
}
/**
* Logs variable to debugger.
* Wrapper for <code>cDebug::getDebugger(cDebug::DEBUGGER_FILE)</code>.
*
* @param mixed $mVar The variable to log the contents
* @param string $sLabel Describtion for passed $mVar
*/
public static function log($mVar, $sLabel = '') {
if (!self::$_bEnabled) {
return;
}
DebuggerFactory::getDebugger('file')->show($mVar, $sLabel);
}
}

Datei anzeigen

@ -1,300 +0,0 @@
<?php
/**
* AMR test class
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewritetest.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Mod rewrite test class.
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
class ModRewriteTest {
/**
* Global $cfg array
* @var array
*/
protected $_aCfg;
/**
* Global $cfg['tab'] array
* @var array
*/
protected $_aCfgTab;
/**
* Max items to process
* @var int
*/
protected $_iMaxItems;
/**
* Actual resolved url
* @var string
*/
protected $_sResolvedUrl;
/**
* Routing found flag
* @var bool
*/
protected $_bRoutingFound = false;
/**
* Constuctor
* @param int $maxItems Max items (urls to articles/categories) to process
*/
public function __construct($maxItems) {
global $cfg;
$this->_aCfg = & $cfg;
$this->_aCfgTab = & $cfg['tab'];
$this->_iMaxItems = $maxItems;
}
/**
* Returns resolved URL
*
* @return bool Resolved URL
*/
public function getResolvedUrl() {
return $this->_sResolvedUrl;
}
/**
* Returns flagz about found routing
*
* @return bool
*/
public function getRoutingFoundState() {
return $this->_bRoutingFound;
}
/**
* Fetchs full structure of the installation (categories and articles) and returns it back.
*
* @param int $idclient Client id
* @param int $idlang Language id
* @return array Full structure as follows
* <code>
* $arr[idcat] = Category dataset
* $arr[idcat]['articles'][idart] = Article dataset
* </code>
*/
public function fetchFullStructure($idclient = null, $idlang = null) {
global $client, $lang;
$db = new DB_Contenido();
$db2 = new DB_Contenido();
if (!$idclient || (int) $idclient == 0) {
$idclient = $client;
}
if (!$idlang || (int) $idlang == 0) {
$idlang = $lang;
}
$aTab = $this->_aCfgTab;
$aStruct = array();
$sql = "SELECT
*
FROM
" . $aTab['cat_tree'] . " AS a,
" . $aTab['cat_lang'] . " AS b,
" . $aTab['cat'] . " AS c
WHERE
a.idcat = b.idcat AND
c.idcat = a.idcat AND
c.idclient = '" . $idclient . "' AND
b.idlang = '" . $idlang . "'
ORDER BY
a.idtree";
$db->query($sql);
$counter = 0;
while ($db->next_record()) {
if (++$counter == $this->_iMaxItems) {
break; // break this loop
}
$idcat = $db->f('idcat');
$aStruct[$idcat] = $db->Record;
$aStruct[$idcat]['articles'] = array();
$sql2 = "SELECT
*
FROM
" . $aTab['cat_art'] . " AS a,
" . $aTab['art'] . " AS b,
" . $aTab['art_lang'] . " AS c
WHERE
a.idcat = '" . $idcat . "' AND
b.idart = a.idart AND
c.idart = a.idart AND
c.idlang = '" . $idlang . "' AND
b.idclient = '" . $idclient . "'
ORDER BY
c.title ASC";
$db2->query($sql2);
while ($db2->next_record()) {
$idart = $db2->f('idart');
$aStruct[$idcat]['articles'][$idart] = $db2->Record;
if (++$counter == $this->_iMaxItems) {
break 2; // break this and also superior loop
}
}
}
return $aStruct;
}
/**
* Creates an URL using passed data.
*
* The result is used to generate seo urls...
*
* @param array $arr Assoziative array with some data as follows:
* <code>
* $arr['idcat']
* $arr['idart']
* $arr['idcatart']
* $arr['idartlang']
* </code>
* @param string $type Either 'c' or 'a' (category or article). If set to
* 'c' only the parameter idcat will be added to the URL
*/
public function composeURL($arr, $type) {
$type = ($type == 'a') ? 'a' : 'c';
$param = array();
if ($type == 'c') {
$param[] = 'idcat=' . $arr['idcat'];
} else {
if (mr_getRequest('idart')) {
$param[] = 'idart=' . $arr['idart'];
}
if (mr_getRequest('idcat')) {
$param[] = 'idcat=' . $arr['idcat'];
}
if (mr_getRequest('idcatart')) {
$param[] = 'idcatart=' . $arr['idcatart'];
}
if (mr_getRequest('idartlang')) {
$param[] = 'idartlang=' . $arr['idartlang'];
}
}
$param[] = 'foo=bar';
return 'front_content.php?' . implode('&amp;', $param);
}
/**
* Resolves variables of an page (idcat, idart, idclient, idlang, etc.) by
* processing passed url using ModRewriteController
*
* @param string $url Url to resolve
* @return array Assoziative array with resolved data
*/
public function resolveUrl($url) {
// some globals to reset
$aGlobs = array(
'mr_preprocessedPageError', 'idart', 'idcat'
);
foreach ($aGlobs as $p => $k) {
if (isset($GLOBALS[$k])) {
unset($GLOBALS[$k]);
}
}
$aReturn = array();
// create an mod rewrite controller instance and execute processing
$oMRController = new ModRewriteController($url);
$oMRController->execute();
if ($oMRController->errorOccured()) {
// an error occured (idcat and or idart couldn't catched by controller)
$aReturn['mr_preprocessedPageError'] = 1;
$aReturn['error'] = $oMRController->getError();
$this->_sResolvedUrl = '';
$this->_bRoutingFound = false;
} else {
// set some global variables
$this->_sResolvedUrl = $oMRController->getResolvedUrl();
$this->_bRoutingFound = $oMRController->getRoutingFoundState();
if ($oMRController->getClient()) {
$aReturn['client'] = $oMRController->getClient();
}
if ($oMRController->getChangeClient()) {
$aReturn['changeclient'] = $oMRController->getChangeClient();
}
if ($oMRController->getLang()) {
$aReturn['lang'] = $oMRController->getLang();
}
if ($oMRController->getChangeLang()) {
$aReturn['changelang'] = $oMRController->getChangeLang();
}
if ($oMRController->getIdArt()) {
$aReturn['idart'] = $oMRController->getIdArt();
}
if ($oMRController->getIdCat()) {
$aReturn['idcat'] = $oMRController->getIdCat();
}
if ($oMRController->getPath()) {
$aReturn['path'] = $oMRController->getPath();
}
}
return $aReturn;
}
/**
* Creates a readable string from passed resolved data array.
*
* @param array Assoziative array with resolved data
* @return string Readable resolved data
*/
public function getReadableResolvedData(array $data) {
// compose resolved string
$ret = '';
foreach ($data as $k => $v) {
$ret .= $k . '=' . $v . '; ';
}
$ret = substr($ret, 0, strlen($ret) - 2);
return $ret;
}
}

Datei anzeigen

@ -1,319 +0,0 @@
<?php
/**
* AMR url stack class
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewriteurlstack.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Mod rewrite url stack class. Provides features to collect urls and to get the
* pretty path and names of categories/articles at one go.
*
* Main goal of this class is to collect urls and to get the urlpath and urlname
* of the related categories/articles at one go. This will reduce the queries
* against the database.
* Therefore the full advantage will be taken by rewriting the urls at codeoutput
* in front_content.php, where you will be able to collect all urls at once...
*
* Usage:
* <code>
* // get the instance
* $oMRUrlStack = ModRewriteUrlStack::getInstance();
*
* // add several urls to fill the stack
* $oMRUrlStack->add('front_content.php?idcat=123');
* $oMRUrlStack->add('front_content.php?idart=321');
* $oMRUrlStack->add('front_content.php?idcatart=213');
* $oMRUrlStack->add('front_content.php?idcatlang=213');
* $oMRUrlStack->add('front_content.php?idartlang=312');
*
* // now the first call will get the pretty path and names from database at one go
* $aPrettyParts = $oMRUrlStack->getPrettyUrlParts('front_content.php?idcat=123');
* echo $aPrettyParts['urlpath']; // something like 'Main-category-name/Category-name/Another-category-name/'
* echo $aPrettyParts['urlname']; // something like 'Name-of-an-article'
* </code>
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
class ModRewriteUrlStack {
/**
* Self instance
*
* @var ModRewriteUrlStack
*/
private static $_instance;
/**
* Database object
*
* @var DB_Contenido
*/
private $_oDb;
/**
* Array for urls
*
* @var array
*/
private $_aUrls = array();
/**
* Url stack array
*
* @var array
*/
private $_aStack = array();
/**
* CONTENIDO related parameter array
*
* @var array
*/
private $_aConParams = array(
'idcat' => 1, 'idart' => 1, 'lang' => 1, 'idcatlang' => 1, 'idcatart' => 1, 'idartlang' => 1
);
/**
* Database tables array
*
* @var array
*/
private $_aTab;
/**
* Language id
*
* @var int
*/
private $_idLang;
/**
* Constructor, sets some properties.
*/
private function __construct() {
global $cfg, $lang;
$this->_oDb = new DB_Contenido();
$this->_aTab = $cfg['tab'];
$this->_idLang = $lang;
}
/**
* Returns a instance of ModRewriteUrlStack (singleton implementation)
*
* @return ModRewriteUrlStack
*/
public static function getInstance() {
if (self::$_instance == null) {
self::$_instance = new ModRewriteUrlStack();
}
return self::$_instance;
}
/**
* Adds an url to the stack
*
* @param string Url, like front_content.php?idcat=123...
*/
public function add($url) {
$url = ModRewrite::urlPreClean($url);
if (isset($this->_aUrls[$url])) {
return;
}
$aUrl = $this->_extractUrl($url);
// cleanup parameter
foreach ($aUrl['params'] as $p => $v) {
if (!isset($this->_aConParams[$p])) {
unset($aUrl['params'][$p]);
} else {
$aUrl['params'][$p] = (int) $v;
}
}
// add language id, if not available
if ((int) mr_arrayValue($aUrl['params'], 'lang') == 0) {
$aUrl['params']['lang'] = $this->_idLang;
}
$sStackId = $this->_makeStackId($aUrl['params']);
$this->_aUrls[$url] = $sStackId;
$this->_aStack[$sStackId] = array('params' => $aUrl['params']);
}
/**
* Returns the pretty urlparts (only category path an article name) of the
* desired url.
*
* @param string Url, like front_content.php?idcat=123...
* @return array Assoziative array like
* <code>
* $arr['urlpath']
* $arr['urlname']
* </code>
*/
public function getPrettyUrlParts($url) {
$url = ModRewrite::urlPreClean($url);
if (!isset($this->_aUrls[$url])) {
$this->add($url);
}
$sStackId = $this->_aUrls[$url];
if (!isset($this->_aStack[$sStackId]['urlpath'])) {
$this->_chunkSetPrettyUrlParts($sStackId);
}
$aPretty = array(
'urlpath' => $this->_aStack[$sStackId]['urlpath'],
'urlname' => $this->_aStack[$sStackId]['urlname']
);
return $aPretty;
}
/**
* Extracts passed url using parse_urla and adds also the 'params' array to it
*
* @param string Url, like front_content.php?idcat=123...
* @return array Components containing result of parse_url with additional
* 'params' array
*/
private function _extractUrl($url) {
$aUrl = @parse_url($url);
if (isset($aUrl['query'])) {
$aUrl['query'] = str_replace('&amp;', '&', $aUrl['query']);
parse_str($aUrl['query'], $aUrl['params']);
}
if (!isset($aUrl['params']) && !is_array($aUrl['params'])) {
$aUrl['params'] = array();
}
return $aUrl;
}
/**
* Extracts article or category related parameter from passed params array
* and generates an identifier.
*
* @param array $aParams Parameter array
* @return string Composed stack id
*/
private function _makeStackId(array $aParams) {
# idcatart
if ((int) mr_arrayValue($aParams, 'idart') > 0) {
$sStackId = 'idart_' . $aParams['idart'] . '_lang_' . $aParams['lang'];
} elseif ((int) mr_arrayValue($aParams, 'idartlang') > 0) {
$sStackId = 'idartlang_' . $aParams['idartlang'];
} elseif ((int) mr_arrayValue($aParams, 'idcatart') > 0) {
$sStackId = 'idcatart_' . $aParams['idcatart'] . '_lang_' . $aParams['lang'];
} elseif ((int) mr_arrayValue($aParams, 'idcat') > 0) {
$sStackId = 'idcat_' . $aParams['idcat'] . '_lang_' . $aParams['lang'];
} elseif ((int) mr_arrayValue($aParams, 'idcatlang') > 0) {
$sStackId = 'idcatlang_' . $aParams['idcatlang'];
} else {
$sStackId = 'lang_' . $aParams['lang'];
}
return $sStackId;
}
/**
* Main function to get the urlparts of urls.
*
* Composes the query by looping thru stored but non processed urls, executes
* the query and adds the (urlpath and urlname) result to the stack.
*
* @param type $sStackId
* @return type
*/
private function _chunkSetPrettyUrlParts($sStackId) {
// collect stack parameter to get urlpath and urlname
$aStack = array();
foreach ($this->_aStack as $stackId => $item) {
if (!isset($item['urlpath'])) {
// pretty url is to create
$aStack[$stackId] = $item;
}
}
// now, it's time to compose the where clause of the query
$sWhere = '';
foreach ($aStack as $stackId => $item) {
if ($stackId == $sStackId) {
$aP = $item['params'];
if ((int) mr_arrayValue($aP, 'idart') > 0) {
$sWhere .= '(al.idart = ' . $aP['idart'] . ' AND al.idlang = ' . $aP['lang'] . ') OR ';
} elseif ((int) mr_arrayValue($aP, 'idartlang') > 0) {
$sWhere .= '(al.idartlang = ' . $aP['idartlang'] . ') OR ';
} elseif ((int) mr_arrayValue($aP, 'idcat') > 0) {
$sWhere .= '(cl.idcat = ' . $aP['idcat'] . ' AND cl.idlang = ' . $aP['lang'] . ' AND cl.startidartlang = al.idartlang) OR ';
} elseif ((int) mr_arrayValue($aP, 'idcatart') > 0) {
$sWhere .= '(ca.idcatart = ' . $aP['idcatart'] . ' AND ca.idart = al.idart AND al.idlang = ' . $aP['lang'] . ') OR ';
} elseif ((int) mr_arrayValue($aP, 'idcatlang') > 0) {
$sWhere .= '(cl.idcatlang = ' . $aP['idcatlang'] . ' AND cl.startidartlang = al.idartlang) OR ';
}
}
}
if ($sWhere == '') {
return;
}
$sWhere = cString::getPartOfString($sWhere, 0, -4);
$sWhere = str_replace(' OR ', " OR \n", $sWhere);
// compose query and execute it
$sql = <<<SQL
SELECT
al.idartlang, al.idart, al.idlang as lang, al.urlname, cl.idcatlang, cl.idcat,
cl.urlpath, ca.idcatart
FROM
{$this->_aTab['art_lang']} AS al, {$this->_aTab['cat_lang']} AS cl, {$this->_aTab['cat_art']} AS ca
WHERE
al.idart = ca.idart AND
ca.idcat = cl.idcat AND
al.idlang = cl.idlang AND
( $sWhere )
SQL;
ModRewriteDebugger::add($sql, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $sql');
$aNewStack = array();
// create array of fields, which are to reduce step by step from record set below
$aFields = array('', 'idart', 'idartlang', 'idcatart', 'idcat');
$this->_oDb->query($sql);
while ($this->_oDb->next_record()) {
$aRS = $this->_oDb->Record;
// loop thru fields array
foreach ($aFields as $field) {
if (isset($aRS[$field])) {
// reduce existing field
unset($aRS[$field]);
}
$rsStackID = $this->_makeStackId($aRS);
if (isset($aStack[$rsStackID])) {
// matching stack entry found, add urlpath and urlname to the new stack
$aNewStack[$rsStackID]['urlpath'] = $aRS['urlpath'];
$aNewStack[$rsStackID]['urlname'] = $aRS['urlname'];
break;
}
}
}
ModRewriteDebugger::add($aNewStack, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $aNewStack');
ModRewriteDebugger::add($this->_aStack, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $this->_aStack');
$this->_aStack = array_merge($this->_aStack, $aNewStack);
}
}

Datei anzeigen

@ -1,306 +0,0 @@
<?php
/**
* AMR url utility class
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewriteurlutil.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Mod Rewrite url utility class. Handles convertion of Urls from CONTENIDO core
* based url composition pattern to AMR (Advanced Mod Rewrite) url composition
* pattern and vice versa.
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
class ModRewriteUrlUtil extends ModRewriteBase {
/**
* Self instance (singleton implementation)
* @var ModRewriteUrlUtil
*/
private static $_instance;
/**
* CONTENIDO category word separator
* @var string
*/
private $_catWordSep = '-';
/**
* AMR category word separator
* @var string
*/
private $_mrCatWordSep;
/**
* CONTENIDO category separator
* @var string
*/
private $_catSep = '/';
/**
* AMR category separator
* @var string
*/
private $_mrCatSep;
/**
* CONTENIDO article separator
* @var string
*/
private $_artSep = '/';
/**
* AMR article separator
* @var string
*/
private $_mrArtSep;
/**
* CONTENIDO article word separator
* @var string
*/
private $_artWordSep = '-';
/**
* AMR article word separator
* @var string
*/
private $_mrArtWordSep;
/**
* AMR extension used for articlenames (e. g. .html)
* @var string
*/
private $_mrExt;
/**
* Constructor, sets some AMR configuration related properties
*/
private function __construct() {
$aCfg = parent::getConfig();
$this->_mrCatWordSep = $aCfg['category_word_seperator'];
$this->_mrCatSep = $aCfg['category_seperator'];
$this->_mrArtSep = $aCfg['article_seperator'];
$this->_mrArtWordSep = $aCfg['article_word_seperator'];
$this->_mrExt = $aCfg['file_extension'];
}
/**
* Prevent cloning
*/
private function __clone() {
}
/**
* Returns self instance (singleton pattern)
* @return ModRewriteUrlUtil
*/
public static function getInstance() {
if (self::$_instance == null) {
self::$_instance = new ModRewriteUrlUtil();
}
return self::$_instance;
}
/**
* Converts passed AMR url path to CONTENIDO url path.
*
* @param string $urlPath AMR url path
* @return string CONTENIDO url path
*/
public function toContenidoUrlPath($urlPath) {
$newUrlPath = $this->_toUrlPath(
$urlPath, $this->_mrCatSep, $this->_catSep, $this->_mrCatWordSep, $this->_catWordSep, $this->_mrArtSep, $this->_artSep
);
return $newUrlPath;
}
/**
* Converts passed CONTENIDO url path to AMR url path.
*
* @param string $urlPath CONTENIDO url path
* @return string AMR url path
*/
public function toModRewriteUrlPath($urlPath) {
$newUrlPath = $this->_toUrlPath(
$urlPath, $this->_catSep, $this->_mrCatSep, $this->_catWordSep, $this->_mrCatWordSep, $this->_artSep, $this->_mrArtSep
);
return $newUrlPath;
}
/**
* Converts passed url path to a another url path (CONTENIDO to AMR and vice versa).
*
* @param string $urlPath Source url path
* @param string $fromCatSep Source category seperator
* @param string $toCatSep Destination category seperator
* @param string $fromCatWordSep Source category word seperator
* @param string $toCatWordSep Destination category word seperator
* @param string $fromArtSep Source article seperator
* @param string $toArtSep Destination article seperator
* @return string Destination url path
*/
private function _toUrlPath($urlPath, $fromCatSep, $toCatSep, $fromCatWordSep, $toCatWordSep, $fromArtSep, $toArtSep) {
if ((string) $urlPath == '') {
return $urlPath;
}
if (substr($urlPath, -1) == $fromArtSep) {
$urlPath = substr($urlPath, 0, -1) . '{TAS}';
}
// pre replace category word seperator and category seperator
$urlPath = str_replace($fromCatWordSep, '{CWS}', $urlPath);
$urlPath = str_replace($fromCatSep, '{CS}', $urlPath);
// replace category word seperator
$urlPath = str_replace('{CWS}', $toCatWordSep, $urlPath);
$urlPath = str_replace('{CS}', $toCatSep, $urlPath);
$urlPath = str_replace('{TAS}', $toArtSep, $urlPath);
return $urlPath;
}
/**
* Converts passed AMR url name to CONTENIDO url name.
*
* @param string $urlName AMR url name
* @return string CONTENIDO url name
*/
public function toContenidoUrlName($urlName) {
$newUrlName = $this->_toUrlName($urlName, $this->_mrArtWordSep, $this->_artWordSep);
return $newUrlName;
}
/**
* Converts passed CONTENIDO url name to AMR url name.
*
* @param string $urlName CONTENIDO url name
* @return string AMR url name
*/
public function toModRewriteUrlName($urlName) {
$newUrlName = $this->_toUrlName($urlName, $this->_artWordSep, $this->_mrArtWordSep);
return $newUrlName;
}
/**
* Converts passed url name to a another url name (CONTENIDO to AMR and vice versa).
*
* @param string $urlName Source url name
* @param string $fromArtWordSep Source article word seperator
* @param string $toArtWordSep Destination article word seperator
* @return string Destination url name
*/
private function _toUrlName($urlName, $fromArtWordSep, $toArtWordSep) {
if ((string) $urlName == '') {
return $urlName;
}
$urlName = str_replace($this->_mrExt, '{EXT}', $urlName);
// replace article word seperator
$urlName = str_replace($fromArtWordSep, $toArtWordSep, $urlName);
$urlName = str_replace('{EXT}', $this->_mrExt, $urlName);
return $urlName;
}
/**
* Converts passed AMR url to CONTENIDO url.
*
* @param string $url AMR url
* @return string CONTENIDO url
*/
public function toContenidoUrl($url) {
if (strpos($url, $this->_mrExt) === false) {
$newUrl = $this->toContenidoUrlPath($url);
} else {
// replace category word and article word seperator
$path = substr($url, 0, strrpos($url, $this->_mrArtSep) + 1);
$name = substr($url, strrpos($url, $this->_mrArtSep) + 1);
$newUrl = $this->toContenidoUrlPath($path) . $this->toContenidoUrlName($name);
}
return $newUrl;
}
/**
* Converts passed AMR url to CONTENIDO url.
*
* @param string $url AMR url
* @return string CONTENIDO url
*/
public function toModRewriteUrl($url) {
if (strpos($url, $this->_mrExt) === false) {
$newUrl = $this->toModRewriteUrlPath($url);
} else {
// replace category word and article word seperator
$path = substr($url, 0, strrpos($url, $this->_artSep) + 1);
$name = substr($url, strrpos($url, $this->_artSep) + 1);
$newUrl = $this->toModRewriteUrlPath($path) . $this->toModRewriteUrlName($name);
}
return $newUrl;
}
/**
* Converts passed url to a another url (CONTENIDO to AMR and vice versa).
*
* @param string $url Source url
* @param string $fromCatSep Source category seperator
* @param string $toCatSep Destination category seperator
* @param string $fromCatWordSep Source category word seperator
* @param string $toCatWordSep Destination category word seperator
* @param string $fromArtSep Source article seperator
* @param string $toArtSep Destination article seperator
* @param string $fromArtWordSep Source article word seperator
* @param string $toArtWordSep Destination article word seperator
* @return string Destination url
*
* @deprecated No more used, is to delete
*/
private function _toUrl($url, $fromCatSep, $toCatSep, $fromCatWordSep, $toCatWordSep, $fromArtSep, $toArtSep, $fromArtWordSep, $toArtWordSep) {
if ((string) $url == '') {
return $url;
}
$url = str_replace($this->_mrExt, '{EXT}', $url);
// replace category seperator
$url = str_replace($fromCatSep, $toCatSep, $url);
// replace article seperator
$url = str_replace($fromArtSep, $toArtSep, $url);
$url = str_replace('{EXT}', $this->_mrExt, $url);
if (strpos($url, $this->_mrExt) === false) {
// no articlename, replace category word seperator
$url = str_replace($fromCatWordSep, $toCatWordSep, $url);
} else {
// replace category word and article word seperator
$path = str_replace($fromCatWordSep, $toCatWordSep, substr($url, 0, strrpos($url, $toArtSep) + 1));
$file = str_replace($fromArtWordSep, $toArtWordSep, substr($url, strrpos($url, $toArtSep) + 1));
$url = $path . $file;
}
return $url;
}
}

Datei anzeigen

@ -1,426 +0,0 @@
<?php
/**
* AMR Content controller class
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewrite_content_controller.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Content controller for general settings.
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
/**
* Index action
*/
public function indexAction() {
// donut
$this->_doChecks();
}
/**
* Save settings action
*/
public function saveAction() {
$bDebug = $this->getProperty('bDebug');
$aSeparator = $this->getProperty('aSeparator');
$aWordSeparator = $this->getProperty('aWordSeparator');
$routingSeparator = $this->getProperty('routingSeparator');
$bError = false;
$aMR = array();
$request = (count($_POST) > 0) ? $_POST : $_GET;
mr_requestCleanup($request);
// use cl-mod-rewrite
if (mr_arrayValue($request, 'use') == 1) {
$this->_oView->use_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['use'] = 1;
} else {
$this->_oView->use_chk = '';
$aMR['cl-mod-rewrite']['use'] = 0;
}
// root dir
if (mr_arrayValue($request, 'rootdir', '') !== '') {
if (!preg_match('/^[a-zA-Z0-9\-_\/\.]*$/', $request['rootdir'])) {
$sMsg = i18n("The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\-_\/\.]", "cl-mod-rewrite");
$this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!is_dir($_SERVER['DOCUMENT_ROOT'] . $request['rootdir'])) {
if (mr_arrayValue($request, 'checkrootdir') == 1) {
// root dir check is enabled, this results in error
$sMsg = i18n("The specified directory '%s' does not exists", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $_SERVER['DOCUMENT_ROOT'] . $request['rootdir']);
$this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} else {
// root dir check ist disabled, take over the setting and
// output a warning.
$sMsg = i18n("The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends DOCUMENT_ROOT. However, the setting will be taken over because of disabled check.", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $request['rootdir'], $_SERVER['DOCUMENT_ROOT']);
$this->_oView->rootdir_error = $this->_notifyBox('warning', $sMsg);
}
}
$this->_oView->rootdir = conHtmlentities($request['rootdir']);
$aMR['cl-mod-rewrite']['rootdir'] = $request['rootdir'];
}
// root dir check
if (mr_arrayValue($request, 'checkrootdir') == 1) {
$this->_oView->checkrootdir_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['checkrootdir'] = 1;
} else {
$this->_oView->checkrootdir_chk = '';
$aMR['cl-mod-rewrite']['checkrootdir'] = 0;
}
// start from root
if (mr_arrayValue($request, 'startfromroot') == 1) {
$this->_oView->startfromroot_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['startfromroot'] = 1;
} else {
$this->_oView->startfromroot_chk = '';
$aMR['cl-mod-rewrite']['startfromroot'] = 0;
}
// prevent duplicated content
if (mr_arrayValue($request, 'prevent_duplicated_content') == 1) {
$this->_oView->prevent_duplicated_content_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['prevent_duplicated_content'] = 1;
} else {
$this->_oView->prevent_duplicated_content_chk = '';
$aMR['cl-mod-rewrite']['prevent_duplicated_content'] = 0;
}
// language settings
if (mr_arrayValue($request, 'use_language') == 1) {
$this->_oView->use_language_chk = ' checked="checked"';
$this->_oView->use_language_name_disabled = '';
$aMR['cl-mod-rewrite']['use_language'] = 1;
if (mr_arrayValue($request, 'use_language_name') == 1) {
$this->_oView->use_language_name_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['use_language_name'] = 1;
} else {
$this->_oView->use_language_name_chk = '';
$aMR['cl-mod-rewrite']['use_language_name'] = 0;
}
} else {
$this->_oView->use_language_chk = '';
$this->_oView->use_language_name_chk = '';
$this->_oView->use_language_name_disabled = ' disabled="disabled"';
$aMR['cl-mod-rewrite']['use_language'] = 0;
$aMR['cl-mod-rewrite']['use_language_name'] = 0;
}
// client settings
if (mr_arrayValue($request, 'use_client') == 1) {
$this->_oView->use_client_chk = ' checked="checked"';
$this->_oView->use_client_name_disabled = '';
$aMR['cl-mod-rewrite']['use_client'] = 1;
if (mr_arrayValue($request, 'use_client_name') == 1) {
$this->_oView->use_client_name_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['use_client_name'] = 1;
} else {
$this->_oView->use_client_name_chk = '';
$aMR['cl-mod-rewrite']['use_client_name'] = 0;
}
} else {
$this->_oView->use_client_chk = '';
$this->_oView->use_client_name_chk = '';
$this->_oView->use_client_name_disabled = ' disabled="disabled"';
$aMR['cl-mod-rewrite']['use_client'] = 0;
$aMR['cl-mod-rewrite']['use_client_name'] = 0;
}
// use lowercase uri
if (mr_arrayValue($request, 'use_lowercase_uri') == 1) {
$this->_oView->use_lowercase_uri_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['use_lowercase_uri'] = 1;
} else {
$this->_oView->use_lowercase_uri_chk = '';
$aMR['cl-mod-rewrite']['use_lowercase_uri'] = 0;
}
$this->_oView->category_separator_attrib = '';
$this->_oView->category_word_separator_attrib = '';
$this->_oView->article_separator_attrib = '';
$this->_oView->article_word_separator_attrib = '';
$separatorPattern = $aSeparator['pattern'];
$separatorInfo = $aSeparator['info'];
$wordSeparatorPattern = $aSeparator['pattern'];
$wordSeparatorInfo = $aSeparator['info'];
$categorySeperator = mr_arrayValue($request, 'category_seperator', '');
$categoryWordSeperator = mr_arrayValue($request, 'category_word_seperator', '');
$articleSeperator = mr_arrayValue($request, 'article_seperator', '');
$articleWordSeperator = mr_arrayValue($request, 'article_word_seperator', '');
// category seperator
if ($categorySeperator == '') {
$sMsg = i18n("Please specify separator (%s) for category", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $separatorInfo);
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!preg_match($separatorPattern, $categorySeperator)) {
$sMsg = i18n("Invalid separator for category, allowed one of following characters: %s", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $separatorInfo);
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// category word seperator
} elseif ($categoryWordSeperator == '') {
$sMsg = i18n("Please specify separator (%s) for category words", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!preg_match($wordSeparatorPattern, $categoryWordSeperator)) {
$sMsg = i18n("Invalid separator for category words, allowed one of following characters: %s", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// article seperator
} elseif ($articleSeperator == '') {
$sMsg = i18n("Please specify separator (%s) for article", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $separatorInfo);
$this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!preg_match($separatorPattern, $articleSeperator)) {
$sMsg = i18n("Invalid separator for article, allowed is one of following characters: %s", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $separatorInfo);
$this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// article word seperator
} elseif ($articleWordSeperator == '') {
$sMsg = i18n("Please specify separator (%s) for article words", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!preg_match($wordSeparatorPattern, $articleWordSeperator)) {
$sMsg = i18n("Invalid separator for article words, allowed is one of following characters: %s", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// category_seperator - category_word_seperator
} elseif ($categorySeperator == $categoryWordSeperator) {
$sMsg = i18n("Separator for category and category words must not be identical", "cl-mod-rewrite");
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// category_seperator - article_word_seperator
} elseif ($categorySeperator == $articleWordSeperator) {
$sMsg = i18n("Separator for category and article words must not be identical", "cl-mod-rewrite");
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// article_seperator - article_word_seperator
} elseif ($articleSeperator == $articleWordSeperator) {
$sMsg = i18n("Separator for category-article and article words must not be identical", "cl-mod-rewrite");
$this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
}
$this->_oView->category_separator = conHtmlentities($categorySeperator);
$aMR['cl-mod-rewrite']['category_seperator'] = $categorySeperator;
$this->_oView->category_word_separator = conHtmlentities($categoryWordSeperator);
$aMR['cl-mod-rewrite']['category_word_seperator'] = $categoryWordSeperator;
$this->_oView->article_separator = conHtmlentities($articleSeperator);
$aMR['cl-mod-rewrite']['article_seperator'] = $articleSeperator;
$this->_oView->article_word_separator = conHtmlentities($articleWordSeperator);
$aMR['cl-mod-rewrite']['article_word_seperator'] = $articleWordSeperator;
// file extension
if (mr_arrayValue($request, 'file_extension', '') !== '') {
if (!preg_match('/^\.([a-zA-Z0-9\-_\/])*$/', $request['file_extension'])) {
$sMsg = i18n("The file extension has a invalid format, allowed are the chars \.([a-zA-Z0-9\-_\/])", "cl-mod-rewrite");
$this->_oView->file_extension_error = $this->_notifyBox('error', $sMsg);
$bError = true;
}
$this->_oView->file_extension = conHtmlentities($request['file_extension']);
$aMR['cl-mod-rewrite']['file_extension'] = $request['file_extension'];
} else {
$this->_oView->file_extension = '.html';
$aMR['cl-mod-rewrite']['file_extension'] = '.html';
}
// category resolve min percentage
if (isset($request['category_resolve_min_percentage'])) {
if (!is_numeric($request['category_resolve_min_percentage'])) {
$sMsg = i18n("Value has to be numeric.", "cl-mod-rewrite");
$this->_oView->category_resolve_min_percentage_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif ($request['category_resolve_min_percentage'] < 0 || $request['category_resolve_min_percentage'] > 100) {
$sMsg = i18n("Value has to be between 0 an 100.", "cl-mod-rewrite");
$this->_oView->category_resolve_min_percentage_error = $this->_notifyBox('error', $sMsg);
$bError = true;
}
$this->_oView->category_resolve_min_percentage = $request['category_resolve_min_percentage'];
$aMR['cl-mod-rewrite']['category_resolve_min_percentage'] = $request['category_resolve_min_percentage'];
} else {
$this->_oView->category_resolve_min_percentage = '75';
$aMR['cl-mod-rewrite']['category_resolve_min_percentage'] = '75';
}
// add start article name to url
if (mr_arrayValue($request, 'add_startart_name_to_url') == 1) {
$this->_oView->add_startart_name_to_url_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['add_startart_name_to_url'] = 1;
if (mr_arrayValue($request, 'add_startart_name_to_url', '') !== '') {
if (!preg_match('/^[a-zA-Z0-9\-_\/\.]*$/', $request['default_startart_name'])) {
$sMsg = i18n("The article name has a invalid format, allowed are the chars /^[a-zA-Z0-9\-_\/\.]*$/", "cl-mod-rewrite");
$this->_oView->add_startart_name_to_url_error = $this->_notifyBox('error', $sMsg);
$bError = true;
}
$this->_oView->default_startart_name = conHtmlentities($request['default_startart_name']);
$aMR['cl-mod-rewrite']['default_startart_name'] = $request['default_startart_name'];
} else {
$this->_oView->default_startart_name = '';
$aMR['cl-mod-rewrite']['default_startart_name'] = '';
}
} else {
$this->_oView->add_startart_name_to_url_chk = '';
$aMR['cl-mod-rewrite']['add_startart_name_to_url'] = 0;
$this->_oView->default_startart_name = '';
$aMR['cl-mod-rewrite']['default_startart_name'] = '';
}
// rewrite urls at
if (mr_arrayValue($request, 'rewrite_urls_at') == 'congeneratecode') {
$this->_oView->rewrite_urls_at_congeneratecode_chk = ' checked="checked"';
$this->_oView->rewrite_urls_at_front_content_output_chk = '';
$aMR['cl-mod-rewrite']['rewrite_urls_at_congeneratecode'] = 1;
$aMR['cl-mod-rewrite']['rewrite_urls_at_front_content_output'] = 0;
} else {
$this->_oView->rewrite_urls_at_congeneratecode_chk = '';
$this->_oView->rewrite_urls_at_front_content_output_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['rewrite_urls_at_congeneratecode'] = 0;
$aMR['cl-mod-rewrite']['rewrite_urls_at_front_content_output'] = 1;
}
// routing
if (isset($request['rewrite_routing'])) {
$aRouting = array();
$items = explode("\n", $request['rewrite_routing']);
foreach ($items as $p => $v) {
$routingDef = explode($routingSeparator, $v);
if (count($routingDef) !== 2) {
continue;
}
$routingDef[0] = trim($routingDef[0]);
$routingDef[1] = trim($routingDef[1]);
if ($routingDef[0] == '') {
continue;
}
$aRouting[$routingDef[0]] = $routingDef[1];
}
$this->_oView->rewrite_routing = conHtmlentities($request['rewrite_routing']);
$aMR['cl-mod-rewrite']['routing'] = $aRouting;
} else {
$this->_oView->rewrite_routing = '';
$aMR['cl-mod-rewrite']['routing'] = array();
}
// redirect invalid article to errorsite
if (isset($request['redirect_invalid_article_to_errorsite'])) {
$this->_oView->redirect_invalid_article_to_errorsite_chk = ' checked="checked"';
$aMR['cl-mod-rewrite']['redirect_invalid_article_to_errorsite'] = 1;
} else {
$this->_oView->redirect_invalid_article_to_errorsite_chk = '';
$aMR['cl-mod-rewrite']['redirect_invalid_article_to_errorsite'] = 0;
}
if ($bError) {
$sMsg = i18n("Please check your input", "cl-mod-rewrite");
$this->_oView->content_before .= $this->_notifyBox('error', $sMsg);
return;
}
if ($bDebug == true) {
echo $this->_notifyBox('info', 'Debug');
echo '<pre class="example">';
print_r($aMR['cl-mod-rewrite']);
echo '</pre>';
$sMsg = i18n("Configuration has <b>not</b> been saved, because of enabled debugging", "cl-mod-rewrite");
echo $this->_notifyBox('info', $sMsg);
return;
}
$bSeparatorModified = $this->_separatorModified($aMR['cl-mod-rewrite']);
if (mr_setConfiguration($this->_client, $aMR)) {
$sMsg = i18n("Configuration has been saved", "cl-mod-rewrite");
if ($bSeparatorModified) {
mr_loadConfiguration($this->_client, true);
}
$this->_oView->content_before .= $this->_notifyBox('info', $sMsg);
} else {
$sMsg = i18n("Configuration could not saved. Please check write permissions for %s ", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $options['key']);
$this->_oView->content_before .= $this->_notifyBox('error', $sMsg);
}
}
/**
* Checks, if any sseparators setting is modified or not
* @param array $aNewCfg New configuration send by requests.
* @return bool
*/
protected function _separatorModified($aNewCfg) {
$aCfg = ModRewrite::getConfig();
if ($aCfg['category_seperator'] != $aNewCfg['category_seperator']) {
return true;
} elseif ($aCfg['category_word_seperator'] != $aNewCfg['category_word_seperator']) {
return true;
} elseif ($aCfg['article_seperator'] != $aNewCfg['article_seperator']) {
return true;
} elseif ($aCfg['article_word_seperator'] != $aNewCfg['article_word_seperator']) {
return true;
}
return false;
}
/**
* Does some checks like 'is_start_compatible' check.
* Adds notifications, if something will went wrong...
*/
protected function _doChecks() {
// Check for not supported '$cfg["is_start_compatible"] = true;' mode
if (!empty($this->_cfg['is_start_compatible']) && true === $this->_cfg['is_start_compatible']) {
$sMsg = i18n("Your Contenido installation runs with the setting 'is_start_compatible'. This plugin will not work properly in this mode.<br />Please check following topic in Contenido forum to change this:<br /><br /><a href='http://forum.contenido.org/viewtopic.php?t=32530' class='blue' target='_blank'>is_start_compatible auf neue Version umstellen</a>", "cl-mod-rewrite");
$this->_oView->content_before .= $this->_notifyBox('warning', $sMsg);
}
// Check for empty urlpath entries in cat_lang table
$db = new DB_Contenido();
$sql = "SELECT idcatlang FROM " . $this->_cfg['tab']['cat_lang'] . " WHERE urlpath = ''";
if ($db->query($sql) && $db->next_record()) {
$sMsg = i18n("It seems as if some categories don't have a set 'urlpath' entry in the database. Please reset empty aliases in %sFunctions%s area.", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, '<a href="main.php?area=mod_rewrite_expert&frame=4&contenido=' . $this->_oView->sessid . '&idclient=' . $this->_client . '" onclick="parent.right_top.sub.clicked(parent.right_top.document.getElementById(\'c_1\').firstChild);">', '</a>');
$this->_oView->content_before .= $this->_notifyBox('warning', $sMsg);
}
}
}

Datei anzeigen

@ -1,143 +0,0 @@
<?php
/**
* AMR Content expert controller class
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewrite_contentexpert_controller.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Content expert controller for expert settings/actions.
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
class ModRewrite_ContentExpertController extends ModRewrite_ControllerAbstract {
/**
* Path to restrictive htaccess file
* @var string
*/
protected $_htaccessRestrictive = '';
/**
* Path to simple htaccess file
* @var string
*/
protected $_htaccessSimple = '';
/**
* Initializer method, sets the paths to htaccess files
*/
public function init() {
$this->_oView->content_before = '';
$pluginPath = $this->_cfg['path']['contenido'] . $this->_cfg['path']['plugins'] . 'cl-mod-rewrite/';
$this->_htaccessRestrictive = $pluginPath . 'files/htaccess_restrictive.txt';
$this->_htaccessSimple = $pluginPath . 'files/htaccess_simple.txt';
}
/**
* Index action
*/
public function indexAction() {
}
/**
* Copy htaccess action
*/
public function copyHtaccessAction() {
$type = $this->_getParam('htaccesstype');
$copy = $this->_getParam('copy');
if ($type != 'restrictive' && $type != 'simple') {
return;
} elseif ($copy != 'contenido' && $copy != 'cms') {
return;
}
$aInfo = $this->getProperty('htaccessInfo');
if ($aInfo['has_htaccess']) {
$this->_oView->content_before = $this->_notifyBox('info', 'Die .htaccess existiert bereits im Contenido-/ oder Mandantenverzeichnis, daher wird es nicht kopiert');
return;
}
if ($type == 'restrictive') {
$source = $this->_htaccessRestrictive;
} else {
$source = $this->_htaccessSimple;
}
if ($copy == 'contenido') {
$dest = $aInfo['contenido_full_path'] . '.htaccess';
} else {
$dest = $aInfo['client_full_path'] . '.htaccess';
}
if (!$result = @copy($source, $dest)) {
$this->_oView->content_before = $this->_notifyBox('info', 'Die .htaccess konnte nicht von ' . $source . ' nach ' . $dest . ' kopiert werden!');
return;
}
$msg = 'Die .htaccess wurde erfolgreich nach ' . str_replace('.htaccess', '', $dest) . ' kopiert';
$this->_oView->content_before = $this->_notifyBox('info', $msg);
}
/**
* Download htaccess action
*/
public function downloadHtaccessAction() {
$type = $this->_getParam('htaccesstype');
if ($type != 'restrictive' && $type != 'simple') {
return;
}
if ($type == 'restrictive') {
$source = $this->_htaccessRestrictive;
} else {
$source = $this->_htaccessSimple;
}
$this->_oView->content = file_get_contents($source);
header('Content-Type: text/plain');
header('Etag: ' . md5(mt_rand()));
header('Content-Disposition: attachment; filename="' . $type . '.htaccess"');
$this->render('{CONTENT}');
}
/**
* Reset aliases action
*/
public function resetAction() {
// recreate all aliases
ModRewrite::recreateAliases(false);
$this->_oView->content_before = $this->_notifyBox('info', 'Alle Aliase wurden zur&uuml;ckgesetzt');
}
/**
* Reset only empty aliases action
*/
public function resetEmptyAction() {
// recreate only empty aliases
ModRewrite::recreateAliases(true);
$this->_oView->content_before = $this->_notifyBox('info', 'Nur leere Aliase wurden zur&uuml;ckgesetzt');
}
}

Datei anzeigen

@ -1,176 +0,0 @@
<?php
/**
* AMR test controller
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewrite_contenttest_controller.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Content controller to run tests.
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
class ModRewrite_ContentTestController extends ModRewrite_ControllerAbstract {
/**
* Number of max items to process
* @var int
*/
protected $_iMaxItems = 0;
/**
* Initializer method, sets some view variables
*/
public function init() {
$this->_oView->content = '';
$this->_oView->form_idart_chk = ($this->_getParam('idart')) ? ' checked="checked"' : '';
$this->_oView->form_idcat_chk = ($this->_getParam('idcat')) ? ' checked="checked"' : '';
$this->_oView->form_idcatart_chk = ($this->_getParam('idcatart')) ? ' checked="checked"' : '';
$this->_oView->form_idartlang_chk = ($this->_getParam('idartlang')) ? ' checked="checked"' : '';
$this->_oView->form_maxitems = (int) $this->_getParam('maxitems', 200);
$this->_iMaxItems = $this->_oView->form_maxitems;
}
/**
* Index action
*/
public function indexAction() {
$this->_oView->content = '';
}
/**
* Test action
*/
public function testAction() {
$this->_oView->content = '';
// Array for testcases
$aTests = array();
// Instance of mr test
$oMRTest = new ModRewriteTest($this->_iMaxItems);
$startTime = getmicrotime();
// Fetch complete CONTENIDO page structure
$aStruct = $oMRTest->fetchFullStructure();
ModRewriteDebugger::add($aStruct, 'mr_test.php $aStruct');
// Loop through the structure and compose testcases
foreach ($aStruct as $idcat => $aCat) {
// category
$aTests[] = array(
'url' => $oMRTest->composeURL($aCat, 'c'),
'level' => $aCat['level'],
'name' => $aCat['name']
);
foreach ($aCat['articles'] as $idart => $aArt) {
// articles
$aTests[] = array(
'url' => $oMRTest->composeURL($aArt, 'a'),
'level' => $aCat['level'],
'name' => $aCat['name'] . ' :: ' . $aArt['title']
);
}
}
// compose content
$this->_oView->content = '<pre>';
$oMRUrlStack = ModRewriteUrlStack::getInstance();
// first loop to add urls to mr url stack
foreach ($aTests as $p => $v) {
$oMRUrlStack->add($v['url']);
}
$successCounter = 0;
$failCounter = 0;
// second loop to do the rest
foreach ($aTests as $p => $v) {
$url = mr_buildNewUrl($v['url']);
$arr = $oMRTest->resolveUrl($url);
$error = '';
$resUrl = $oMRTest->getResolvedUrl();
$color = 'green';
if ($url !== $resUrl) {
if ($oMRTest->getRoutingFoundState()) {
$successCounter++;
$resUrl = 'route to -&gt; ' . $resUrl;
} else {
$color = 'red';
$failCounter++;
}
} else {
$successCounter++;
}
// @todo: translate
if (isset($arr['error'])) {
switch ($arr['error']) {
case ModRewriteController::ERROR_CLIENT:
$error = 'client';
break;
case ModRewriteController::ERROR_LANGUAGE:
$error = 'language';
break;
case ModRewriteController::ERROR_CATEGORY:
$error = 'category';
break;
case ModRewriteController::ERROR_ARTICLE:
$error = 'article';
break;
case ModRewriteController::ERROR_POST_VALIDATION:
$error = 'validation';
break;
}
}
$pref = str_repeat(' ', $v['level']);
// render resolve information for current item
$itemTpl = $this->_oView->lng_result_item_tpl;
$itemTpl = str_replace('{pref}', $pref, $itemTpl);
$itemTpl = str_replace('{name}', $v['name'], $itemTpl);
$itemTpl = str_replace('{url_in}', $v['url'], $itemTpl);
$itemTpl = str_replace('{url_out}', $url, $itemTpl);
$itemTpl = str_replace('{color}', $color, $itemTpl);
$itemTpl = str_replace('{url_res}', $resUrl, $itemTpl);
$itemTpl = str_replace('{err}', $error, $itemTpl);
$itemTpl = str_replace('{data}', $oMRTest->getReadableResolvedData($arr), $itemTpl);
$this->_oView->content .= "\n" . $itemTpl . "\n";
}
$this->_oView->content .= '</pre>';
$totalTime = sprintf('%.4f', (getmicrotime() - $startTime));
// render information about current test
$msg = $this->_oView->lng_result_message_tpl;
$msg = str_replace('{time}', $totalTime, $msg);
$msg = str_replace('{num_urls}', ($successCounter + $failCounter), $msg);
$msg = str_replace('{num_success}', $successCounter, $msg);
$msg = str_replace('{num_fail}', $failCounter, $msg);
$this->_oView->content = $msg . $this->_oView->content;
}
}

Datei anzeigen

@ -1,226 +0,0 @@
<?php
/**
* AMR abstract controller class
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: class.modrewrite_controller_abstract.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Abstract controller for all concrete cl-mod-rewrite controller implementations.
*
* @author Murat Purc <murat@purc.de>
* @package plugin
* @subpackage Mod Rewrite
*/
abstract class ModRewrite_ControllerAbstract {
/**
* View object, holds all view variables
* @var stdClass
*/
protected $_oView;
/**
* Global CONTENIDO $cfg variable
* @var array
*/
protected $_cfg;
/**
* Global CONTENIDO $client variable (client id)
* @var int
*/
protected $_client;
/**
* Global CONTENIDO $area variable (area name/id)
* @var int|string
*/
protected $_area;
/**
* Global CONTENIDO $action variable (send by request)
* @var string
*/
protected $_action;
/**
* Global CONTENIDO $frame variable (current frame in backend)
* @var int
*/
protected $_frame;
/**
* Global CONTENIDO $contenido variable (session id)
* @var string
*/
protected $_contenido;
/**
* Template file or template string to render
* @var string
*/
protected $_template = null;
/**
* Additional properties list
* @var array
*/
protected $_properties = array();
/**
* Debug flag
* @var bool
*/
protected $_debug = false;
/**
* Constructor, sets some properties by assigning global variables to them.
*/
public function __construct() {
global $cfg, $client, $area, $action, $frame, $contenido, $sess;
$this->_oView = new stdClass();
$this->_cfg = $cfg;
$this->_area = $area;
$this->_action = $action;
$this->_frame = $frame;
$this->_client = $client;
$this->_contenido = $contenido;
$this->_oView->area = $this->_area;
$this->_oView->frame = $this->_frame;
$this->_oView->contenido = $this->_contenido;
$this->_oView->sessid = $sess->id;
$this->_oView->lng_more_informations = i18n("More informations", "cl-mod-rewrite");
$this->init();
}
/**
* Initializer method, could be overwritten by childs.
* This method will be invoked in constructor of ModRewrite_ControllerAbstract.
*/
public function init() {
}
/**
* View property setter.
* @param object $oView
*/
public function setView($oView) {
if (is_object($oView)) {
$this->_oView = $oView;
}
}
/**
* View property getter.
* @return object
*/
public function getView() {
return $this->_oView;
}
/**
* Property setter.
* @param string $key
* @param mixed $value
*/
public function setProperty($key, $value) {
$this->_properties[$key] = $value;
}
/**
* Property getter.
* @param string $key
* @param mixed $default
* @return mixed
*/
public function getProperty($key, $default = null) {
return (isset($this->_properties[$key])) ? $this->_properties[$key] : $default;
}
/**
* Template setter.
* @param string $sTemplate Either full path and name of template file or a template string.
*/
public function setTemplate($sTemplate) {
$this->_template = $sTemplate;
}
/**
* Template getter.
* @return string
*/
public function getTemplate() {
return $this->_template;
}
/**
* Renders template by replacing all view variables in template.
* @param string Either full path and name of template file or a template string.
* If not passed, previous set template will be used.
* @throws Exception if no template is set
* @return string
*/
public function render($template = null) {
if ($template == null) {
$template = $this->_template;
}
if ($template == null) {
throw new Exception('Missing template to render.');
}
$oTpl = new Template();
foreach ($this->_oView as $k => $v) {
$oTpl->set('s', strtoupper($k), $v);
}
$oTpl->generate($template, 0, 0);
}
/**
* Returns parameter from request, the order is:
* - Return from $_GET, if found
* - Return from $_POST, if found
*
* @param string $key
* @param mixed $default The default value
* @return mixed
*/
protected function _getParam($key, $default = null) {
if (isset($_GET[$key])) {
return $_GET[$key];
} elseif (isset($_POST[$key])) {
return $_POST[$key];
} else {
return $default;
}
}
/**
* Returns rendered notification markup by using global $notification variable.
* @param string $type One of cGuiNotification::LEVEL_* constants
* @param string $msg The message to display
* @return string
*/
protected function _notifyBox($type, $msg) {
global $notification;
return $notification->returnNotification($type, $msg) . '<br>';
}
}

Datei anzeigen

@ -1,43 +0,0 @@
/*
Node structure
--------------
.aToolTip
.aToolTipInner
.aToolTipContent
.aToolTipCloseBtn
*/
.aToolTip { margin:2px 0 0 2px; }
.aToolTipInner {
border-left:1px solid #b3b3b3;
border-top:1px solid #666;
border-right:2px solid #b3b3b3;
border-bottom:2px solid #b3b3b3;
background:#f1f1f1;
color:#000;
margin:0;
padding:4px 12px 6px 24px;
margin:-2px 0 0 -2px;
}
.aToolTipInner .aToolTipContent {
position:relative;
margin:0;
padding:0;
}
a.aToolTipCloseBtn {
display:block;
height:16px;
width:16px;
background:url(../images/infoBtn.gif) no-repeat;
text-indent:-9999px;
outline:none;
position:absolute;
top:1px;
left:1px;
margin:1px 2px 2px 1px;
padding:0px;
}

Datei anzeigen

@ -1,174 +0,0 @@
/* Eric Meyer's Reset Reloaded */
/* http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, a, abbr, acronym, address, big, cite, code,del, dfn, em,
font, img, ins, kbd, q, s, samp,small, strike, strong, sub,
sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,table, caption, tbody, tfoot,
thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
ol, ul {list-style: none;}
blockquote, q {quotes: none;}
table {border-collapse: collapse;border-spacing: 0;}
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
/* IE6 */
* html .clearfix {height: 1%;}
/* IE7 */
*:first-child+html .clearfix {min-height: 1px;}
body {
background: #282828 url(../images/bg.png) repeat-x;
color: #999999;
font-size: 12px;
line-height: 20px;
font-family: Arial, helvetica;
}
a,
a:link,
a:visited {
color: #FEC92C;
text-decoration: none;
}
a:hover,
a:active,
a:focus {
text-decoration: underline;
}
a.exampleTip {
color: #FEC92C;
}
a.exampleTip:hover{
text-decoration: underline;
}
.section {
text-align: left;
padding-bottom: 18px;
border-bottom: 1px solid #333;
margin-bottom: 18px;
}
p {
margin: 0 0 18px;
}
h2 {
color: #fff;
font-size: 22px;
line-height: 24px;
margin: 0 0 24px;
padding: 0;
font-weight: normal;
}
h3{
color: #ddd;
font-size: 14px;
line-height: 18px;
margin: 0 0 18px;
}
h1.logo {
display: block;
height: 80px;
width: 260px;
margin: 40px auto 0;
}
h1.logo a{
display: block;
height: 80px;
width: 260px;
text-indent: -9999px;
background: url(../images/logo.png) no-repeat;
}
ul.demos {
list-style-type: none;
}
ul.demos li{
margin: 0 0 10px 0;
}
.primaryWrapper {
margin: 0 auto;
width: 960px;
text-align: center;
}
.branding{
text-align: center;
display: block;
height: 120px;
}
.ctaBtns {border: none; text-align: center;}
.ctaBtns p {
width: 263px;
margin: 0 auto;
}
.ctaBtns a{
display: block;
height: 37px;
width: 122px;
text-indent: -9999px;
}
a.dloadBtn {
background: url(../images/dload-btn.png) no-repeat top left;
float: left;
margin-right: 18px;
}
a.demoBtn {
background: url(../images/demo-btn.png) no-repeat top left;
float: left;
}
a.dloadBtn:hover,
a.demoBtn:hover {
background-position: bottom left;
}
.usage p {
margin-bottom: 2px;
}
ul.quickFacts {
list-style-position: inside;
list-style-type: disc;
}
p.license,
p.copyright {
font-size: 11px;
}

Datei anzeigen

@ -1,81 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>aToolTip Demos</title>
<!-- CSS -->
<link type="text/css" href="css/style.css" rel="stylesheet" media="screen">
<!-- aToolTip css -->
<link type="text/css" href="css/atooltip.css" rel="stylesheet" media="screen">
<!-- Scripts -->
<script type="text/javascript" src="js/jquery.min.js"></script>
<!-- aToolTip js -->
<script type="text/javascript" src="js/atooltip.min.jquery.js"></script>
<script type="text/javascript">
$(function(){
$('a.normalTip').aToolTip();
$('a.fixedTip').aToolTip({
fixed: true
});
$('a.clickTip').aToolTip({
clickIt: true,
tipContent: 'Hello I am aToolTip with content from the "tipContent" param'
});
});
</script>
</head>
<body>
<div class="primaryWrapper">
<div class="branding">
<h1 class="logo"><a href="#">aToolTip</a></h1>
</div>
<!-- DEMOS -->
<div class="section" id="demos">
<h2>Demos</h2>
<ul class="demos">
<li><a href="#" class="normalTip exampleTip" title="Hello, I am aToolTip">Normal Tooltip</a> - This is a normal tooltip with default settings.</li>
<li><a href="#" class="fixedTip exampleTip" title="Hello, I am aToolTip">Fixed Tooltip</a> - This is a fixed tooltip that doesnt follow the mouse.</li>
<li><a href="#" class="clickTip exampleTip" >On Click Tooltip</a> - This is a click activated tooltip with content passed in from 'tipContent' param</li>
</ul>
</div>
<!-- END DEMOS -->
<p class="copyright">
Copyright &copy; 2009 Ara Abcarians. aToolTip was built for use with <a href="http://jquery.com">jQuery</a> by <a href="http://ara-abcarians.com/"> Ara Abcarians.</a>
</p>
<p class="license">
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"></a><br>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.
</p>
</div> <!-- /primaryWrapper -->
</body>
</html>

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 1.2 KiB

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 90 B

Datei anzeigen

@ -1,118 +0,0 @@
/*
jQuery Version: jQuery 1.3.2
Plugin Name: aToolTip V 1.0
Plugin by: Ara Abcarians: http://ara-abcarians.com
License: aToolTip is licensed under a Creative Commons Attribution 3.0 Unported License
Read more about this license at --> http://creativecommons.org/licenses/by/3.0/
Modified: Murat Purc <murat@purc>, 2010-01-28: Position clickable tooltip on right side,
remove previous opened tooltip
Creates following node:
-----------------------
<div class="aToolTip">
<div class="aToolTipInner">
<p class="aToolTipContent"></p>
Content
<a alt="close" href="#" class="aToolTipCloseBtn">close</a>
</div>
</div>
*/
(function($) {
$.fn.aToolTip = function(options) {
// setup default settings
var defaults = {
clickIt: false,
closeTipBtn: 'aToolTipCloseBtn',
fixed: false,
inSpeed: 400,
outSpeed: 100,
tipContent: '',
toolTipClass: 'aToolTip',
xOffset: 0,
yOffset: 0
},
// This makes it so the users custom options overrides the default ones
settings = $.extend({}, defaults, options);
return this.each(function() {
var obj = $(this);
// Decide weather to use a title attr as the tooltip content
if (obj.attr('title') && !settings.tipContent) {
// set the tooltip content/text to be the obj title attribute
var tipContent = obj.attr('title');
} else {
// if no title attribute set it to the tipContent option in settings
var tipContent = settings.tipContent;
}
// check if obj has a title attribute and if click feature is off
if(tipContent && !settings.clickIt){
// Activate on hover
obj.hover(function(el){
obj.attr({title: ''});
$('body').append("<div class='"+ settings.toolTipClass +"'><div class='"+ settings.toolTipClass +"Inner'><p class='aToolTipContent'>"+ tipContent +"</p></div></div>");
$('.' + settings.toolTipClass).css({
position: 'absolute',
display: 'none',
zIndex: '50000',
top: (obj.offset().top - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset) + 'px',
left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px'
})
.stop().fadeIn(settings.inSpeed);
},
function(){
// Fade out
$('.' + settings.toolTipClass).stop().fadeOut(settings.outSpeed, function(){$(this).remove();});
});
}
// Follow mouse if fixed is false and click is false
if(!settings.fixed && !settings.clickIt){
obj.mousemove(function(el){
$('.' + settings.toolTipClass).css({
top: (el.pageY - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset),
left: (el.pageX + settings.xOffset)
})
});
}
// check if click feature is enabled
if(tipContent && settings.clickIt){
// Activate on click
obj.click(function(el){
if (!settings.tipContent) {
obj.attr({title: ''});
}
// $('.' + settings.toolTipClass).remove();
$('.' + settings.toolTipClass).stop().fadeOut(settings.outSpeed, function(){$(this).remove();});
$('body').append("<div class='"+ settings.toolTipClass +"'><div class='"+ settings.toolTipClass +"Inner'><p class='aToolTipContent'>"+ tipContent +"</p><a class='"+ settings.closeTipBtn +"' href='#' alt='close'>close</a></div></div>");
$('.' + settings.toolTipClass).css({
position: 'absolute',
display: 'none',
zIndex: '50000',
// top: (obj.offset().top - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset) + 'px',
// left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px'
top: (obj.offset().top - settings.yOffset) + 'px',
left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px'
})
.fadeIn(settings.inSpeed);
// Click to close tooltip
$('.' + settings.closeTipBtn).click(function(){
$('.' + settings.toolTipClass).fadeOut(settings.outSpeed, function(){$(this).remove();});
return false;
});
return false;
});
}
}); // END: return this
// returns the jQuery object to allow for chainability.
return this;
};
})(jQuery);

Datei anzeigen

@ -1,2 +0,0 @@
/*Plugin by: Ara Abcarians: http://ara-abcarians.com License: http://creativecommons.org/licenses/by/3.0/ */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(2($){$.O.w=2(d){8 e={9:f,q:\'P\',x:f,r:Q,s:R,y:\'\',1:\'w\',g:5,h:5},0=$.S({},e,d);i 3.T(2(){8 b=$(3);j(b.k(\'l\')){8 c=b.k(\'l\')}U{8 c=0.y}j(c&&!0.9){b.V(2(a){b.k({l:\'\'});$(\'z\').t("<m 4=\'"+0.1+"\'><p 4=\'A\'>"+c+"</p></m>");$(\'.\'+0.1).u({B:\'C\',D:\'E\',F:\'G\',6:(b.n().6-$(\'.\'+0.1).v()-0.h)+\'o\',7:(b.n().7+b.H()+0.g)+\'o\'}).I().J(0.r)},2(){$(\'.\'+0.1).I().K(0.s,2(){$(3).L()})})}j(!0.x&&!0.9){b.W(2(a){$(\'.\'+0.1).u({6:(a.X-$(\'.\'+0.1).v()-0.h),7:(a.Y+0.g)})})}j(c&&0.9){b.M(2(a){b.k({l:\'\'});$(\'z\').t("<m 4=\'"+0.1+"\'><p 4=\'A\'>"+c+"</p></m>");$(\'.\'+0.1).t("<a 4=\'"+0.q+"\' Z=\'#\' 10=\'N\'>N</a>");$(\'.\'+0.1).u({B:\'C\',D:\'E\',F:\'G\',6:(b.n().6-$(\'.\'+0.1).v()-0.h)+\'o\',7:(b.n().7+b.H()+0.g)+\'o\'}).J(0.r);$(\'.\'+0.q).M(2(){$(\'.\'+0.1).K(0.s,2(){$(3).L()});i f});i f})}});i 3}})(11);',62,64,'settings|toolTipClass|function|this|class||top|left|var|clickIt||||||false|xOffset|yOffset|return|if|attr|title|div|offset|px||closeTipBtn|inSpeed|outSpeed|append|css|outerHeight|aToolTip|fixed|tipContent|body|aToolTipContent|position|absolute|display|none|zIndex|50000|outerWidth|stop|fadeIn|fadeOut|remove|click|close|fn|aToolTipCloseBtn|400|100|extend|each|else|hover|mousemove|pageY|pageX|href|alt|jQuery'.split('|'),0,{}))

Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist

Datei anzeigen

@ -1,61 +0,0 @@
################################################################################
# ConLite AMR plugin restrictive rewrite rules set.
#
# Contains strict rules, each rewrite exclusion must be set manually.
# - Exclude requests to directories usage/, conlite/, setup/, cms/upload/
# - Exclude requests to cms/front_content.php, cms/dbfs.php
# - Pass thru requests to common ressources (pictures, movies, js, css, pdf)
#
# @version 1.0.0
# @author Ortwin Pinke <ortwin.pinke@php-backoffice.de>
# @author Murat Purc <murat@purc.de>
# @copyright 2019 ConLite Team
# @link http://www.conlite.org
#
# Versions before 1.0 copyright 4fb, author Murat Purc
#
# $Id: htaccess_restrictive.txt 145 2019-10-25 16:00:47Z oldperl $
################################################################################
<IfModule mod_rewrite.c>
# Enable rewrite engine
RewriteEngine on
# Specify a base URL-path for the rules
RewriteBase /cms
# Catch some common exploits in query string to get rid of them.
# NOTE: Conditions to prevent protocols (ftp, http[s]) in query string could
# be a disadvantage in some cases.
RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR]
RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC]
RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana
# Exclude some files and directories from rewriting
RewriteRule ^usage/.*$ - [L]
RewriteRule ^conlite/.*$ - [L]
RewriteRule ^setup/.*$ - [L]
RewriteRule ^cms/upload/.*$ - [L]
RewriteRule ^cms/test/.*$ - [L]
RewriteRule ^cms/front_content.php.*$ - [L]
RewriteRule ^cms/dbfs.php.*$ - [L]
# Exclude common extensions from rewriting and pass remaining requests to
# front_content.php.
RewriteRule !\.(avi|css|doc|flv|gif|gzip|ico|jpeg|jpg|js|mov|mp3|pdf|png|ppt|rar|svg|swf|txt|wav|wmv|xml|zip)$ front_content.php [NC,QSA,L]
</IfModule>
# Some rules to compress files.
# NOTE: Following settings are not mod rewrite specific, but enabling mod_deflate
# for some file types can help to reduce bandwith.
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>

Datei anzeigen

@ -1,59 +0,0 @@
################################################################################
# ConLite AMR plugin simple rewrite rules set.
#
# Contains few easy to handle rewrite rules.
#
# @version 1.0.0
# @author Ortwin Pinke <ortwin.pinke@php-backoffice.de>
# @author Murat Purc <murat@purc.de>
# @copyright 2019 ConLite Team
# @link http://www.conlite.org
#
# Versions before 1.0 copyright 4fb, author Murat Purc
#
# $Id: htaccess_simple.txt 145 2019-10-25 16:00:47Z oldperl $
################################################################################
<IfModule mod_rewrite.c>
# Enable rewrite engine
RewriteEngine on
# Specify a base URL-path for the rules
RewriteBase /cms
# Catch some common exploits in query string to get rid of them
# NOTE: Conditions to prevent protocols (ftp, http[s]) in query string could
# be a disadvantage in some cases
RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR]
RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC]
RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana
# Rewrite request to root to front_content.php
RewriteRule ^$ front_content.php [QSA,L]
# Exclude following request from rewriting
# tests for favicon.ico, valid symlinks (-s), not empty files (-l) and folders (-d)
RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# Pass other requests to front_content.php
RewriteRule ^.*$ front_content.php [QSA,NC,L]
</IfModule>
# Some rules to compress files.
# NOTE: Following settings are not mod rewrite specific, but enabling mod_deflate
# for some file types can help to reduce bandwith.
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>

Datei anzeigen

@ -1,114 +0,0 @@
<?php
/**
* Plugin Advanced Mod Rewrite default settings. This file will be included if
* mod rewrite settings of an client couldn't loaded.
*
* Containing settings are taken over from CONTENIDO-4.6.15mr setup installer
* template beeing made originally by stese.
*
* NOTE:
* Changes in these Advanced Mod Rewrite settings will affect all clients, as long
* as they don't have their own configuration.
* PHP needs write permissions to the folder, where this file resides. Mod Rewrite
* configuration files will be created in this folder.
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: config.mod_rewrite_default.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
global $cfg;
// Use advanced mod_rewrites ( 1 = yes, 0 = none )
$cfg['cl-mod-rewrite']['use'] = 0;
// Path to the htaccess file with trailling slash from domain-root!
$cfg['cl-mod-rewrite']['rootdir'] = '/';
// Check path to the htaccess file ( 1 = yes, 0 = none )
$cfg['cl-mod-rewrite']['checkrootdir'] = 1;
// Start TreeLocation from Root Tree (set to 1) or get location from first category (set to 0)
$cfg['cl-mod-rewrite']['startfromroot'] = 0;
// Prevent Duplicated Content, if startfromroot is enabled ( 1 = yes, 0 = none )
$cfg['cl-mod-rewrite']['prevent_duplicated_content'] = 0;
// is multilanguage? ( 1 = yes, 0 = none )
$cfg['cl-mod-rewrite']['use_language'] = 0;
// use language name in url? ( 1 = yes, 0 = none )
$cfg['cl-mod-rewrite']['use_language_name'] = 0;
// is multiclient in only one directory? ( 1 = yes, 0 = none )
$cfg['cl-mod-rewrite']['use_client'] = 0;
// use client name in url? ( 1 = yes, 0 = none )
$cfg['cl-mod-rewrite']['use_client_name'] = 0;
// use lowercase url? ( 1 = yes, 0 = none )
$cfg['cl-mod-rewrite']['use_lowercase_uri'] = 1;
// file extension for article links
$cfg['cl-mod-rewrite']['file_extension'] = '.html';
// The percentage if the category name have to match with database names.
$cfg['cl-mod-rewrite']['category_resolve_min_percentage'] = '75';
// Add start article name to url (1 = yes, 0 = none)
$cfg['cl-mod-rewrite']['add_startart_name_to_url'] = 1;
// Default start article name to use, depends on active add_startart_name_to_url
$cfg['cl-mod-rewrite']['default_startart_name'] = 'index';
// Rewrite urls on generating the code for the page. If active, the responsibility will be
// outsourced to moduleoutputs and you have to adapt the moduleoutputs manually. Each output of
// internal article/category links must be processed by using $sess->url. (1 = yes, 0 = none)
$cfg['cl-mod-rewrite']['rewrite_urls_at_congeneratecode'] = 0;
// Rewrite urls on output of htmlcode at front_content.php. Is the old way, and doesn't require
// adapting of moduleoutputs. On the other hand usage of this way will be slower than rewriting
// option above. (1 = yes, 0 = none)
$cfg['cl-mod-rewrite']['rewrite_urls_at_front_content_output'] = 1;
// Following five settings write urls like this one:
// www.domain.de/category1-category2.articlename.html
// Changes of these settings causes a reset of all aliases, see Advanced Mod Rewrite settings in
// backend.
// NOTE: category_seperator and article_seperator must contain different character.
// Separator for categories
$cfg['cl-mod-rewrite']['category_seperator'] = '/';
// Separator between category and article
$cfg['cl-mod-rewrite']['article_seperator'] = '/';
// Word seperator in category names
$cfg['cl-mod-rewrite']['category_word_seperator'] = '-';
// Word seperator in article names
$cfg['cl-mod-rewrite']['article_word_seperator'] = '-';
// Routing settings for incomming urls. Here you can define routing rules as follows:
// $cfg['cl-mod-rewrite']['routing'] = array(
// '/a_incomming/url/foobar.html' => '/new_url/foobar.html', # route /a_incomming/url/foobar.html to /new_url/foobar.html
// '/cms/' => '/' # route /cms/ to / (doc root of client)
// );
$cfg['cl-mod-rewrite']['routing'] = array();
// Redirect invalid articles to errorpage (1 = yes, 0 = none)
$cfg['cl-mod-rewrite']['redirect_invalid_article_to_errorsite'] = 0;

Datei anzeigen

@ -1,167 +0,0 @@
<?php
/**
* Plugin Advanced Mod Rewrite initialization file.
*
* This file will be included by CONTENIDO plugin loader routine, and the content
* of this file ensures that the AMR Plugin will be initialized correctly.
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: config.plugin.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
global $_cecRegistry, $cfg, $contenido, $area, $client, $load_client;
####################################################################################################
/**
* Chain Contenido.Frontend.CreateURL
* This chain is called inside some scripts (front_content.php) to create urls.
*
* @todo: Is added to provide downwards compatibility for the amr plugin.
* There is no need for this chain since CONTENIDO 4.8.9 contains its own Url building feature.
* @deprecated
*
* Parameters & order:
* string URL including parameter value pairs
*
* Returns:
* string Returns modified URL
*/
$_cecRegistry->registerChain("Contenido.Frontend.CreateURL", "string");
####################################################################################################
// initialize client id
if (isset($client) && (int) $client > 0) {
$clientId = (int) $client;
} elseif (isset($load_client) && (int) $load_client > 0) {
$clientId = (int) $load_client;
} else {
$clientId = '';
}
// include necessary sources
cInclude('classes', 'Debug/DebuggerFactory.class.php');
plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_controller_abstract.php');
plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_content_controller.php');
plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_contentexpert_controller.php');
plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_contenttest_controller.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewritebase.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewrite.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewritecontroller.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewritedebugger.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewritetest.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewriteurlstack.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewriteurlutil.php');
plugin_include('cl-mod-rewrite', 'includes/functions.mod_rewrite.php');
global $lngAct;
$lngAct['cl-mod-rewrite']['mod_rewrite'] = i18n("Advanced Mod Rewrite", "cl-mod-rewrite");
$lngAct['cl-mod-rewrite']['mod_rewrite_expert'] = i18n("Advanced Mod Rewrite functions", "cl-mod-rewrite");
$lngAct['cl-mod-rewrite']['mod_rewrite_test'] = i18n("Advanced Mod Rewrite test", "cl-mod-rewrite");
// set debug configuration
if (isset($contenido)) {
ModRewriteDebugger::setEnabled(true);
} else {
ModRewriteDebugger::setEnabled(false);
}
// initialize mr plugin
ModRewrite::initialize($clientId);
if (ModRewrite::isEnabled()) {
$aMrCfg = ModRewrite::getConfig();
$_cecRegistry = cApiCecRegistry::getInstance();
// Add new tree function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_newtree.AfterCall', 'mr_strNewTree');
// Add move subtree function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_movesubtree.AfterCall', 'mr_strMoveSubtree');
// Add new category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_newcat.AfterCall', 'mr_strNewCategory');
// Add rename category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_renamecat.AfterCall', 'mr_strRenameCategory');
// Add move up category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_moveupcat.AfterCall', 'mr_strMoveUpCategory');
// Add move down category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_movedowncat.AfterCall', 'mr_strMovedownCategory');
// Add copy category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Category.strCopyCategory', 'mr_strCopyCategory');
// Add category sync function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Category.strSyncCategory_Loop', 'mr_strSyncCategory');
// Add save article (new and existing category) function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.con_saveart.AfterCall', 'mr_conSaveArticle');
// Add move article function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Article.conMoveArticles_Loop', 'mr_conMoveArticles');
// Add duplicate article function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Article.conCopyArtLang_AfterInsert', 'mr_conCopyArtLang');
// Add sync article function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Article.conSyncArticle_AfterInsert', 'mr_conSyncArticle');
if (!isset($contenido)) {
// we are not in backend, add cec functions for rewriting
// Add mr related function for hook "after plugins loaded" to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Frontend.AfterLoadPlugins', 'mr_runFrontendController');
// Add url rewriting function to CONTENIDO Extension Chainer
// @todo: no more need since CONTENIDO 4.8.9 provides central Url building,
// but it is still available because of downwards compatibility
// @deprecated
$_cecRegistry->addChainFunction('Contenido.Frontend.CreateURL', 'mr_buildNewUrl');
// overwrite url builder configuration with own url builder
$cfg['url_builder']['name'] = 'MR';
$cfg['config'] = array();
cInclude('classes', 'Url/Contenido_Url.class.php');
cInclude('classes', 'UrlBuilder/Contenido_UrlBuilderConfig.class.php');
Contenido_UrlBuilderConfig::setConfig($cfg['url_builder']);
if ($aMrCfg['rewrite_urls_at_congeneratecode'] == 1) {
// Add url rewriting at code generation to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode', 'mr_buildGeneratedCode');
} elseif ($aMrCfg['rewrite_urls_at_front_content_output'] == 1) {
// Add url rewriting at html output to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Frontend.HTMLCodeOutput', 'mr_buildGeneratedCode');
} else {
// Fallback solution: Add url rewriting at code generation to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode', 'mr_buildGeneratedCode');
}
}
}
if (isset($contenido) && isset($area) && $area == 'mod_rewrite_test') {
// configure url builder to enable it on test page
$cfg['url_builder']['name'] = 'MR';
$cfg['config'] = array();
Contenido_UrlBuilderConfig::setConfig($cfg['url_builder']);
ModRewrite::setEnabled(true);
}
unset($clientId, $options);

Datei anzeigen

@ -1,102 +0,0 @@
<?php
/**
* Mod Rewrite front_content.php controller. Does some preprocessing jobs, tries
* to set following variables, depending on mod rewrite configuration and if
* request part exists:
* - $client
* - $changeclient
* - $lang
* - $changelang
* - $idart
* - $idcat
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: front_content_controller.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
global $client, $changeclient, $cfgClient, $lang, $changelang, $idart, $idcat, $path, $mr_preprocessedPageError;
ModRewriteDebugger::add(ModRewrite::getConfig(), 'front_content_controller.php mod rewrite config');
// create an mod rewrite controller instance and execute processing
$oMRController = new ModRewriteController($_SERVER['REQUEST_URI']);
$oMRController->execute();
if ($oMRController->errorOccured()) {
// an error occured (idcat and or idart couldn't catched by controller)
$iRedirToErrPage = ModRewrite::getConfig('redirect_invalid_article_to_errorsite', 0);
// try to redirect to errorpage if desired
if ($iRedirToErrPage == 1 && (int) $client > 0 && (int) $lang > 0) {
global $errsite_idcat, $errsite_idart;
if ($cfgClient['set'] != 'set') {
rereadClients();
}
// errorpage
$aParams = array(
'client' => $client, 'idcat' => $errsite_idcat[$client], 'idart' => $errsite_idart[$client],
'lang' => $lang, 'error' => '1'
);
$errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams);
mr_header($errsite);
exit();
}
} else {
// set some global variables
if ($oMRController->getClient()) {
$client = $oMRController->getClient();
}
if ($oMRController->getChangeClient()) {
$changeclient = $oMRController->getChangeClient();
}
if ($oMRController->getLang()) {
$lang = $oMRController->getLang();
}
if ($oMRController->getChangeLang()) {
$changelang = $oMRController->getChangeLang();
}
if ($oMRController->getIdArt()) {
$idart = $oMRController->getIdArt();
}
if ($oMRController->getIdCat()) {
$idcat = $oMRController->getIdCat();
}
if ($oMRController->getPath()) {
$path = $oMRController->getPath();
}
}
// some debugs
ModRewriteDebugger::add($mr_preprocessedPageError, 'mr $mr_preprocessedPageError', __FILE__);
if ($oMRController->getError()) {
ModRewriteDebugger::add($oMRController->getError(), 'mr error', __FILE__);
}
ModRewriteDebugger::add($idart, 'mr $idart', __FILE__);
ModRewriteDebugger::add($idcat, 'mr $idcat', __FILE__);
ModRewriteDebugger::add($lang, 'mr $lang', __FILE__);
ModRewriteDebugger::add($client, 'mr $client', __FILE__);

Datei anzeigen

@ -1,945 +0,0 @@
<?php
/**
* Mod Rewrite front_content.php controller. Does some preprocessing jobs, tries
* to set following variables, depending on mod rewrite configuration and if
* request part exists:
* - $client
* - $changeclient
* - $lang
* - $changelang
* - $idart
* - $idcat
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: functions.cl-mod-rewrite.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Stefan Seifarth / stese
* @author Murat Purc <murat@purc.de>
* @copyright www.polycoder.de
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
global $_cecRegistry, $cfg, $contenido, $area, $client, $load_client;
/**
* Processes cl-mod-rewrite related job for created new tree.
*
* Will be called by chain 'Contenido.Action.str_newtree.AfterCall'.
*
* @param array $data Assoziative array with some values
* @return array Passed parameter
*/
function mr_strNewTree(array $data) {
global $lang;
ModRewriteDebugger::log($data, 'mr_strNewTree $data');
if ((int) $data['newcategoryid'] > 0) {
$mrCatAlias = (trim($data['categoryalias']) !== '') ? trim($data['categoryalias']) : trim($data['categoryname']);
// set new urlname - because original set urlname isn''t validated for double entries in same parent category
ModRewrite::setCatWebsafeName($mrCatAlias, $data['newcategoryid'], $lang);
ModRewrite::setCatUrlPath($data['newcategoryid'], $lang);
}
return $data;
}
/**
* Processes cl-mod-rewrite related job for created new category.
*
* Will be called by chain 'Contenido.Action.str_newcat.AfterCall'.
*
* @param array $data Assoziative array with some values
* @return array Passed parameter
*/
function mr_strNewCategory(array $data) {
global $lang;
ModRewriteDebugger::log($data, 'mr_strNewCategory $data');
if ((int) $data['newcategoryid'] > 0) {
$mrCatAlias = (trim($data['categoryalias']) !== '') ? trim($data['categoryalias']) : trim($data['categoryname']);
// set new urlname - because original set urlname isn''t validated for double entries in same parent category
ModRewrite::setCatWebsafeName($mrCatAlias, $data['newcategoryid'], $lang);
ModRewrite::setCatUrlPath($data['newcategoryid'], $lang);
}
return $data;
}
/**
* Processes cl-mod-rewrite related job for renamed category
* 2010-02-01: and now all existing subcategories and modify their paths too...
* 2010-02-01: max 50 recursion level
*
* Will be called by chain 'Contenido.Action.str_renamecat.AfterCall'.
*
* @param array $data Assoziative array with some values
* @return array Passed parameter
*/
function mr_strRenameCategory(array $data) {
ModRewriteDebugger::log($data, 'mr_strRenameCategory $data');
// hes 20100102
// maximal 50 recursion level
$recursion = (is_int($data['recursion'])) ? $data['recursion'] : 1;
if ($recursion > 50) {
exit("#20100201-1503: sorry - maximum function nesting level of " . $recursion . " reached");
}
$mrCatAlias = (trim($data['newcategoryalias']) !== '') ? trim($data['newcategoryalias']) : trim($data['newcategoryname']);
if ($mrCatAlias != '') {
// set new urlname - because original set urlname isn''t validated for double entries in same parent category
ModRewrite::setCatWebsafeName($mrCatAlias, $data['idcat'], $data['lang']);
ModRewrite::setCatUrlPath($data['idcat'], $data['lang']);
}
// hes 20100102
// now dive into all existing subcategories and modify their paths too...
$str = 'parentid=' . $data['idcat'];
$oCatColl = new cApiCategoryCollection($str);
while ($oCat = $oCatColl->next()) {
// hes 20100102
$str = 'idcat=' . $oCat->get('idcat') . ' AND idlang=' . (int) $data['lang'];
$oCatLanColl = new cApiCategoryLanguageCollection($str);
if ($oCatLan = $oCatLanColl->next()) {
// hes 20100102
$childData = array(
'idcat' => $oCat->get('idcat'),
'lang' => (int) $data['lang'],
'newcategoryname' => $oCatLan->get('name'),
'newcategoryalias' => $oCatLan->get('urlname'),
'recursion' => $recursion + 1
);
$resData = mr_strRenameCategory($childData);
}
}
return $data;
}
/**
* Processes cl-mod-rewrite related job after moving a category up.
*
* Will be called by chain 'Contenido.Action.str_moveupcat.AfterCall'.
*
* @todo do we really need processing of the category? there is no mr relevant data
* changes while moving the category on same level, level and name won't change
*
* @param int $idcat Category id
* @return int Category id
*/
function mr_strMoveUpCategory($idcat) {
ModRewriteDebugger::log($idcat, 'mr_strMoveUpCategory $idcat');
// category check
$cat = new cApiCategory((int) $idcat);
if (!$cat->get('preid')) {
return;
}
// get all cat languages
$aIdLang = ModRewrite::getCatLanguages($idcat);
// update ...
foreach ($aIdLang as $iIdLang) {
// get urlname
$sCatname = ModRewrite::getCatName($idcat, $iIdLang);
// set new urlname - because original set urlname isn't validated for double entries in same parent category
ModRewrite::setCatWebsafeName($sCatname, $idcat, $iIdLang);
}
return $idcat;
}
/**
* Processes cl-mod-rewrite related job after moving a category down.
*
* Will be called by chain 'Contenido.Action.str_movedowncat.AfterCall'.
*
* @todo do we really need processing of the category? there is no mr relevant data
* changes while moving the category on same level, level and name won't change
*
* @param int $idcat Id of category beeing moved down
* @return int Category id
*/
function mr_strMovedownCategory($idcat) {
ModRewriteDebugger::log($idcat, 'mr_strMovedownCategory $idcat');
// category check
$cat = new cApiCategory((int) $idcat);
if (!$cat->get('id')) {
return;
}
// get all cat languages
$aIdLang = ModRewrite::getCatLanguages($idcat);
// update ...
foreach ($aIdLang as $iIdLang) {
// get urlname
$sCatname = ModRewrite::getCatName($idcat, $iIdLang);
// set new urlname - because original set urlname isn't validated for double entries in same parent category
ModRewrite::setCatWebsafeName($sCatname, $idcat, $iIdLang);
}
return $idcat;
}
/**
* Processes cl-mod-rewrite related job after moving a category subtree.
*
* Will be called by chain 'Contenido.Action.str_movesubtree.AfterCall'.
*
* @param array $data Assoziative array with some values
* @return array Passed parameter
*/
function mr_strMoveSubtree(array $data) {
ModRewriteDebugger::log($data, 'mr_strMoveSubtree $data');
// category check
if ((int) $data['idcat'] <= 0) {
return;
}
// next category check
$cat = new cApiCategory($data['idcat']);
if (!$cat->get('idcat')) {
return;
}
// get all cat languages
$aIdLang = ModRewrite::getCatLanguages($data['idcat']);
// update all languages
foreach ($aIdLang as $iIdLang) {
// get urlname
$sCatname = ModRewrite::getCatName($data['idcat'], $iIdLang);
// set new urlname - because original set urlname isn't validated for double entries in same parent category
ModRewrite::setCatWebsafeName($sCatname, $data['idcat'], $iIdLang);
ModRewrite::setCatUrlPath($data['idcat'], $iIdLang);
}
// now dive into all existing subcategories and modify their paths too...
$oCatColl = new cApiCategoryCollection('parentid=' . $data['idcat']);
while ($oCat = $oCatColl->next()) {
mr_strMoveSubtree(array('idcat' => $oCat->get('idcat')));
}
return $data;
}
/**
* Processes cl-mod-rewrite related job after copying a category subtree.
*
* Will be called by chain 'Contenido.Category.strCopyCategory'.
*
* @param array $data Assoziative array with some values
* @return array Passed parameter
*/
function mr_strCopyCategory(array $data) {
ModRewriteDebugger::log($data, 'mr_strCopyCategory $data');
$idcat = (int) $data['newcat']->get('idcat');
if ($idcat <= 0) {
return $data;
}
// get all cat languages
$aIdLang = ModRewrite::getCatLanguages($idcat);
// update ...
foreach ($aIdLang as $iIdLang) {
// get urlname
$sCatname = ModRewrite::getCatName($idcat, $iIdLang);
// set new urlname - because original set urlname isn't validated for double entries in same parent category
ModRewrite::setCatWebsafeName($sCatname, $idcat, $iIdLang);
ModRewrite::setCatUrlPath($idcat, $iIdLang);
}
}
/**
* Processes cl-mod-rewrite related job during structure synchronisation process,
* sets the urlpath of current category.
*
* Will be called by chain 'Contenido.Category.strSyncCategory_Loop'.
*
* @param array $data Assoziative array with some values
* @return array Passed parameter
*/
function mr_strSyncCategory(array $data) {
ModRewriteDebugger::log($data, 'mr_strSyncCategory $data');
ModRewrite::setCatUrlPath($data['idcat'], $data['idlang']);
return $data;
}
/**
* Processes cl-mod-rewrite related job for saved articles (new or modified article).
*
* Will be called by chain 'Contenido.Action.con_saveart.AfterCall'.
*
* @param array $data Assoziative array with some article properties
* @return array Passed parameter
*/
function mr_conSaveArticle(array $data) {
global $tmp_firstedit, $client;
ModRewriteDebugger::log($data, 'mr_conSaveArticle $data');
if ((int) $data['idart'] == 0) {
return $data;
}
if (strlen(trim($data['urlname'])) == 0) {
$data['urlname'] = $data['title'];
}
if (1 == $tmp_firstedit) {
// new article
$aLanguages = getLanguagesByClient($client);
foreach ($aLanguages as $iLang) {
ModRewrite::setArtWebsafeName($data['urlname'], $data['idart'], $iLang, $data['idcat']);
}
} else {
// modified article
$aArticle = ModRewrite::getArtIdByArtlangId($data['idartlang']);
if (isset($aArticle['idart']) && isset($aArticle['idlang'])) {
ModRewrite::setArtWebsafeName($data['urlname'], $aArticle['idart'], $aArticle['idlang'], $data['idcat']);
}
}
return $data;
}
/**
* Processes cl-mod-rewrite related job for articles beeing moved.
*
* Will be called by chain 'Contenido.Article.conMoveArticles_Loop'.
*
* @param array $data Assoziative array with record entries
* @return array Loop through of arguments
*/
function mr_conMoveArticles($data) {
ModRewriteDebugger::log($data, 'mr_conMoveArticles $data');
// too defensive but secure way
if (!is_array($data)) {
return $data;
} elseif (!isset($data['idartlang'])) {
return $data;
} elseif (!isset($data['idart'])) {
return $data;
}
$arr_art = ModRewrite::getArtIds($data['idartlang']);
if (count($arr_art) == 2) {
ModRewrite::setArtWebsafeName($arr_art["urlname"], $data['idart'], $arr_art["idlang"]);
}
return $data;
}
/**
* Processes cl-mod-rewrite related job for duplicated articles.
*
* Will be called by chain 'Contenido.Article.conCopyArtLang_AfterInsert'.
*
* @param array $data Assoziative array with record entries
* @return array Loop through of arguments
*/
function mr_conCopyArtLang($data) {
ModRewriteDebugger::log($data, 'mr_conCopyArtLang $data');
// too defensive but secure way
if (!is_array($data)) {
return $data;
} elseif (!isset($data['title'])) {
return $data;
} elseif (!isset($data['idart'])) {
return $data;
} elseif (!isset($data['idlang'])) {
return $data;
}
ModRewrite::setArtWebsafeName($data['title'], $data['idart'], $data['idlang']);
return $data;
}
/**
* Processes cl-mod-rewrite related job for synchronized articles.
*
* Will be called by chain 'Contenido.Article.conSyncArticle_AfterInsert'.
*
* @param array $data Assoziative array with record entries as follows:
* <code>
* array(
* 'src_art_lang' => Recordset (assoziative array) of source item from con_art_lang table
* 'dest_art_lang' => Recordset (assoziative array) of inserted destination item from con_art_lang table
* );
* </code>
*
* @return array Loop through of argument
*/
function mr_conSyncArticle($data) {
ModRewriteDebugger::log($data, 'mr_conSyncArticle $data');
// too defensive but secure way
if (!is_array($data)) {
return $data;
} elseif (!isset($data['src_art_lang']) || !is_array($data['src_art_lang'])) {
return $data;
} elseif (!isset($data['dest_art_lang']) || !is_array($data['dest_art_lang'])) {
return $data;
} elseif (!isset($data['dest_art_lang']['idart'])) {
return $data;
} elseif (!isset($data['dest_art_lang']['idlang'])) {
return $data;
}
if (!isset($data['src_art_lang']['urlname'])) {
$artLang = new cApiArticleLanguage($data['src_art_lang']['idartlang']);
$urlname = $artLang->get('urlname');
} else {
$urlname = $data['src_art_lang']['urlname'];
}
if ($urlname) {
ModRewrite::setArtWebsafeName($urlname, $data['dest_art_lang']['idart'], $data['dest_art_lang']['idlang']);
}
return $data;
}
/**
* Works as a wrapper for Contenido_Url.
*
* Will also be called by chain 'Contenido.Frontend.CreateURL'.
*
* @todo: Still exists bcause of downwards compatibility (some other modules/plugins are using it)
*
* @param string $url URL to rebuild
* @return string New URL
*/
function mr_buildNewUrl($url) {
global $lang;
ModRewriteDebugger::add($url, 'mr_buildNewUrl() in -> $url');
$oUrl = Contenido_Url::getInstance();
$aUrl = $oUrl->parse($url);
// add language, if not exists
if (!isset($aUrl['params']['lang'])) {
$aUrl['params']['lang'] = $lang;
}
// build url
$newUrl = $oUrl->build($aUrl['params']);
// add existing fragment
if (isset($aUrl['fragment'])) {
$newUrl .= '#' . $aUrl['fragment'];
}
$arr = array(
'in' => $url,
'out' => $newUrl,
);
ModRewriteDebugger::add($arr, 'mr_buildNewUrl() in -> out');
return $newUrl;
}
/**
* Replaces existing ancors inside passed code, while rebuilding the urls.
*
* Will be called by chain 'Contenido.Content.conGenerateCode' or
* 'Contenido.Frontend.HTMLCodeOutput' depening on cl-mod-rewrite settings.
*
* @param string $code Code to prepare
* @return string New code
*/
function mr_buildGeneratedCode($code) {
global $client, $cfgClient;
ModRewriteDebugger::add($code, 'mr_buildGeneratedCode() in');
// mod rewrite is activated
if (ModRewrite::isEnabled()) {
$sseStarttime = getmicrotime();
// anchor hack
$code = preg_replace_callback("/<a([^>]*)href\s*=\s*[\"|\'][\/]#(.?|.+?)[\"|\']([^>]*)>/i", function($match) {
return ModRewrite::rewriteHtmlAnchor($match);
}, $code);
// remove tinymce single quote entities:
$code = str_replace("&#39;", "'", $code);
$baseUri = cRegistry::getFrontendUrl();
$baseUri = CEC_Hook::execute("Contenido.Frontend.BaseHrefGeneration", $baseUri);
// CON-1389 modifier /e is deprecated as of PHP 5.5
$code = preg_replace_callback("/([\"|\'|=])upload\/(.?|.+?)([\"|\'|>])/i", function($match) use ($baseUri) {
return stripslashes($match[1] . $baseUri . 'upload/' . $match[2] . $match[3]);
}, $code);
// define some preparations to replace /front_content.php & ./front_content.php
// against front_content.php, because urls should start with front_content.php
$aPattern = array(
'/([\"|\'|=])\/front_content\.php(.?|.+?)([\"|\'|>])/i',
'/([\"|\'|=])\.\/front_content\.php(.?|.+?)([\"|\'|>])/i'
);
$aReplace = array(
'\1front_content.php\2\3',
'\1front_content.php\2\3'
);
// perform the pre replacements
$code = preg_replace($aPattern, $aReplace, $code);
// create url stack object and fill it with found urls...
$oMRUrlStack = ModRewriteUrlStack::getInstance();
$oMRUrlStack->add('front_content.php');
$matches = null;
preg_match_all("/([\"|\'|=])front_content\.php(.?|.+?)([\"|\'|>])/i", $code, $matches, PREG_SET_ORDER);
foreach ($matches as $val) {
$oMRUrlStack->add('front_content.php' . $val[2]);
}
// ok let it beginn, build the clean urls
$code = str_replace('"front_content.php"', '"' . mr_buildNewUrl('front_content.php') . '"', $code);
$code = str_replace("'front_content.php'", "'" . mr_buildNewUrl('front_content.php') . "'", $code);
$code = preg_replace_callback("/([\"|\'|=])front_content\.php(.?|.+?)([\"|\'|>])/i", function($match) {
ModRewriteDebugger::add($match, 'mr_buildGeneratedCode() matches');
$sHref = $match[1] . mr_buildNewUrl('front_content.php' . $match[2]) . $match[3];
ModRewriteDebugger::add($sHref, 'mr_buildGeneratedCode() matches -> href');
return $sHref;
}, $code);
ModRewriteDebugger::add($code, 'mr_buildGeneratedCode() out');
$sseEndtime = getmicrotime();
} else {
// anchor hack for non modrewrite websites
$code = preg_replace_callback("/<a([^>]*)href\s*=\s*[\"|\'][\/]#(.?|.+?)[\"|\']([^>]*)>/i", function($match) {
return ModRewrite::contenidoHtmlAnchor($match, $GLOBALS['is_XHTML']);
}, $code);
}
ModRewriteDebugger::add(($sseEndtime - $sseStarttime), 'mr_buildGeneratedCode() total spend time');
if ($debug = mr_debugOutput(false)) {
$code = cString::iReplaceOnce("</body>", $debug . "\n</body>", $code);
}
return $code;
// print "\n\n<!-- modrewrite generation time: " . ($sseEndtime - $sseStarttime) . " seconds -->";
}
/**
* Sets language of client, like done in front_content.php
*
* @param int $client Client id
*/
function mr_setClientLanguageId($client) {
global $lang, $load_lang, $cfg;
if ((int) $lang > 0) {
// there is nothing to do
return;
} elseif ($load_lang) {
// load_client is set in frontend/config.php
$lang = $load_lang;
return;
}
// try to get clients language from table
$sql = "SELECT B.idlang FROM "
. $cfg['tab']['clients_lang'] . " AS A, "
. $cfg['tab']['lang'] . " AS B "
. "WHERE "
. "A.idclient='" . ((int) $client) . "' AND A.idlang=B.idlang"
. "LIMIT 0,1";
if ($aData = mr_queryAndNextRecord($sql)) {
$lang = $aData['idlang'];
}
}
/**
* Loads Advanced Mod Rewrite configuration for passed client using serialized
* file containing the settings.
*
* File is placed in /contenido/cl-mod-rewrite/includes/and is named like
* config.mod_rewrite_{client_id}.php.
*
* @param int $clientId Id of client
* @param bool $forceReload Flag to force to reload configuration, e. g. after
* done changes on it
*/
function mr_loadConfiguration($clientId, $forceReload = false) {
global $cfg;
static $aLoaded;
$clientId = (int) $clientId;
if (!isset($aLoaded)) {
$aLoaded = array();
} elseif (isset($aLoaded[$clientId]) && $forceReload == false) {
return;
}
$mrConfig = mr_getConfiguration($clientId);
if (is_array($mrConfig)) {
// merge mod rewrite configuration with global cfg array
$cfg = array_merge($cfg, $mrConfig);
} else {
// couldn't load configuration, set defaults
include_once($cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/includes/config.mod_rewrite_default.php');
}
$aLoaded[$clientId] = true;
}
function mr_getConfigurationFilePath($clientId) {
$clientConfig = cRegistry::getClientConfig((int) $clientId);
$fePath = $clientConfig['path']['frontend'];
return $fePath . 'data/config/' . CL_ENVIRONMENT . '/config.mod_rewrite.php';
}
/**
* Returns the mod rewrite configuration array of an client.
*
* File is placed in /contenido/cl-mod-rewrite/includes/and is named like
* config.mod_rewrite_{client_id}.php.
*
* @param int $clientId Id of client
* @return array|null
*/
function mr_getConfiguration($clientId) {
global $cfg;
$clientId = (int) $clientId;
$file = mr_getConfigurationFilePath($clientId);
if (!is_file($file) || !is_readable($file)) {
$backendPath = cRegistry::getBackendPath();
$file = $cfg['path']['config'] . 'config.mod_rewrite_' . $clientId . '.php';
}
if (!is_file($file) || !is_readable($file)) {
$backendPath = cRegistry::getBackendPath();
$file = $backendPath . $cfg['path']['plugins'] . 'cl-mod-rewrite/includes/config.mod_rewrite_' . $clientId . '.php';
}
if (!is_file($file) || !is_readable($file)) {
return null;
}
if ($content = file_get_contents($file)) {
$content = unserialize($content);
if (array_key_exists("mod_rewrite", $content)) {
$content['cl-mod-rewrite'] = $content['mod_rewrite'];
unset($content['mod_rewrite']);
}
return $content;
} else {
return null;
}
}
/**
* Saves the mod rewrite configuration array of an client.
*
* File is placed in /contenido/cl-mod-rewrite/includes/and is named like
* config.mod_rewrite_{client_id}.php.
*
* @param int $clientId Id of client
* @param array $config Configuration to save
* @return bool
*/
function mr_setConfiguration($clientId, array $config) {
$sClientPath = cRegistry::getClientConfig(cRegistry::getClientId())['path']['frontend'];
$sConfigClientPath = $sClientPath.'/data/config/'.CL_ENVIRONMENT.'/';
if (is_writable($sClientPath) && !file_exists($sConfigClientPath)) {
try {
mkdir($sConfigClientPath, 0777, true);
} catch (Exception $ex) {
$oWriter = cLogWriter::factory("File", array('destination' => 'contenido.log'));
$oLog = new cLog($oWriter);
$oLog->log($ex->getFile() . " (" . $ex->getLine() . "): " . $ex->getMessage(), cLog::WARN);
}
}
if(file_exists($sConfigClientPath) && is_writable($sConfigClientPath)) {
$file = $sConfigClientPath. 'config.mod_rewrite.php';
} else {
$file = cRegistry::getConfigValue('path', 'contenido') . cRegistry::getConfigValue('path', 'plugins') . 'cl-mod-rewrite/includes/config.mod_rewrite_' . cRegistry::getClientId() . '.php';
}
$result = file_put_contents($file, serialize($config));
return ($result) ? true : false;
}
/**
* Includes the frontend controller script which parses the url and extacts
* needed data like idcat, idart, lang and client from it.
*
* Will be called by chain 'Contenido.Frontend.AfterLoadPlugins' at front_content.php.
*
* @return bool Just a return value
*/
function mr_runFrontendController() {
$iStartTime = getmicrotime();
plugin_include('cl-mod-rewrite', 'includes/config.plugin.php');
if (ModRewrite::isEnabled() == true) {
plugin_include('cl-mod-rewrite', 'includes/front_content_controller.php');
$totalTime = sprintf('%.4f', (getmicrotime() - $iStartTime));
ModRewriteDebugger::add($totalTime, 'mr_runFrontendController() total time');
}
return true;
}
/**
* Cleanups passed string from characters beeing repeated two or more times
*
* @param string $char Character to remove
* @param string $string String to clean from character
* @return string Cleaned string
*/
function mr_removeMultipleChars($char, $string) {
while (strpos($string, $char . $char) !== false) {
$string = str_replace($char . $char, $char, $string);
}
return $string;
}
/**
* Returns amr related translation text
*
* @param string $key The message id as string
* @return string Related message
*/
function mr_i18n($key) {
global $lngAMR;
return (is_array($lngAMR) && isset($lngAMR[$key])) ? $lngAMR[$key] : 'n. a.';
}
################################################################################
### Some helper functions, which are not plugin specific
/**
* Database query helper. Used to execute a select statement and to return the
* result of first recordset.
*
* Minimizes following code:
* <code>
* // default way
* $db = new DB_Contenido();
* $sql = "SELECT * FROM foo WHERE bar='foobar'";
* $db->query($sql);
* $db->next_record();
* $data = $db->Record;
*
* // new way
* $sql = "SELECT * FROM foo WHERE bar='foobar'";
* $data = mr_queryAndNextRecord($sql);
* </code>
*
* @param string $query Query to execute
* @return mixed Assoziative array including recordset or null
*/
function mr_queryAndNextRecord($query) {
static $db;
if (!isset($db)) {
$db = new DB_Contenido();
}
if (!$db->query($query)) {
return null;
}
return ($db->next_record()) ? $db->Record : null;
}
/**
* Returns value of an array key (assoziative or indexed).
*
* Shortcut function for some ways to access to arrays:
* <code>
* // old way
* if (is_array($foo) && isset($foo['bar']) && $foo['bar'] == 'yieeha') {
* // do something
* }
*
* // new, more readable way:
* if (mr_arrayValue($foo, 'bar') == 'yieeha') {
* // do something
* }
*
* // old way
* if (is_array($foo) && isset($foo['bar'])) {
* $jep = $foo['bar'];
* } else {
* $jep = 'yummy';
* }
*
* // new way
* $jep = mr_arrayValue($foo, 'bar', 'yummy');
* </code>
*
* @param array $array The array
* @param mixed $key Position of an indexed array or key of an assoziative array
* @param mixed $default Default value to return
* @return mixed Either the found value or the default value
*/
function mr_arrayValue($array, $key, $default = null) {
if (!is_array($array)) {
return $default;
} elseif (!isset($array[$key])) {
return $default;
} else {
return $array[$key];
}
}
/**
* Request cleanup function. Request data is allways tainted and must be filtered.
* Pass the array to cleanup using several options.
* Emulates array_walk_recursive().
*
* @param mixed $data Data to cleanup
* @param array $options Default options array, provides only 'filter' key with several
* filter functions which are to execute as follows:
* <code>
* $options['filter'] = array('trim', 'myFilterFunc');
* </code>
* If no filter functions are set, 'trim', 'strip_tags' and 'stripslashes'
* will be used by default.
* A userdefined function must accept the value as a parameter and must return
* the filtered parameter, e. g.
* <code>
* function myFilter($data) {
* // do what you want with the data, e. g. cleanup of xss content
* return $data;
* }
* </code>
*
* @return mixed Cleaned data
*/
function mr_requestCleanup(&$data, $options = null) {
if (!mr_arrayValue($options, 'filter')) {
$options['filter'] = array('trim', 'strip_tags', 'stripslashes');
}
if (is_array($data)) {
foreach ($data as $p => $v) {
$data[$p] = mr_requestCleanup($v, $options);
}
} else {
foreach ($options['filter'] as $filter) {
if ($filter == 'trim') {
$data = trim($data);
} elseif ($filter == 'strip_tags') {
$data = strip_tags($data);
} elseif ($filter == 'stripslashes') {
$data = stripslashes($data);
} elseif (function_exists($filter)) {
$data = call_user_func($filter, $data);
}
}
}
return $data;
}
/**
* Minimalistic'n simple way to get request variables.
*
* Checks occurance in $_GET, then in $_POST. Uses trim() and strip_tags() to preclean data.
*
* @param string $key Name of var to get
* @param mixed $default Default value to return
* @return mixed The value
*/
function mr_getRequest($key, $default = null) {
static $cache;
if (!isset($cache)) {
$cache = array();
}
if (isset($cache[$key])) {
return $cache[$key];
}
if (isset($_GET[$key])) {
$val = $_GET[$key];
} elseif (isset($_POST[$key])) {
$val = $_POST[$key];
} else {
$val = $default;
}
$cache[$key] = strip_tags(trim($val));
return $cache[$key];
}
/**
* Replaces calling of header method for redirects in front_content.php,
* used during development.
*
* @param $header Header value for redirect
*/
function mr_header($header) {
header($header);
return;
$header = str_replace('Location: ', '', $header);
echo '<html>
<head></head>
<body>
<p><a href="' . $header . '">' . $header . '</a></p>';
mr_debugOutput();
echo '</body></html>';
exit();
}
/**
* Debug output only during development
*
* @param bool $print Flag to echo the debug data
* @return mixed Either the debug data, if parameter $print is set to true, or nothing
*/
function mr_debugOutput($print = true) {
global $DB_Contenido_QueryCache;
if (isset($DB_Contenido_QueryCache) && is_array($DB_Contenido_QueryCache) && count($DB_Contenido_QueryCache) > 0) {
ModRewriteDebugger::add($DB_Contenido_QueryCache, 'sql statements');
// calculate total time consumption of queries
$timeTotal = 0;
foreach ($DB_Contenido_QueryCache as $pos => $item) {
$timeTotal += $item['time'];
}
ModRewriteDebugger::add($timeTotal, 'sql total time');
}
$sOutput = ModRewriteDebugger::getAll();
if ($print == true) {
echo $sOutput;
} else {
return $sOutput;
}
}

Datei anzeigen

@ -1,312 +0,0 @@
<?php
/**
* Plugin cl-mod-rewrite backend include file to administer settings (in content frame)
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: include.mod_rewrite_content.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
global $client, $cfg;
################################################################################
##### Initialization
if ((int) $client <= 0) {
// if there is no client selected, display empty page
$oPage = new cPage;
$oPage->render();
return;
}
$action = (isset($_REQUEST['mr_action'])) ? $_REQUEST['mr_action'] : 'index';
$bDebug = false;
################################################################################
##### Some variables
$oMrController = new ModRewrite_ContentController();
$aMrCfg = ModRewrite::getConfig();
// downwards compatibility to previous plugin versions
if (mr_arrayValue($aMrCfg, 'category_seperator', '') == '') {
$aMrCfg['category_seperator'] = '/';
}
if (mr_arrayValue($aMrCfg, 'category_word_seperator', '') == '') {
$aMrCfg['category_word_seperator'] = '-';
}
if (mr_arrayValue($aMrCfg, 'article_seperator', '') == '') {
$aMrCfg['article_seperator'] = '/';
}
if (mr_arrayValue($aMrCfg, 'article_word_seperator', '') == '') {
$aMrCfg['article_word_seperator'] = '-';
}
// some settings
$aSeparator = array(
'pattern' => '/^[\/\-_\.\$~]{1}$/',
'info' => '<span style="font-family:courier;font-weight:bold;">/ - . _ ~</span>'
);
$aWordSeparator = array(
'pattern' => '/^[\-_\.\$~]{1}$/',
'info' => '<span style="font-family:courier;font-weight:bold;">- . _ ~</span>'
);
$routingSeparator = '>>>';
$oMrController->setProperty('bDebug', $bDebug);
$oMrController->setProperty('aSeparator', $aSeparator);
$oMrController->setProperty('aWordSeparator', $aWordSeparator);
$oMrController->setProperty('routingSeparator', $routingSeparator);
// define basic data contents (used for template)
$oView = $oMrController->getView();
$oView->content_before = '';
$oView->idclient = $client;
$oView->use_chk = (ModRewrite::isEnabled()) ? ' checked="checked"' : '';
$oView->header_notes_css = 'display:none;';
// mr copy .htaccess
// @todo copy htacccess check into ModRewrite_ContentController->_doChecks()
$aHtaccessInfo = ModRewrite::getHtaccessInfo();
if ($aHtaccessInfo['has_htaccess']) {
$oView->htaccess_info_css = 'display:none;';
} else {
$oView->header_notes_css = 'display:table-row;';
$oView->htaccess_info_css = 'display:block;';
}
// empty aliases
$iEmptyArticleAliases = ModRewrite::getEmptyArticlesAliases();
$iEmptyCategoryAliases = ModRewrite::getEmptyCategoriesAliases();
if ($iEmptyArticleAliases > 0 || $iEmptyCategoryAliases > 0) {
$oView->header_notes_css = 'display:table-row;';
$oView->emptyaliases_info_css = 'display:block;';
} else {
$oView->emptyaliases_info_css = 'display:none;';
}
// mr root dir
$oView->rootdir = $aMrCfg['rootdir'];
$oView->rootdir_error = '';
// mr check root dir
$oView->checkrootdir_chk = ($aMrCfg['checkrootdir'] == 1) ? ' checked="checked"' : '';
// mr start from root
$oView->startfromroot_chk = ($aMrCfg['startfromroot'] == 1) ? ' checked="checked"' : '';
// mr prevent duplicated content
$oView->prevent_duplicated_content_chk = ($aMrCfg['prevent_duplicated_content'] == 1) ? ' checked="checked"' : '';
// mr language usage
$oView->use_language_chk = ($aMrCfg['use_language'] == 1) ? ' checked="checked"' : '';
$oView->use_language_name_chk = ($aMrCfg['use_language_name'] == 1) ? ' checked="checked"' : '';
$oView->use_language_name_disabled = ($aMrCfg['use_language'] == 1) ? '' : ' disabled="disabled"';
// mr client usage
$oView->use_client_chk = ($aMrCfg['use_client'] == 1) ? ' checked="checked"' : '';
$oView->use_client_name_chk = ($aMrCfg['use_client_name'] == 1) ? ' checked="checked"' : '';
$oView->use_client_name_disabled = ($aMrCfg['use_client'] == 1) ? '' : ' disabled="disabled"';
// mr lowecase uri
$oView->use_lowercase_uri_chk = ($aMrCfg['use_lowercase_uri'] == 1) ? ' checked="checked"' : '';
// mr category/category word separator
$oView->category_separator = $aMrCfg['category_seperator'];
$oView->category_separator_attrib = '';
$oView->category_word_separator = $aMrCfg['category_word_seperator'];
$oView->category_word_separator_attrib = '';
$oView->category_separator_error = '';
$oView->category_word_separator_error = '';
// mr article/article word separator
$oView->article_separator = $aMrCfg['article_seperator'];
$oView->article_separator_attrib = '';
$oView->article_word_separator = $aMrCfg['article_word_seperator'];
$oView->article_word_separator_attrib = '';
$oView->article_separator_error = '';
$oView->article_word_separator_error = '';
// mr file extension
$oView->file_extension = $aMrCfg['file_extension'];
$oView->file_extension_error = '';
// mr category name resolve percentage
$oView->category_resolve_min_percentage = $aMrCfg['category_resolve_min_percentage'];
$oView->category_resolve_min_percentage_error = '';
// mr add start article name to url
$oView->add_startart_name_to_url_chk = ($aMrCfg['add_startart_name_to_url'] == 1) ? ' checked="checked"' : '';
$oView->add_startart_name_to_url_error = '';
$oView->default_startart_name = $aMrCfg['default_startart_name'];
// mr rewrite urls at
$oView->rewrite_urls_at_congeneratecode_chk = ($aMrCfg['rewrite_urls_at_congeneratecode'] == 1) ? ' checked="checked"' : '';
$oView->rewrite_urls_at_front_content_output_chk = ($aMrCfg['rewrite_urls_at_front_content_output'] == 1) ? ' checked="checked"' : '';
$oView->content_after = '';
// mr rewrite routing
$data = '';
if (is_array($aMrCfg['routing'])) {
foreach ($aMrCfg['routing'] as $uri => $route) {
$data .= $uri . $routingSeparator . $route . "\n";
}
}
$oView->rewrite_routing = $data;
// mr redirect invalid article
$oView->redirect_invalid_article_to_errorsite_chk = ($aMrCfg['redirect_invalid_article_to_errorsite'] == 1) ? ' checked="checked"' : '';
$oView->lng_version = i18n("Version", "cl-mod-rewrite");
$oView->lng_author = i18n("Author", "cl-mod-rewrite");
$oView->lng_mail_to_author = i18n("E-Mail to author", "cl-mod-rewrite");
$oView->lng_pluginpage = i18n("Plugin page", "cl-mod-rewrite");
$oView->lng_visit_pluginpage = i18n("Visit plugin page", "cl-mod-rewrite");
$oView->lng_opens_in_new_window = i18n("opens page in new window", "cl-mod-rewrite");
$oView->lng_contenido_forum = i18n("CONTENIDO forum", "cl-mod-rewrite");
$oView->lng_pluginthread_in_contenido_forum = i18n("Plugin thread in CONTENIDO forum", "cl-mod-rewrite");
$oView->lng_plugin_settings = i18n("Plugin settings", "cl-mod-rewrite");
$oView->lng_note = i18n("Note", "cl-mod-rewrite");
// @todo copy htacccess check into ModRewrite_ContentController->_doChecks()
$sMsg = i18n("The .htaccess file could not found either in CONTENIDO installation directory nor in client directory.<br>It should set up in %sFunctions%s area, if needed.", "cl-mod-rewrite");
$oView->lng_msg_no_htaccess_found = sprintf($sMsg, '<a href="main.php?area=mod_rewrite_expert&frame=4&contenido=' . $oView->sessid . '&idclient=' . $client . '" onclick="parent.right_top.sub.clicked(parent.right_top.document.getElementById(\'c_1\').firstChild);">', '</a>');
$sMsg = i18n("Found", "cl-mod-rewrite");
$oView->lng_msg_no_emptyaliases_found = sprintf($sMsg, '<a href="main.php?area=mod_rewrite_expert&frame=4&contenido=' . $oView->sessid . '&idclient=' . $client . '" onclick="parent.right_top.sub.clicked(parent.right_top.document.getElementById(\'c_1\').firstChild);">', '</a>');
$oView->lng_enable_amr = i18n("Enable Advanced Mod Rewrite", "cl-mod-rewrite");
$oView->lng_msg_enable_amr_info = i18n("Disabling of plugin does not result in disabling mod rewrite module of the web server - This means,<br> all defined rules in the .htaccess are still active and could create unwanted side effects.<br><br>Apache mod rewrite could be enabled/disabled by setting the RewriteEngine directive.<br>Any defined rewrite rules could remain in the .htaccess and they will not processed,<br>if the mod rewrite module is disabled", "cl-mod-rewrite");
$oView->lng_example = i18n("Example", "cl-mod-rewrite");
$oView->lng_msg_enable_amr_info_example = i18n("# enable apache mod rewrite module\nRewriteEngine on\n\n# disable apache mod rewrite module\nRewriteEngine off", "cl-mod-rewrite");
$oView->lng_rootdir = i18n("Path to .htaccess from DocumentRoot", "cl-mod-rewrite");
$oView->lng_rootdir_info = i18n("Type '/' if the .htaccess file lies inside the wwwroot (DocumentRoot) folder.<br>Type the path to the subfolder fromm wwwroot, if CONTENIDO is installed in a subfolder within the wwwroot<br>(e. g. http://domain/mycontenido -&gt; path = '/mycontenido/')", "cl-mod-rewrite");
$oView->lng_checkrootdir = i18n("Check path to .htaccess", "cl-mod-rewrite");
$oView->lng_checkrootdir_info = i18n("The path will be checked, if this option is enabled.<br>But this could result in an error in some cases, even if the specified path is valid and<br>clients DocumentRoot differs from CONTENIDO backend DocumentRoot.", "cl-mod-rewrite");
$oView->lng_startfromroot = i18n("Should the name of root category be displayed in the URL?", "cl-mod-rewrite");
$oView->lng_startfromroot_lbl = i18n("Start from root category", "cl-mod-rewrite");
$oView->lng_startfromroot_info = i18n("If enabled, the name of the root category (e. g. 'Mainnavigation' in a CONTENIDO default installation), will be preceded to the URL.", "cl-mod-rewrite");
$oView->lng_use_client = i18n("Are several clients maintained in one directory?", "cl-mod-rewrite");
$oView->lng_use_client_lbl = i18n("Prepend client to the URL", "cl-mod-rewrite");
$oView->lng_use_client_name_lbl = i18n("Use client name instead of the id", "cl-mod-rewrite");
$oView->lng_use_language = i18n("Should the language appear in the URL (required for multi language websites)?", "cl-mod-rewrite");
$oView->lng_use_language_lbl = i18n("Prepend language to the URL", "cl-mod-rewrite");
$oView->lng_use_language_name_lbl = i18n("Use language name instead of the id", "cl-mod-rewrite");
$oView->lng_userdefined_separators_header = i18n("Configure your own separators with following 4 settings<br>to control generated URLs to your own taste", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example = i18n("www.domain.com/category1-category2.articlename.html\nwww.domain.com/category1/category2-articlename.html\nwww.domain.com/category.name1~category2~articlename.html\nwww.domain.com/category_name1-category2-articlename.foo", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_a = i18n("Category separator has to be different from category-word separator", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_a_example = i18n("# Example: Category separator (/) and category-word separator (_)\ncategory_one/category_two/articlename.html", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_b = i18n("Category separator has to be different from article-word separator", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_b_example = i18n("# Example: Category separator (/) and article-word separator (-)\ncategory_one/category_two/article-description.html", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_c = i18n("Category-article separator has to be different from article-word separator", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_c_example = i18n("# Example: Category-article separator (/) and article-word separator (-)\ncategory_one/category_two/article-description.html", "cl-mod-rewrite");
$oView->lng_category_separator = i18n("Category separator (delemiter between single categories)", "cl-mod-rewrite");
$oView->lng_catart_separator_info = sprintf(i18n("(possible values: %s)", "cl-mod-rewrite"), $aSeparator['info']);
$oView->lng_word_separator_info = sprintf(i18n("(possible values: %s)", "cl-mod-rewrite"), $aWordSeparator['info']);
$oView->lng_category_word_separator = i18n("Category-word separator (delemiter between category words)", "cl-mod-rewrite");
$oView->lng_article_separator = i18n("Category-article separator (delemiter between category-block and article)", "cl-mod-rewrite");
$oView->lng_article_word_separator = i18n("Article-word separator (delemiter between article words)", "cl-mod-rewrite");
$oView->lng_add_startart_name_to_url = i18n("Append article name to URLs", "cl-mod-rewrite");
$oView->lng_add_startart_name_to_url_lbl = i18n("Append article name always to URLs (even at URLs to categories)", "cl-mod-rewrite");
$oView->lng_default_startart_name = i18n("Default article name without extension", "cl-mod-rewrite");
$oView->lng_default_startart_name_info = i18n("e. g. 'index' for index.ext<br>In case of selected 'Append article name always to URLs' option and a empty field,<br>the name of the start article will be used", "cl-mod-rewrite");
$oView->lng_file_extension = i18n("File extension at the end of the URL", "cl-mod-rewrite");
$oView->lng_file_extension_info = i18n("Specification of file extension with a preceded dot<br>e.g. '.html' for http://host/foo/bar.html", "cl-mod-rewrite");
$oView->lng_file_extension_info2 = i18n("It's strongly recommended to specify a extension here,<br>if the option 'Append article name always to URLs' was not selected.<br><br>Otherwise URLs to categories and articles would have the same format<br>which may result in unresolvable categories/articles in some cases.", "cl-mod-rewrite");
$oView->lng_file_extension_info3 = i18n("It's necessary to specify a file extension at the moment, due do existing issues, which are not solved until yet. An not defined extension may result in invalid article detection in some cases.", "cl-mod-rewrite");
$oView->lng_use_lowercase_uri = i18n("Should the URLs be written in lower case?", "cl-mod-rewrite");
$oView->lng_use_lowercase_uri_lbl = i18n("URLs in lower case", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content = i18n("Duplicated content", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content_lbl = i18n("Prevent duplicated content", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content_info = i18n("Depending on configuration, pages could be found thru different URLs.<br>Enabling of this option prevents this. Examples for duplicated content", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content_info2 = i18n("Name of the root category in the URL: Feasible is /maincategory/subcategory/ and /subcategory/\nLanguage in the URL: Feasible is /german/category/ and /1/category/\nClient in the URL: Feasible is /client/category/ und /1/category/", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content_info2 = '<li>' . str_replace("\n", '</li><li>', $oView->lng_prevent_duplicated_content_info2) . '</li>';
$oView->lng_category_resolve_min_percentage = i18n("Percentage for similar category paths in URLs", "cl-mod-rewrite");
$oView->lng_category_resolve_min_percentage_info = i18n("This setting refers only to the category path of a URL. If AMR is configured<br>to prepend e. g. the root category, language and/or client to the URL,<br>the specified percentage will not applied to those parts of the URL.<br>An incoming URL will be cleaned from those values and the remaining path (urlpath of the category)<br>will be checked against similarities.", "cl-mod-rewrite");
$oView->lng_category_resolve_min_percentage_example = i18n("100 = exact match with no tolerance\n85 = paths with little errors will match to similar ones\n0 = matching will work even for total wrong paths", "cl-mod-rewrite");
$oView->lng_redirect_invalid_article_to_errorsite = i18n("Redirect in case of invalid articles", "cl-mod-rewrite");
$oView->lng_redirect_invalid_article_to_errorsite_lbl = i18n("Redirect to error page in case of invaid articles", "cl-mod-rewrite");
$oView->lng_redirect_invalid_article_to_errorsite_info = i18n("The start page will be displayed if this option is not enabled", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at = i18n("Moment of URL generation", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_lbl = i18n("a.) During the output of HTML code of the page", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info = i18n("Clean-URLs will be generated during page output. Modules/Plugins are able to generate URLs to frontend<br>as usual as in previous CONTENIDO versions using a format like 'front_content.php?idcat=1&amp;idart=2'.<br>The URLs will be replaced by the plugin to Clean-URLs before sending the HTML output.", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info2 = i18n("Differences to variant b.)", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info3 = i18n("Still compatible to old modules/plugins, since no changes in codes are required\nAll occurring URLs in HTML code, even those set by wysiwyg, will be switched to Clean-URLs\nAll URLs will usually be collected and converted to Clean-URLs at once.<br>Doing it this way reduces the amount of executed database significantly.", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info3 = '<li>' . str_replace("\n", '</li><li>', $oView->rewrite_urls_at_front_content_output_info3) . '</li>';
$oView->lng_rewrite_urls_at_congeneratecode_lbl = i18n("b.) In modules or plugins", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info = i18n("By using this option, all Clean-URLs will be generated directly in module or plugins.<br>This means, all areas in modules/plugins, who generate internal URLs to categories/articles, have to be adapted manually.<br>All Clean-URLs have to be generated by using following function:", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_example = i18n("# structure of a normal url\n\$url = 'front_content.php?idart=123&amp;lang=2&amp;client=1';\n\n# creation of a url by using the CONTENIDOs Url-Builder (since 4.8.9),\n# wich expects the parameter as a assoziative array\n\$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n\$newUrl = Contenido_Url::getInstance()->build(\$params);", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info2 = i18n("Differences to variant a.)", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info3 = i18n("The default way to generate URLs to fronend pages\nEach URL in modules/plugins has to be generated by UriBuilder\nEach generated Clean-Url requires a database query", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info3 = '<li>' . str_replace("\n", '</li><li>', $oView->lng_rewrite_urls_at_congeneratecode_info3) . '</li>';
$oView->lng_rewrite_routing = i18n("Routing", "cl-mod-rewrite");
$oView->lng_rewrite_routing_info = i18n("Routing definitions for incoming URLs", "cl-mod-rewrite");
$oView->lng_rewrite_routing_info2 = i18n("Type one routing definition per line as follows:", "cl-mod-rewrite");
$oView->lng_rewrite_routing_example = i18n("# {incoming_url}>>>{new_url}\n/incoming_url/name.html>>>new_url/new_name.html\n\n# route a specific incoming url to a new page\n/campaign/20_percent_on_everything_except_animal_food.html>>>front_content.php?idcat=23\n\n# route request to wwwroot to a specific page\n/>>>front_content.php?idart=16", "cl-mod-rewrite");
$oView->lng_rewrite_routing_info3 = i18n("The routing does not sends a HTTP header redirection to the destination URL, the redirection will happen internally by<br>replacing the detected incoming URL against the new destination URL (overwriting of article- categoryid)\nIncoming URLs can point to non existing resources (category/article), but the desttination URLs should point<br>to valid CONTENIDO articles/categories\nDestination URLs should point to real URLs to categories/articles,<br>e. g.front_content.php?idcat=23 or front_content.php?idart=34\nThe language id should attached to the URL in multi language sites<br>e. g. front_content.php?idcat=23&amp;lang=1\nThe client id should attached to the URL in multi client sites sharing the same folder<br>e. g. front_content.php?idcat=23&amp;client=2\nThe destination URL should not start with '/' or './' (wrong: /front_content.php, correct: front_content.php)", "cl-mod-rewrite");
$oView->lng_rewrite_routing_info3 = '<li>' . str_replace("\n", '</li><li>', $oView->lng_rewrite_routing_info3) . '</li>';
$oView->lng_discard_changes = i18n("Discard changes", "cl-mod-rewrite");
$oView->lng_save_changes = i18n("Save changes", "cl-mod-rewrite");
################################################################################
##### Action processing
if ($action == 'index') {
$oMrController->indexAction();
} elseif ($action == 'save') {
$oMrController->saveAction();
} elseif ($action == 'reset') {
$oMrController->resetAction();
} elseif ($action == 'resetempty') {
$oMrController->resetEmptyAction();
} else {
$oMrController->indexAction();
}
################################################################################
##### Output
$oMrController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/templates/content.html'
);

Datei anzeigen

@ -1,18 +0,0 @@
<?php
/**
* Plugin mod_rewrite backend include file (in content-top frame)
*
* @date 22.04.2008
* @author Murat Purc
* @copyright © Murat Purc 2008
* @package Contenido
* @subpackage ModRewrite
*/
defined('CON_FRAMEWORK') or die('Illegal call');
$tpl = new Template();
$tpl->generate(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/content_top.html', 0, 0
);

Datei anzeigen

@ -1,119 +0,0 @@
<?php
/**
* Plugin cl-mod-rewrite backend include file to administer expert (in content frame)
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: include.mod_rewrite_contentexpert.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
global $client, $cfg;
################################################################################
##### Initialization
if ((int) $client <= 0) {
// if there is no client selected, display empty page
$oPage = new cPage;
$oPage->render();
return;
}
$action = (isset($_REQUEST['mr_action'])) ? $_REQUEST['mr_action'] : 'index';
$debug = false;
################################################################################
##### Some variables
$oMrController = new ModRewrite_ContentExpertController();
$aMrCfg = ModRewrite::getConfig();
$aHtaccessInfo = ModRewrite::getHtaccessInfo();
// define basic data contents (used for template)
$oView = $oMrController->getView();
// view variables
$oView->copy_htaccess_css = 'display:table-row;';
$oView->copy_htaccess_error = '';
$oView->copy_htaccess_contenido_chk = ' checked="checked"';
$oView->copy_htaccess_cms_chk = '';
$oView->contenido_full_path = $aHtaccessInfo['contenido_full_path'];
$oView->client_full_path = $aHtaccessInfo['client_full_path'];
$oView->content_after = '';
$oMrController->setProperty('htaccessInfo', $aHtaccessInfo);
// view language variables
$oView->lng_plugin_functions = i18n("Plugin functions", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type = i18n("Copy/Download .htaccess template", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type_lbl = i18n("Select .htaccess template", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type1 = i18n("Restrictive .htaccess", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type2 = i18n("Simple .htaccess", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type_info1 = i18n("Contains rules with restrictive settings.<br>All requests pointing to extension avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov, <br>mp3, pdf, png, ppt, rar, txt, wav, wmv, xml, zip, will be excluded vom rewriting.<br>Remaining requests will be rewritten to front_content.php,<br>except requests to 'contenido/', 'setup/', 'cms/upload', 'cms/front_content.php', etc.<br>Each resource, which has to be excluded from rewriting must be specified explicitly.", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type_info2 = i18n("Contains a simple collection of rules. Each requests pointing to valid symlinks, folders or<br>files, will be excluded from rewriting. Remaining requests will be rewritten to front_content.php", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to = i18n("and copy to", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_contenido = i18n("CONTENIDO installation directory", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_contenido_info = i18n("Copy the selected .htaccess template into CONTENIDO installation directory<br><br>&nbsp;&nbsp;&nbsp;&nbsp;{CONTENIDO_FULL_PATH}.<br><br>This is the recommended option for a CONTENIDO installation with one or more clients<br>who are running on the same domain.", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_contenido_info = str_replace('{CONTENIDO_FULL_PATH}', $oView->contenido_full_path, $oView->lng_copy_htaccess_to_contenido_info);
$oView->lng_copy_htaccess_to_client = i18n("client directory", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_client_info = i18n("Copy the selected .htaccess template into client's directory<br><br>&nbsp;&nbsp;&nbsp;&nbsp;{CLIENT_FULL_PATH}.<br><br>This is the recommended option for a multiple client system<br>where each client has it's own domain/subdomain", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_client_info = str_replace('{CLIENT_FULL_PATH}', $oView->client_full_path, $oView->lng_copy_htaccess_to_client_info);
$oView->lng_or = i18n("or", "cl-mod-rewrite");
$oView->lng_download = i18n("Download", "cl-mod-rewrite");
$oView->lng_download_info = i18n("Download selected .htaccess template to copy it to the destination folder<br>or to take over the settings manually.", "cl-mod-rewrite");
$oView->lng_resetaliases = i18n("Reset category-/ and article aliases", "cl-mod-rewrite");
$oView->lng_resetempty_link = i18n("Reset only empty aliases", "cl-mod-rewrite");
$oView->lng_resetempty_info = i18n("Only empty aliases will be reset, existing aliases, e. g. manually set aliases, will not be changed.", "cl-mod-rewrite");
$oView->lng_resetall_link = i18n("Reset all aliases", "cl-mod-rewrite");
$oView->lng_resetall_info = i18n("Reset all category-/article aliases. Existing aliases will be overwritten.", "cl-mod-rewrite");
$oView->lng_note = i18n("Note", "cl-mod-rewrite");
$oView->lng_resetaliases_note = i18n("This process could require some time depending on amount of categories/articles.<br>The aliases will not contain the configured plugin separators, but the CONTENIDO default separators '/' und '-', e. g. '/category-word/article-word'.<br>Execution of this function ma be helpful to prepare all or empty aliases for the usage by the plugin.", "cl-mod-rewrite");
$oView->lng_discard_changes = i18n("Discard changes", "cl-mod-rewrite");
$oView->lng_save_changes = i18n("Save changes", "cl-mod-rewrite");
################################################################################
##### Action processing
if ($action == 'index') {
$oMrController->indexAction();
} elseif ($action == 'copyhtaccess') {
$oMrController->copyHtaccessAction();
} elseif ($action == 'downloadhtaccess') {
$oMrController->downloadHtaccessAction();
exit();
} elseif ($action == 'reset') {
$oMrController->resetAction();
} elseif ($action == 'resetempty') {
$oMrController->resetEmptyAction();
} else {
$oMrController->indexAction();
}
################################################################################
##### Output
$oMrController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/templates/contentexpert.html'
);

Datei anzeigen

@ -1,83 +0,0 @@
<?php
/**
* Testscript for Advanced Mod Rewrite Plugin.
*
* The goal of this testscript is to provide an easy way for a variance comparison
* of created SEO URLs against their resolved parts.
*
* This testscript fetches the full category and article structure of actual
* CONTENIDO installation, creates the SEO URLs for each existing category/article
* and resolves the generated URLs.
*
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: include.mod_rewrite_contenttest.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
global $client, $cfg;
################################################################################
##### Initialization
if ((int) $client <= 0) {
// if there is no client selected, display empty page
$oPage = new cPage;
$oPage->render();
return;
}
################################################################################
##### Processing
$mrTestNoOptionSelected = false;
if (!mr_getRequest('idart') && !mr_getRequest('idcat') && !mr_getRequest('idcatart') && !mr_getRequest('idartlang')) {
$mrTestNoOptionSelected = true;
}
$oMrTestController = new ModRewrite_ContentTestController();
// view language variables
$oView = $oMrTestController->getView();
$oView->lng_form_info = i18n("Define options to genereate the URLs by using the form below and run the test.", "cl-mod-rewrite");
$oView->lng_form_label = i18n("Parameter to use", "cl-mod-rewrite");
$oView->lng_maxitems_lbl = i18n("Number of URLs to generate", "cl-mod-rewrite");
$oView->lng_run_test = i18n("Run test", "cl-mod-rewrite");
$oView->lng_result_item_tpl = i18n("{pref}<strong>{name}</strong><br>{pref}Builder in: {url_in}<br>{pref}Builder out: {url_out}<br>{pref}<span style='color:{color}'>Resolved URL: {url_res}</span><br>{pref}Resolver err: {err}<br>{pref}Resolved data: {data}", "cl-mod-rewrite");
$oView->lng_result_message_tpl = i18n("Duration of test run: {time} seconds.<br>Number of processed URLs: {num_urls}<br><span style='color:green'>Successful resolved: {num_success}</span><br><span style='color:red'>Errors during resolving: {num_fail}</span></strong>", "cl-mod-rewrite");
################################################################################
##### Action processing
if ($mrTestNoOptionSelected) {
$oMrTestController->indexAction();
} else {
$oMrTestController->testAction();
}
$oView = $oMrTestController->getView();
$oView->content .= mr_debugOutput(false);
################################################################################
##### Output
$oMrTestController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/templates/contenttest.html'
);

Datei anzeigen

@ -1,944 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: ConLite AMR\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-15 18:37+0200\n"
"PO-Revision-Date: 2017-07-16 13:36+0100\n"
"Last-Translator: Ortwin Pinke <o.pinke@php-backoffice.de>\n"
"Language-Team: Ortwin Pinke <translate@conlite.org>\n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-KeywordsList: i18n\n"
"X-Generator: Poedit 1.5.4\n"
"X-Poedit-SearchPath-0: mod_rewrite\n"
#: includes/include.mod_rewrite_content.php:177
msgid "Version"
msgstr "Version"
#: includes/include.mod_rewrite_content.php:178
msgid "Author"
msgstr "Autor"
#: includes/include.mod_rewrite_content.php:179
msgid "E-Mail to author"
msgstr "E-Mail an Autor"
#: includes/include.mod_rewrite_content.php:180
msgid "Plugin page"
msgstr "Pluginseite"
#: includes/include.mod_rewrite_content.php:181
msgid "Visit plugin page"
msgstr "Pluginseite besuchen"
#: includes/include.mod_rewrite_content.php:182
msgid "opens page in new window"
msgstr "öffnet Seite in einem neuen Fenster"
#: includes/include.mod_rewrite_content.php:183
msgid "CONTENIDO forum"
msgstr "CONTENIDO Forum"
#: includes/include.mod_rewrite_content.php:184
msgid "Plugin thread in CONTENIDO forum"
msgstr "Pluginbeitrag im CONTENIDO Forum"
#: includes/include.mod_rewrite_content.php:185
msgid "Plugin settings"
msgstr "Plugineinstellungen"
#: includes/include.mod_rewrite_content.php:186
#: includes/include.mod_rewrite_contentexpert.php:87
msgid "Note"
msgstr "Hinweis"
#: includes/include.mod_rewrite_content.php:189
#, php-format
msgid ""
"The .htaccess file could not found either in CONTENIDO installation "
"directory nor in client directory.<br>It should set up in %sFunctions%s "
"area, if needed."
msgstr ""
"Es wurde weder im CONTENIDO Installationsverzeichnis noch im "
"Mandantenverzeichnis eine .htaccess Datei gefunden.<br>Die .htaccess Datei "
"sollte gegebenenfalls im Bereich %sFunktionen%s eingerichtet werden."
#: includes/include.mod_rewrite_content.php:192
#, php-format
msgid ""
"Found some category and/or article aliases. It is recommended to run the "
"reset function in %sFunctions%s area, if needed."
msgstr ""
"Einige leere Kategorie- und/oder Artikelaliase wurden gefunden. Es wird "
"empfohlen, diese über den Bereich %sFunktionen%s zur&uuml;ckzusetzen."
#: includes/include.mod_rewrite_content.php:195
msgid "Enable Advanced Mod Rewrite"
msgstr "Advanced Mod Rewrite aktivieren"
#: includes/include.mod_rewrite_content.php:197
msgid ""
"Disabling of plugin does not result in disabling mod rewrite module of the "
"web server - This means,<br> all defined rules in the .htaccess are still "
"active and could create unwanted side effects.<br><br>Apache mod rewrite "
"could be enabled/disabled by setting the RewriteEngine directive.<br>Any "
"defined rewrite rules could remain in the .htaccess and they will not "
"processed,<br>if the mod rewrite module is disabled"
msgstr ""
"Beim Deaktivieren des Plugins wird das mod rewrite Modul des Webservers "
"nicht mit deaktiviert - Das bedeutet, <br>dass alle in der .htaccess "
"definerten Regeln weiterhin aktiv sind und einen unerwünschten Nebeneffekt "
"haben können.<br><br>Apache mod rewrite lässt sich in der .htaccess durch "
"das Setzen der RewriteEngine-Direktive aktivieren/deaktivieren.<br>Wird das "
"mod rewrite Modul deaktiviert, können die in der .htaccess definierten "
"Regeln weiterhin bleiben, sie werden <br>dann nicht verarbeitet."
#: includes/include.mod_rewrite_content.php:199
msgid "Example"
msgstr "Beispiel"
#: includes/include.mod_rewrite_content.php:201
msgid ""
"# enable apache mod rewrite module\n"
"RewriteEngine on\n"
"\n"
"# disable apache mod rewrite module\n"
"RewriteEngine off"
msgstr ""
"# aktivieren des apache mod rewrite moduls\n"
"RewriteEngine on\n"
"\n"
"# deaktivieren des apache mod rewrite moduls\n"
"RewriteEngine off"
#: includes/include.mod_rewrite_content.php:203
msgid "Path to .htaccess from DocumentRoot"
msgstr "Pfad zur .htaccess Datei vom DocumentRoot ausgehend"
#: includes/include.mod_rewrite_content.php:204
msgid ""
"Type '/' if the .htaccess file lies inside the wwwroot (DocumentRoot) folder."
"<br>Type the path to the subfolder fromm wwwroot, if CONTENIDO is installed "
"in a subfolder within the wwwroot<br>(e. g. http://domain/mycontenido -&gt; "
"path = '/mycontenido/')"
msgstr ""
"Liegt die .htaccess im wwwroot (DocumentRoot), ist '/' anzugeben, ist "
"CONTENIDO in einem <br>Unterverzeichnis von wwwroot installiert, ist der "
"Pfad vom wwwroot aus anzugeben <br>(z. B. http://domain/mycontenido -&gt; "
"Pfad = '/mycontenido/')."
#: includes/include.mod_rewrite_content.php:206
msgid "Check path to .htaccess"
msgstr "Pfad zur .htaccess Datei überprüfen"
#: includes/include.mod_rewrite_content.php:207
msgid ""
"The path will be checked, if this option is enabled.<br>But this could "
"result in an error in some cases, even if the specified path is valid "
"and<br>clients DocumentRoot differs from CONTENIDO backend DocumentRoot."
msgstr ""
"Ist diese Option aktiv, wird der eingegebene Pfad überprüft. Das kann unter "
"<br>Umständen einen Fehler verursachen, obwohl der Pfad zwar richtig ist, "
"aber der Mandant <br>einen anderen DocumentRoot als das CONTENIDO Backend "
"hat."
#: includes/include.mod_rewrite_content.php:209
msgid "Should the name of root category be displayed in the URL?"
msgstr "Soll der Name des Hauptbaumes mit in der URL erscheinen?"
#: includes/include.mod_rewrite_content.php:210
msgid "Start from root category"
msgstr "Start vom Hauptbaum aus"
#: includes/include.mod_rewrite_content.php:211
msgid ""
"If enabled, the name of the root category (e. g. 'Mainnavigation' in a "
"CONTENIDO default installation), will be preceded to the URL."
msgstr ""
"Ist diese Option gewählt, wird der Name des Hauptbaumes (Kategoriebaum, "
"<br>z. B. 'Hauptnavigation' bei CONTENIDO Standardinstallation) der URL "
"vorangestellt."
#: includes/include.mod_rewrite_content.php:213
msgid "Are several clients maintained in one directory?"
msgstr "Werden mehrere Mandanten in einem Verzeichnis gepflegt?"
#: includes/include.mod_rewrite_content.php:214
msgid "Prepend client to the URL"
msgstr "Mandant an die URL voranstellen"
#: includes/include.mod_rewrite_content.php:215
msgid "Use client name instead of the id"
msgstr "Name des Mandanten anstatt die Id verwenden"
#: includes/include.mod_rewrite_content.php:217
msgid ""
"Should the language appear in the URL (required for multi language websites)?"
msgstr ""
"Soll die Sprache mit in der URL erscheinen (für Mehrsprachsysteme "
"unabdingbar)?"
#: includes/include.mod_rewrite_content.php:218
msgid "Prepend language to the URL"
msgstr "Sprache an die URL voranstellen"
#: includes/include.mod_rewrite_content.php:219
msgid "Use language name instead of the id"
msgstr "Name der Sprache anstatt die Id verwenden"
#: includes/include.mod_rewrite_content.php:221
msgid ""
"Configure your own separators with following 4 settings<br>to control "
"generated URLs to your own taste"
msgstr ""
"Mit den nächsten 4 Einstellungen können die Trennzeichen in "
"den<br>generierten URLs nach den eigenen Wünschen gesetzt werden."
#: includes/include.mod_rewrite_content.php:222
msgid ""
"www.domain.com/category1-category2.articlename.html\n"
"www.domain.com/category1/category2-articlename.html\n"
"www.domain.com/category.name1~category2~articlename.html\n"
"www.domain.com/category_name1-category2-articlename.foo"
msgstr ""
"www.domain.de/kategorie1-kategorie2.artikelname.html\n"
"www.domain.de/kategorie1/kategorie2-artikelname.html\n"
"www.domain.de/kategorie.name1~kategorie2~artikelname.html\n"
"www.domain.de/kategorie_name1-kategorie2-artikelname.foo"
#: includes/include.mod_rewrite_content.php:223
msgid "Category separator has to be different from category-word separator"
msgstr ""
"Kategorie-Separator und Kategoriewort-Separator müssen unterschiedlich sein"
#: includes/include.mod_rewrite_content.php:224
msgid ""
"# Example: Category separator (/) and category-word separator (_)\n"
"category_one/category_two/articlename.html"
msgstr ""
"# Beispiel: Kategorie-Separator (/) und Kategoriewort-Separator (_)\n"
"kategorie_eins/kategorie_zwei/artikelname.html"
#: includes/include.mod_rewrite_content.php:225
msgid "Category separator has to be different from article-word separator"
msgstr ""
"Kategorie-Separator und Artikelwort-Separator müssen unterschiedlich sein"
#: includes/include.mod_rewrite_content.php:226
msgid ""
"# Example: Category separator (/) and article-word separator (-)\n"
"category_one/category_two/article-description.html"
msgstr ""
"# Beispiel: Kategorie-Separator (/) und Artikelwort-Separator (-)\n"
"kategorie_eins/kategorie_zwei/artikel-bezeichnung.html"
#: includes/include.mod_rewrite_content.php:227
msgid ""
"Category-article separator has to be different from article-word separator"
msgstr ""
"Kategorie-Artikel-Separator und Artikelwort-Separator müssen unterschiedlich "
"sein"
#: includes/include.mod_rewrite_content.php:228
msgid ""
"# Example: Category-article separator (/) and article-word separator (-)\n"
"category_one/category_two/article-description.html"
msgstr ""
"# Beispiel: Kategorie-Artikel-Separator (/) und Artikelwort-Separator (-)\n"
"kategorie_eins/kategorie_zwei/artikel-bezeichnung.html"
#: includes/include.mod_rewrite_content.php:230
msgid "Category separator (delemiter between single categories)"
msgstr "Kategorie-Separator (Trenner zwischen einzelnen Kategorien)"
#: includes/include.mod_rewrite_content.php:231
#: includes/include.mod_rewrite_content.php:232
#, php-format
msgid "(possible values: %s)"
msgstr "(mögliche Werte: %s)"
#: includes/include.mod_rewrite_content.php:233
msgid "Category-word separator (delemiter between category words)"
msgstr "Kategoriewort-Separator (Trenner zwischen einzelnen Kategoriewörtern)"
#: includes/include.mod_rewrite_content.php:234
msgid ""
"Category-article separator (delemiter between category-block and article)"
msgstr ""
"Kategorie-Artikel-Separator (Trenner zwischen Kategorieabschnitt und "
"Artikelname)"
#: includes/include.mod_rewrite_content.php:235
msgid "Article-word separator (delemiter between article words)"
msgstr "Artikelwort-Separator (Trenner zwischen einzelnen Artikelwörtern)"
#: includes/include.mod_rewrite_content.php:237
msgid "Append article name to URLs"
msgstr "Artikelname an URLs anhängen"
#: includes/include.mod_rewrite_content.php:238
msgid "Append article name always to URLs (even at URLs to categories)"
msgstr "Artikelname immer an die URLs anhängen (auch bei URLs zu Kategorien)"
#: includes/include.mod_rewrite_content.php:239
msgid "Default article name without extension"
msgstr "Standard-Artikelname ohne Dateiendung"
#: includes/include.mod_rewrite_content.php:240
msgid ""
"e. g. 'index' for index.ext<br>In case of selected 'Append article name "
"always to URLs' option and a empty field,<br>the name of the start article "
"will be used"
msgstr ""
"z. B. 'index' für index.ext.<br>Wenn die Option 'Artikelname immer an die "
"URLs anhängen' aktiviert und das Feld leer ist,<br>wird der Name des "
"Startartikels verwendet."
#: includes/include.mod_rewrite_content.php:242
msgid "File extension at the end of the URL"
msgstr "Dateiendung am Ende der URL"
#: includes/include.mod_rewrite_content.php:243
msgid ""
"Specification of file extension with a preceded dot<br>e.g. '.html' for "
"http://host/foo/bar.html"
msgstr ""
"Angabe der Dateiendung mit einem vorangestellten Punkt,<br>z. B. '.html' für "
"http://host/foo/bar.html"
#: includes/include.mod_rewrite_content.php:244
msgid ""
"It's strongly recommended to specify a extension here,<br>if the option "
"'Append article name always to URLs' was not selected.<br><br>Otherwise URLs "
"to categories and articles would have the same format<br>which may result in "
"unresolvable categories/articles in some cases."
msgstr ""
"Falls die Option 'Artikelname immer an die URLs anhängen' nicht gewählt "
"wurde, <br>ist es zwingend notwending, dass hier eine Dateiendung angegeben "
"wird.<br><br>Sonst haben URLs zu Kategorien und zu Seiten das gleiche "
"Format, und die korrekte<br>Auflösung der Kategorie und/oder des Artikels "
"kann nicht gewährleistet werden."
#: includes/include.mod_rewrite_content.php:245
msgid ""
"It's necessary to specify a file extension at the moment, due do existing "
"issues, which are not solved until yet. An not defined extension may result "
"in invalid article detection in some cases."
msgstr ""
"Aufgrund diverser Probleme, die noch nicht in dieser Version gel&ouml;st "
"wurden konnten, sollte unbedingt eine Endung angegeben werden. Ohne eine "
"angegebene Endung kann es zur fehlerhaften Erkennung der Artikel kommen."
#: includes/include.mod_rewrite_content.php:247
msgid "Should the URLs be written in lower case?"
msgstr "Sollen die URLs klein geschrieben werden?"
#: includes/include.mod_rewrite_content.php:248
msgid "URLs in lower case"
msgstr "URLs in Kleinbuchstaben"
#: includes/include.mod_rewrite_content.php:250
msgid "Duplicated content"
msgstr "Duplicated Content"
#: includes/include.mod_rewrite_content.php:251
msgid "Prevent duplicated content"
msgstr "Duplicated Content verhindern"
#: includes/include.mod_rewrite_content.php:253
msgid ""
"Depending on configuration, pages could be found thru different URLs."
"<br>Enabling of this option prevents this. Examples for duplicated content"
msgstr ""
"Seiten werden je nach Konfiguration unter verschiedenen URLs gefunden."
"<br>Das Aktivieren dieser Option unterbindet dies. Beispiele für duplicated "
"Content"
#: includes/include.mod_rewrite_content.php:254
msgid ""
"Name of the root category in the URL: Feasible is /maincategory/subcategory/ "
"and /subcategory/\n"
"Language in the URL: Feasible is /german/category/ and /1/category/\n"
"Client in the URL: Feasible is /client/category/ und /1/category/"
msgstr ""
"Name des Hauptbaumes in der URL: Möglich /hauptkategorie/unterkategorie/ "
"und /unterkategorie/\n"
"Sprache in der URL: Möglich /deutsch/kategorie/ und /1/kategorie/\n"
"Mandant in der URL: Möglich /mandant/kategorie/ und /1/kategorie/"
#: includes/include.mod_rewrite_content.php:257
msgid "Percentage for similar category paths in URLs"
msgstr "Prozentsatz für ähnliche Kategorie-Pfade in URLs"
#: includes/include.mod_rewrite_content.php:258
msgid ""
"This setting refers only to the category path of a URL. If AMR is "
"configured<br>to prepend e. g. the root category, language and/or client to "
"the URL,<br>the specified percentage will not applied to those parts of the "
"URL.<br>An incoming URL will be cleaned from those values and the remaining "
"path (urlpath of the category)<br>will be checked against similarities."
msgstr ""
"Diese Einstellung bezieht sich nur auf den Kategorieteil einer URL. Ist AMR "
"so konfiguriert, dass z. B. die<br>Hauptnavigation und/oder Sprache sowie "
"der Name des Mandanten an die URL vorangestellt wird, so wird der hier "
"<br>definierte Prozentsatz nicht auf diese Werte der URL angewendet.<br>Eine "
"ankommende URL wird von solchen Präfixen entfernt, der übrig gebliebene Pfad "
"(Urlpfad der Kategorie)<br>wird auf die Ähnlichkleit hin geprüft."
#: includes/include.mod_rewrite_content.php:259
msgid ""
"100 = exact match with no tolerance\n"
"85 = paths with little errors will match to similar ones\n"
"0 = matching will work even for total wrong paths"
msgstr ""
"100 = exakte überinstimmung, keine fehlertoleranz\n"
"85 = pfade mit kleineren fehlern ergeben auch treffern\n"
"0 = vollständig fehlerhafte pfade ergeben dennoch einen treffer"
#: includes/include.mod_rewrite_content.php:261
msgid "Redirect in case of invalid articles"
msgstr "Weiterleitung bei ungültigen Artikeln"
#: includes/include.mod_rewrite_content.php:262
msgid "Redirect to error page in case of invaid articles"
msgstr "Bei ungültigen Artikeln zur Fehlerseite weiterleiten"
#: includes/include.mod_rewrite_content.php:263
msgid "The start page will be displayed if this option is not enabled"
msgstr "Ist die Option nicht aktiv, wird die Startseite angezeigt"
#: includes/include.mod_rewrite_content.php:265
msgid "Moment of URL generation"
msgstr "Zeitpunkt zum Generieren der URLs"
#: includes/include.mod_rewrite_content.php:266
msgid "a.) During the output of HTML code of the page"
msgstr "a.) Bei der Ausgabe des HTML Codes der Seite"
#: includes/include.mod_rewrite_content.php:267
msgid ""
"Clean-URLs will be generated during page output. Modules/Plugins are able to "
"generate URLs to frontend<br>as usual as in previous CONTENIDO versions "
"using a format like 'front_content.php?idcat=1&amp;idart=2'.<br>The URLs "
"will be replaced by the plugin to Clean-URLs before sending the HTML output."
msgstr ""
"Clean-URLs werden bei der Ausgabe der Seite generiert. Module/Plugins können "
"URLs zum Frontend, <br>wie in früheren Versionen von CONTENIDO üblich, nach "
"dem Muster 'front_content.php?idcat=1&amp;idart=2' <br>ausgeben. Die URLs "
"werden vom Plugin vor der Ausgabe des HTML-Outputs Clean-URLs ersetzt."
#: includes/include.mod_rewrite_content.php:268
msgid "Differences to variant b.)"
msgstr "Unterschiede zur Variante b.)"
#: includes/include.mod_rewrite_content.php:269
msgid ""
"Still compatible to old modules/plugins, since no changes in codes are "
"required\n"
"All occurring URLs in HTML code, even those set by wysiwyg, will be switched "
"to Clean-URLs\n"
"All URLs will usually be collected and converted to Clean-URLs at once."
"<br>Doing it this way reduces the amount of executed database significantly."
msgstr ""
"Weiterhin Kompatibel zu älteren Modulen/Plugins, da keine Änderungen am Code "
"nötig sind\n"
"Sämtliche im HTML-Code vorkommende URLs, auch über wysiwyg gesetzte URLs, "
"<br>werden auf Clean-URLs umgestellt\n"
"Alle umzuschreibenden URLs werden in der Regel \"gesammelt\" und auf eimmal "
"umgeschreiben, <br>dadurch wird die Anzahl der DB-Abfragen sehr stark "
"minimiert"
#: includes/include.mod_rewrite_content.php:272
msgid "b.) In modules or plugins"
msgstr "b.) In Modulen oder Plugins"
#: includes/include.mod_rewrite_content.php:273
msgid ""
"By using this option, all Clean-URLs will be generated directly in module or "
"plugins.<br>This means, all areas in modules/plugins, who generate internal "
"URLs to categories/articles, have to be adapted manually.<br>All Clean-URLs "
"have to be generated by using following function:"
msgstr ""
"Bei dieser Option werden die Clean-URLs direkt in Modulen/Plugins generiert. "
"Das bedeutet,<br>dass alle internen URLs auf Kategorien/Artikel in den "
"Modulausgaben ggf. manuell angepasst werden müssen. <br>Clean-URLs müssen "
"dann stets mit folgender Funktion erstellt werden:"
#: includes/include.mod_rewrite_content.php:274
msgid ""
"# structure of a normal url\n"
"$url = 'front_content.php?idart=123&amp;lang=2&amp;client=1';\n"
"\n"
"# creation of a url by using the CONTENIDOs Url-Builder (since 4.8.9),\n"
"# wich expects the parameter as a assoziative array\n"
"$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n"
"$newUrl = Contenido_Url::getInstance()->build($params);"
msgstr ""
"# aufbau einer normalen url\n"
"$url = 'front_content.php?idart=123&amp;lang=2&amp;client=1';\n"
"\n"
"# erstellen der neuen Url über CONTENIDOs Url-Builder (seit 4.8.9),\n"
"# der die Parameter als assoziatives array erwartet\n"
"$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n"
"$newUrl = Contenido_Url::getInstance()->build($params);"
#: includes/include.mod_rewrite_content.php:275
msgid "Differences to variant a.)"
msgstr "Unterschiede zur Variante a.)"
#: includes/include.mod_rewrite_content.php:276
msgid ""
"The default way to generate URLs to fronend pages\n"
"Each URL in modules/plugins has to be generated by UriBuilder\n"
"Each generated Clean-Url requires a database query"
msgstr ""
"Der Standardweg um URLs zu Frontendseiten zu generieren\n"
"Jede URL in Modulen/Plugins ist vom UrlBuilder zu erstellen\n"
"Für jede umzuschreibende URL ist eine Datenbankabfrage nötig"
#: includes/include.mod_rewrite_content.php:279
msgid "Routing"
msgstr "Routing"
#: includes/include.mod_rewrite_content.php:280
msgid "Routing definitions for incoming URLs"
msgstr "Routing Definitionen für eingehende URLs"
#: includes/include.mod_rewrite_content.php:281
msgid "Type one routing definition per line as follows:"
msgstr "Pro Zeile eine Routing Definition wie folgt eingeben:"
#: includes/include.mod_rewrite_content.php:282
msgid ""
"# {incoming_url}>>>{new_url}\n"
"/incoming_url/name.html>>>new_url/new_name.html\n"
"\n"
"# route a specific incoming url to a new page\n"
"/campaign/20_percent_on_everything_except_animal_food.html>>>front_content."
"php?idcat=23\n"
"\n"
"# route request to wwwroot to a specific page\n"
"/>>>front_content.php?idart=16"
msgstr ""
"# {eingehende_url}>>>{neue_url}\n"
"/eingehende_url/name.html>>>neue_url/neuer_name.html\n"
"\n"
"# bestimmte eingehende url zur einer seite weiterleiten\n"
"/aktionen/20_prozent_auf_alles_ausser_tiernahrung.html>>>front_content.php?"
"idcat=23\n"
"\n"
"# request zum wwwroot auf eine bestimmte seite routen\n"
"/>>>front_content.php?idart=16"
#: includes/include.mod_rewrite_content.php:283
msgid ""
"The routing does not sends a HTTP header redirection to the destination URL, "
"the redirection will happen internally by<br>replacing the detected incoming "
"URL against the new destination URL (overwriting of article- categoryid)\n"
"Incoming URLs can point to non existing resources (category/article), but "
"the desttination URLs should point<br>to valid CONTENIDO articles/"
"categories\n"
"Destination URLs should point to real URLs to categories/articles,<br>e. g."
"front_content.php?idcat=23 or front_content.php?idart=34\n"
"The language id should attached to the URL in multi language sites<br>e. g. "
"front_content.php?idcat=23&amp;lang=1\n"
"The client id should attached to the URL in multi client sites sharing the "
"same folder<br>e. g. front_content.php?idcat=23&amp;client=2\n"
"The destination URL should not start with '/' or './' (wrong: /front_content."
"php, correct: front_content.php)"
msgstr ""
"Das Routing schickt keinen HTTP Header mit einer Weiterleitung zur Ziel-URL, "
"die Umleitung findet intern<br>durch das Ersetzen der erkannten "
"Eingangsseite gegen die neue Zielseite statt (Überschreiben der Artikel-/"
"Kategorieid)\n"
"Eingehende URLs können auch nicht vorhandene Ressourcen (Kategorie, Artikel) "
"sein, hinter der Ziel URL muss eine <br>gültige CONTENIDO-Seite (Kategorie/"
"Artikel) liegen\n"
"Als Ziel URL sollte eine reale URL zur Kategorie/Seite angegeben werden, "
"<br>z. B. front_content.php?idcat=23 oder front_content.php?idart=34.\n"
"Bei mehrsprachigen Auftritten sollte die Id der Sprache angehängt werden, "
"<br>z. B. front_content.php?idcat=23&amp;lang=1\n"
"Bei mehreren Mandanten im gleichen Verzeichnis sollte die Id des Mandanten "
"angehängt werden,<br>z. B. front_content.php?idcat=23&amp;client=2\n"
"Die Zielurl sollte nicht mit '/' oder './' beginnen (falsch: /front_content."
"php, richtig: front_content.php)"
#: includes/include.mod_rewrite_content.php:286
#: includes/include.mod_rewrite_contentexpert.php:90
msgid "Discard changes"
msgstr "Änderungen verwerfen"
#: includes/include.mod_rewrite_content.php:287
#: includes/include.mod_rewrite_contentexpert.php:91
msgid "Save changes"
msgstr "Änderungen speichern"
#: includes/include.mod_rewrite_contenttest.php:55
msgid ""
"Define options to genereate the URLs by using the form below and run the "
"test."
msgstr ""
"Optionen zum Generieren der URLs im folgenden Formular setzen und den Test "
"starten."
#: includes/include.mod_rewrite_contenttest.php:56
msgid "Parameter to use"
msgstr "Zu verwendende Parameter"
#: includes/include.mod_rewrite_contenttest.php:57
msgid "Number of URLs to generate"
msgstr "Anzahl der zu generierenden URLs"
#: includes/include.mod_rewrite_contenttest.php:58
msgid "Run test"
msgstr "Test starten"
#: includes/include.mod_rewrite_contenttest.php:60
msgid ""
"{pref}<strong>{name}</strong><br>{pref}Builder in: {url_in}<br>{pref}"
"Builder out: {url_out}<br>{pref}<span style='color:{color}'>Resolved URL: "
"{url_res}</span><br>{pref}Resolver err: {err}<br>{pref}Resolved data: {data}"
msgstr ""
"{pref}<strong>{name}</strong><br>{pref}Builder Eingang: {url_in}<br>{pref}"
"Builder Ausgang: {url_out}<br>{pref}<span style='color:{color}'>Aufgelöste "
"URL: {url_res}</span><br>{pref}Aufgelöse-Fehler: {err}<br>{pref}"
"Aufgelöste Daten: {data}"
#: includes/include.mod_rewrite_contenttest.php:62
msgid ""
"Duration of test run: {time} seconds.<br>Number of processed URLs: {num_urls}"
"<br><span style='color:green'>Successful resolved: {num_success}</"
"span><br><span style='color:red'>Errors during resolving: {num_fail}</span></"
"strong>"
msgstr ""
"Dauer des Testdurchlaufs: {time} Sekunden.<br>Anzahl verarbeiteter URLs: "
"{num_urls}<br><span style='color:green'>Erfolgreich aufgelöst: {num_success}"
"</span><br><span style='color:red'>Fehler beim Auflösen: {num_fail}</span></"
"strong>"
#: includes/include.mod_rewrite_contentexpert.php:61
msgid "Plugin functions"
msgstr "Plugin Funktionen"
#: includes/include.mod_rewrite_contentexpert.php:63
msgid "Copy/Download .htaccess template"
msgstr ".htaccess Vorlage kopieren/downloaden"
#: includes/include.mod_rewrite_contentexpert.php:64
msgid "Select .htaccess template"
msgstr ".htaccess Vorlage auswählen"
#: includes/include.mod_rewrite_contentexpert.php:65
msgid "Restrictive .htaccess"
msgstr "Restriktive .htaccess"
#: includes/include.mod_rewrite_contentexpert.php:66
msgid "Simple .htaccess"
msgstr "Einfache .htaccess"
#: includes/include.mod_rewrite_contentexpert.php:67
msgid ""
"Contains rules with restrictive settings.<br>All requests pointing to "
"extension avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov, <br>mp3, "
"pdf, png, ppt, rar, txt, wav, wmv, xml, zip, will be excluded vom rewriting."
"<br>Remaining requests will be rewritten to front_content.php,<br>except "
"requests to 'contenido/', 'setup/', 'cms/upload', 'cms/front_content.php', "
"etc.<br>Each resource, which has to be excluded from rewriting must be "
"specified explicitly."
msgstr ""
"Enthält Regeln mit restriktiveren Einstellungen.<br>Alle Anfragen, die auf "
"die Dateienendung avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov, "
"<br>mp3, pdf, png, ppt, rar, txt, wav, wmv, xml, zip gehen, werden vom "
"Umschreiben ausgeschlossen.<br>Alle anderen Anfragen, werden an "
"front_content.php umschrieben.<br>Ausgeschlossen davon sind 'contenido/', "
"'setup/', 'cms/upload', 'cms/front_content.php', usw.<br>Jede neue "
"Ressource, die vom Umschreiben ausgeschlossen werden soll, muss explizit "
"definiert werden."
#: includes/include.mod_rewrite_contentexpert.php:69
msgid ""
"Contains a simple collection of rules. Each requests pointing to valid "
"symlinks, folders or<br>files, will be excluded from rewriting. Remaining "
"requests will be rewritten to front_content.php"
msgstr ""
"Enthält eine einfachere Sammlung an Regeln. Alle Anfragen, die auf gültige "
"Symlinks, Verzeichnisse oder<br>Dateien gehen, werden vom Umschreiben "
"ausgeschlossen. Restliche Anfragen werden an front_content."
"php<br>umschrieben."
#: includes/include.mod_rewrite_contentexpert.php:71
msgid "and copy to"
msgstr "und kopieren in"
#: includes/include.mod_rewrite_contentexpert.php:72
msgid "CONTENIDO installation directory"
msgstr "das CONTENIDO Installationsverzeichnis"
#: includes/include.mod_rewrite_contentexpert.php:73
msgid ""
"Copy the selected .htaccess template into CONTENIDO installation "
"directory<br><br>&nbsp;&nbsp;&nbsp;&nbsp;{CONTENIDO_FULL_PATH}.<br><br>This "
"is the recommended option for a CONTENIDO installation with one or more "
"clients<br>who are running on the same domain."
msgstr ""
"Die gewählte .htaccess Vorlage in das CONTENIDO "
"Installationsverzeichnis<br>\n"
"<br>\n"
"&nbsp;&nbsp;&nbsp;&nbsp;{CONTENIDO_FULL_PATH}<br>\n"
"<br>\n"
"kopieren.<br>\n"
"Das ist die empfohlene Option für eine CONTENIDO-Installation mit einem "
"Mandanten oder<br>\n"
"mehreren Mandanten, die alle unter der gleichen Domain laufen."
#: includes/include.mod_rewrite_contentexpert.php:75
msgid "client directory"
msgstr "das Mandantenverzeichnis"
#: includes/include.mod_rewrite_contentexpert.php:76
msgid ""
"Copy the selected .htaccess template into client's directory<br><br>&nbsp;"
"&nbsp;&nbsp;&nbsp;{CLIENT_FULL_PATH}.<br><br>This is the recommended option "
"for a multiple client system<br>where each client has it's own domain/"
"subdomain"
msgstr ""
"Die gewählte .htaccess Vorlage in das Mandantenerzeichnis<br>\n"
"<br>\n"
"&nbsp;&nbsp;&nbsp;&nbsp;{CLIENT_FULL_PATH}<br>\n"
"<br>\n"
"kopieren.<br>\n"
"Diese Option ist z. B. bei einem Mehrmandantensystem empfohlen,<br>\n"
"wenn jeder Mandant unter einer eigenen Domain/Subdomain läuft."
#: includes/include.mod_rewrite_contentexpert.php:78
msgid "or"
msgstr "oder"
#: includes/include.mod_rewrite_contentexpert.php:79
msgid "Download"
msgstr "Downloaden"
#: includes/include.mod_rewrite_contentexpert.php:80
msgid ""
"Download selected .htaccess template to copy it to the destination "
"folder<br>or to take over the settings manually."
msgstr ""
"Die gewählte .htaccess Vorlage downloaden um z. B. die Datei manuell<br>\n"
"in das Verzeichnis zu kopieren oder Einstellungen zu übernehmen."
#: includes/include.mod_rewrite_contentexpert.php:82
msgid "Reset category-/ and article aliases"
msgstr "Kategorie-/ und Artikel-Aliase zurücksetzen"
#: includes/include.mod_rewrite_contentexpert.php:83
msgid "Reset only empty aliases"
msgstr "Nur leere Aliase zurücksetzen"
#: includes/include.mod_rewrite_contentexpert.php:84
msgid ""
"Only empty aliases will be reset, existing aliases, e. g. manually set "
"aliases, will not be changed."
msgstr ""
"Nur leere Kategorie-/Artikelaliase initial setzen<br>Vorhandene Aliase, z.B. "
"vorher manuell gesetze Aliase werden nicht geändert."
#: includes/include.mod_rewrite_contentexpert.php:85
msgid "Reset all aliases"
msgstr "Alle Aliase zurücksetzen"
#: includes/include.mod_rewrite_contentexpert.php:86
msgid ""
"Reset all category-/article aliases. Existing aliases will be overwritten."
msgstr ""
"Alle Kategorie-/Artikelaliase neu setzen.<br>Vorhandene Aliase werden "
"überschrieben."
#: includes/include.mod_rewrite_contentexpert.php:88
msgid ""
"This process could require some time depending on amount of categories/"
"articles.<br>The aliases will not contain the configured plugin separators, "
"but the CONTENIDO default separators '/' und '-', e. g. '/category-word/"
"article-word'.<br>Execution of this function ma be helpful to prepare all or "
"empty aliases for the usage by the plugin."
msgstr ""
"Dieser Prozess kann je nach Anzahl der Kategorien/Artikel etwas Zeit in "
"Anspruch nehmen.<br>\n"
"Die Aliase erhalten nicht die oben konfigurierten Separatoren, sondern die "
"CONTENIDO-Standardseparatoren '/' und '-', z. B. '/category-word/article-"
"word'.<br>\n"
"Das Ausführen dieser Funktion kann Hilfreich sein, um sämtliche oder nur "
"leere Aliase nachträglich auf die Verwendung mit dem Plugin anzupassen."
#: includes/config.plugin.php:71
msgid "Advanced Mod Rewrite"
msgstr "Advanced Mod Rewrite"
#: includes/config.plugin.php:72
msgid "Advanced Mod Rewrite functions"
msgstr "Advanced Mod Rewrite Funktionen"
#: includes/config.plugin.php:73
msgid "Advanced Mod Rewrite test"
msgstr "Advanced Mod Rewrite Test"
#: classes/controller/class.modrewrite_controller_abstract.php:107
msgid "More informations"
msgstr "Weitere Informationen"
#: classes/controller/class.modrewrite_content_controller.php:65
msgid ""
"The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\\-_"
"\\/\\.]"
msgstr ""
"Das Rootverzeichnis hat ein ungültiges Format, erlaubt sind die Zeichen [a-"
"zA-Z0-9\\-_\\/\\.]"
#: classes/controller/class.modrewrite_content_controller.php:72
#, php-format
msgid "The specified directory '%s' does not exists"
msgstr "Das angegebene Verzeichnis '%s' existiert nicht"
#: classes/controller/class.modrewrite_content_controller.php:79
#, php-format
msgid ""
"The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This "
"could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends "
"DOCUMENT_ROOT. However, the setting will be taken over because of disabled "
"check."
msgstr ""
"Das angegebene Verzeichnis '%s' existiert nicht im DOCUMENT_ROOT '%s'. Das "
"kann vorkommen, wenn das DOCUMENT_ROOT des Mandanten vom CONTENIDO Backend "
"DOCUMENT_ROOT abweicht. Die Einstellung wird dennoch übernommen, da die "
"Überprüfung abgeschaltet wurde."
#: classes/controller/class.modrewrite_content_controller.php:182
#, php-format
msgid "Please specify separator (%s) for category"
msgstr "Bitte Trenner (%s) für Kategoriewörter angeben"
#: classes/controller/class.modrewrite_content_controller.php:187
#, php-format
msgid "Invalid separator for category, allowed one of following characters: %s"
msgstr "Trenner für Kategorie ist ungültig, erlaubt ist eines der Zeichen: %s"
#: classes/controller/class.modrewrite_content_controller.php:194
#, php-format
msgid "Please specify separator (%s) for category words"
msgstr "Bitte Trenner (%s) für Kategorie angeben"
#: classes/controller/class.modrewrite_content_controller.php:199
#, php-format
msgid ""
"Invalid separator for category words, allowed one of following characters: %s"
msgstr "Trenner für Kategorie ist ungültig, erlaubt ist eines der Zeichen: %s"
#: classes/controller/class.modrewrite_content_controller.php:206
#, php-format
msgid "Please specify separator (%s) for article"
msgstr "Bitte Trenner (%s) für Kategoriewörter angeben"
#: classes/controller/class.modrewrite_content_controller.php:211
#, php-format
msgid ""
"Invalid separator for article, allowed is one of following characters: %s"
msgstr "Trenner für Kategorie ist ungültig, erlaubt ist eines der Zeichen: %s"
#: classes/controller/class.modrewrite_content_controller.php:218
#, php-format
msgid "Please specify separator (%s) for article words"
msgstr "Bitte Trenner (%s) für Kategorie angeben"
#: classes/controller/class.modrewrite_content_controller.php:223
#, php-format
msgid ""
"Invalid separator for article words, allowed is one of following characters: "
"%s"
msgstr "Trenner für Kategorie ist ungültig, erlaubt ist eines der Zeichen: %s"
#: classes/controller/class.modrewrite_content_controller.php:230
msgid "Separator for category and category words must not be identical"
msgstr "Trenner für Kategorie und Kategoriewörter dürfen nicht identisch sein"
#: classes/controller/class.modrewrite_content_controller.php:235
msgid "Separator for category and article words must not be identical"
msgstr "Separator for category and article words must not be identical"
#: classes/controller/class.modrewrite_content_controller.php:240
msgid "Separator for category-article and article words must not be identical"
msgstr ""
"Trenner für Kategorie-Artikel und Artikelwörter dürfen nicht identisch sein"
#: classes/controller/class.modrewrite_content_controller.php:257
msgid ""
"The file extension has a invalid format, allowed are the chars \\.([a-zA-"
"Z0-9\\-_\\/])"
msgstr ""
"Das Rootverzeichnis hat ein ungültiges Format, erlaubt sind die Zeichen [a-"
"zA-Z0-9\\-_\\/\\.]"
#: classes/controller/class.modrewrite_content_controller.php:271
msgid "Value has to be numeric."
msgstr "Wert muss numerisch sein."
#: classes/controller/class.modrewrite_content_controller.php:275
msgid "Value has to be between 0 an 100."
msgstr "Wert muss zwischen 0 und 100 sein."
#: classes/controller/class.modrewrite_content_controller.php:292
msgid ""
"The article name has a invalid format, allowed are the chars /^[a-zA-Z0-9\\-_"
"\\/\\.]*$/"
msgstr ""
"Das Rootverzeichnis hat ein ungültiges Format, erlaubt sind die Zeichen [a-"
"zA-Z0-9\\-_\\/\\.]"
#: classes/controller/class.modrewrite_content_controller.php:355
msgid "Please check your input"
msgstr "Bitte überprüfen Sie ihre Eingaben"
#: classes/controller/class.modrewrite_content_controller.php:365
msgid "Configuration has <b>not</b> been saved, because of enabled debugging"
msgstr "Konfiguration wurde <b>nicht</b> gespeichert, weil debugging aktiv ist"
#: classes/controller/class.modrewrite_content_controller.php:373
msgid "Configuration has been saved"
msgstr "Die Konfiguration wurde gespeichert"
#: classes/controller/class.modrewrite_content_controller.php:379
#, php-format
msgid "Configuration could not saved. Please check write permissions for %s "
msgstr ""
"Konfiguration konnte nicht gespeichert werden. Überprüfen Sie bitte die "
"Schreibrechte für %s"
#: classes/controller/class.modrewrite_content_controller.php:412
msgid ""
"Your Contenido installation runs with the setting 'is_start_compatible'. "
"This plugin will not work properly in this mode.<br />Please check following "
"topic in Contenido forum to change this:<br /><br /><a href='http://forum."
"contenido.org/viewtopic.php?t=32530' class='blue' "
"target='_blank'>is_start_compatible auf neue Version umstellen</a>"
msgstr ""
"Ihre Contenido-Installation läuft mit der Einstellung 'is_start_compatible'. "
"Dieses Plugin wird mit dieser Einstellung nicht wie gewünscht funktionieren."
"<br />Bitte überprüfen Sie folngenden Beitrag im Contenido Forum, um dies zu "
"ändern:<br /><br /><a href='http://forum.contenido.org/viewtopic.php?"
"t=32530' class='blue' target='_blank'>is_start_compatible auf neue Version "
"umstellen</a>"
#: classes/controller/class.modrewrite_content_controller.php:420
#, php-format
msgid ""
"It seems as if some categories don't have a set 'urlpath' entry in the "
"database. Please reset empty aliases in %sFunctions%s area."
msgstr ""
"Es scheint so zu sein, als ob zu einigen Kategorien die Datenbank-Einträge "
"für 'urlpath' fehlen. Bitte setzen Sie leere Aliase unter %sFunktionen%s "
"zurück."
#~ msgid "No Client selected"
#~ msgstr "Kein Mandant ausgewählt"

Datei anzeigen

@ -1,744 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-15 18:37+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: includes/include.mod_rewrite_content.php:177
msgid "Version"
msgstr ""
#: includes/include.mod_rewrite_content.php:178
msgid "Author"
msgstr ""
#: includes/include.mod_rewrite_content.php:179
msgid "E-Mail to author"
msgstr ""
#: includes/include.mod_rewrite_content.php:180
msgid "Plugin page"
msgstr ""
#: includes/include.mod_rewrite_content.php:181
msgid "Visit plugin page"
msgstr ""
#: includes/include.mod_rewrite_content.php:182
msgid "opens page in new window"
msgstr ""
#: includes/include.mod_rewrite_content.php:183
msgid "CONTENIDO forum"
msgstr ""
#: includes/include.mod_rewrite_content.php:184
msgid "Plugin thread in CONTENIDO forum"
msgstr ""
#: includes/include.mod_rewrite_content.php:185
msgid "Plugin settings"
msgstr ""
#: includes/include.mod_rewrite_content.php:186
#: includes/include.mod_rewrite_contentexpert.php:87
msgid "Note"
msgstr ""
#: includes/include.mod_rewrite_content.php:189
#, php-format
msgid ""
"The .htaccess file could not found either in CONTENIDO installation "
"directory nor in client directory.<br>It should set up in %sFunctions%s "
"area, if needed."
msgstr ""
#: includes/include.mod_rewrite_content.php:192
#, php-format
msgid ""
"Found some category and/or article aliases. It is recommended to run the "
"reset function in %sFunctions%s area, if needed."
msgstr ""
#: includes/include.mod_rewrite_content.php:195
msgid "Enable Advanced Mod Rewrite"
msgstr ""
#: includes/include.mod_rewrite_content.php:197
msgid ""
"Disabling of plugin does not result in disabling mod rewrite module of the "
"web server - This means,<br> all defined rules in the .htaccess are still "
"active and could create unwanted side effects.<br><br>Apache mod rewrite "
"could be enabled/disabled by setting the RewriteEngine directive.<br>Any "
"defined rewrite rules could remain in the .htaccess and they will not "
"processed,<br>if the mod rewrite module is disabled"
msgstr ""
#: includes/include.mod_rewrite_content.php:199
msgid "Example"
msgstr ""
#: includes/include.mod_rewrite_content.php:201
msgid ""
"# enable apache mod rewrite module\n"
"RewriteEngine on\n"
"\n"
"# disable apache mod rewrite module\n"
"RewriteEngine off"
msgstr ""
#: includes/include.mod_rewrite_content.php:203
msgid "Path to .htaccess from DocumentRoot"
msgstr ""
#: includes/include.mod_rewrite_content.php:204
msgid ""
"Type '/' if the .htaccess file lies inside the wwwroot (DocumentRoot) folder."
"<br>Type the path to the subfolder fromm wwwroot, if CONTENIDO is installed "
"in a subfolder within the wwwroot<br>(e. g. http://domain/mycontenido -&gt; "
"path = '/mycontenido/')"
msgstr ""
#: includes/include.mod_rewrite_content.php:206
msgid "Check path to .htaccess"
msgstr ""
#: includes/include.mod_rewrite_content.php:207
msgid ""
"The path will be checked, if this option is enabled.<br>But this could "
"result in an error in some cases, even if the specified path is valid "
"and<br>clients DocumentRoot differs from CONTENIDO backend DocumentRoot."
msgstr ""
#: includes/include.mod_rewrite_content.php:209
msgid "Should the name of root category be displayed in the URL?"
msgstr ""
#: includes/include.mod_rewrite_content.php:210
msgid "Start from root category"
msgstr ""
#: includes/include.mod_rewrite_content.php:211
msgid ""
"If enabled, the name of the root category (e. g. 'Mainnavigation' in a "
"CONTENIDO default installation), will be preceded to the URL."
msgstr ""
#: includes/include.mod_rewrite_content.php:213
msgid "Are several clients maintained in one directory?"
msgstr ""
#: includes/include.mod_rewrite_content.php:214
msgid "Prepend client to the URL"
msgstr ""
#: includes/include.mod_rewrite_content.php:215
msgid "Use client name instead of the id"
msgstr ""
#: includes/include.mod_rewrite_content.php:217
msgid ""
"Should the language appear in the URL (required for multi language websites)?"
msgstr ""
#: includes/include.mod_rewrite_content.php:218
msgid "Prepend language to the URL"
msgstr ""
#: includes/include.mod_rewrite_content.php:219
msgid "Use language name instead of the id"
msgstr ""
#: includes/include.mod_rewrite_content.php:221
msgid ""
"Configure your own separators with following 4 settings<br>to control "
"generated URLs to your own taste"
msgstr ""
#: includes/include.mod_rewrite_content.php:222
msgid ""
"www.domain.com/category1-category2.articlename.html\n"
"www.domain.com/category1/category2-articlename.html\n"
"www.domain.com/category.name1~category2~articlename.html\n"
"www.domain.com/category_name1-category2-articlename.foo"
msgstr ""
#: includes/include.mod_rewrite_content.php:223
msgid "Category separator has to be different from category-word separator"
msgstr ""
#: includes/include.mod_rewrite_content.php:224
msgid ""
"# Example: Category separator (/) and category-word separator (_)\n"
"category_one/category_two/articlename.html"
msgstr ""
#: includes/include.mod_rewrite_content.php:225
msgid "Category separator has to be different from article-word separator"
msgstr ""
#: includes/include.mod_rewrite_content.php:226
msgid ""
"# Example: Category separator (/) and article-word separator (-)\n"
"category_one/category_two/article-description.html"
msgstr ""
#: includes/include.mod_rewrite_content.php:227
msgid ""
"Category-article separator has to be different from article-word separator"
msgstr ""
#: includes/include.mod_rewrite_content.php:228
msgid ""
"# Example: Category-article separator (/) and article-word separator (-)\n"
"category_one/category_two/article-description.html"
msgstr ""
#: includes/include.mod_rewrite_content.php:230
msgid "Category separator (delemiter between single categories)"
msgstr ""
#: includes/include.mod_rewrite_content.php:231
#: includes/include.mod_rewrite_content.php:232
#, php-format
msgid "(possible values: %s)"
msgstr ""
#: includes/include.mod_rewrite_content.php:233
msgid "Category-word separator (delemiter between category words)"
msgstr ""
#: includes/include.mod_rewrite_content.php:234
msgid ""
"Category-article separator (delemiter between category-block and article)"
msgstr ""
#: includes/include.mod_rewrite_content.php:235
msgid "Article-word separator (delemiter between article words)"
msgstr ""
#: includes/include.mod_rewrite_content.php:237
msgid "Append article name to URLs"
msgstr ""
#: includes/include.mod_rewrite_content.php:238
msgid "Append article name always to URLs (even at URLs to categories)"
msgstr ""
#: includes/include.mod_rewrite_content.php:239
msgid "Default article name without extension"
msgstr ""
#: includes/include.mod_rewrite_content.php:240
msgid ""
"e. g. 'index' for index.ext<br>In case of selected 'Append article name "
"always to URLs' option and a empty field,<br>the name of the start article "
"will be used"
msgstr ""
#: includes/include.mod_rewrite_content.php:242
msgid "File extension at the end of the URL"
msgstr ""
#: includes/include.mod_rewrite_content.php:243
msgid ""
"Specification of file extension with a preceded dot<br>e.g. '.html' for "
"http://host/foo/bar.html"
msgstr ""
#: includes/include.mod_rewrite_content.php:244
msgid ""
"It's strongly recommended to specify a extension here,<br>if the option "
"'Append article name always to URLs' was not selected.<br><br>Otherwise URLs "
"to categories and articles would have the same format<br>which may result in "
"unresolvable categories/articles in some cases."
msgstr ""
#: includes/include.mod_rewrite_content.php:245
msgid ""
"It's necessary to specify a file extension at the moment, due do existing "
"issues, which are not solved until yet. An not defined extension may result "
"in invalid article detection in some cases."
msgstr ""
#: includes/include.mod_rewrite_content.php:247
msgid "Should the URLs be written in lower case?"
msgstr ""
#: includes/include.mod_rewrite_content.php:248
msgid "URLs in lower case"
msgstr ""
#: includes/include.mod_rewrite_content.php:250
msgid "Duplicated content"
msgstr ""
#: includes/include.mod_rewrite_content.php:251
msgid "Prevent duplicated content"
msgstr ""
#: includes/include.mod_rewrite_content.php:253
msgid ""
"Depending on configuration, pages could be found thru different URLs."
"<br>Enabling of this option prevents this. Examples for duplicated content"
msgstr ""
#: includes/include.mod_rewrite_content.php:254
msgid ""
"Name of the root category in the URL: Feasible is /maincategory/subcategory/ "
"and /subcategory/\n"
"Language in the URL: Feasible is /german/category/ and /1/category/\n"
"Client in the URL: Feasible is /client/category/ und /1/category/"
msgstr ""
#: includes/include.mod_rewrite_content.php:257
msgid "Percentage for similar category paths in URLs"
msgstr ""
#: includes/include.mod_rewrite_content.php:258
msgid ""
"This setting refers only to the category path of a URL. If AMR is "
"configured<br>to prepend e. g. the root category, language and/or client to "
"the URL,<br>the specified percentage will not applied to those parts of the "
"URL.<br>An incoming URL will be cleaned from those values and the remaining "
"path (urlpath of the category)<br>will be checked against similarities."
msgstr ""
#: includes/include.mod_rewrite_content.php:259
msgid ""
"100 = exact match with no tolerance\n"
"85 = paths with little errors will match to similar ones\n"
"0 = matching will work even for total wrong paths"
msgstr ""
#: includes/include.mod_rewrite_content.php:261
msgid "Redirect in case of invalid articles"
msgstr ""
#: includes/include.mod_rewrite_content.php:262
msgid "Redirect to error page in case of invaid articles"
msgstr ""
#: includes/include.mod_rewrite_content.php:263
msgid "The start page will be displayed if this option is not enabled"
msgstr ""
#: includes/include.mod_rewrite_content.php:265
msgid "Moment of URL generation"
msgstr ""
#: includes/include.mod_rewrite_content.php:266
msgid "a.) During the output of HTML code of the page"
msgstr ""
#: includes/include.mod_rewrite_content.php:267
msgid ""
"Clean-URLs will be generated during page output. Modules/Plugins are able to "
"generate URLs to frontend<br>as usual as in previous CONTENIDO versions "
"using a format like 'front_content.php?idcat=1&amp;idart=2'.<br>The URLs "
"will be replaced by the plugin to Clean-URLs before sending the HTML output."
msgstr ""
#: includes/include.mod_rewrite_content.php:268
msgid "Differences to variant b.)"
msgstr ""
#: includes/include.mod_rewrite_content.php:269
msgid ""
"Still compatible to old modules/plugins, since no changes in codes are "
"required\n"
"All occurring URLs in HTML code, even those set by wysiwyg, will be switched "
"to Clean-URLs\n"
"All URLs will usually be collected and converted to Clean-URLs at once."
"<br>Doing it this way reduces the amount of executed database significantly."
msgstr ""
#: includes/include.mod_rewrite_content.php:272
msgid "b.) In modules or plugins"
msgstr ""
#: includes/include.mod_rewrite_content.php:273
msgid ""
"By using this option, all Clean-URLs will be generated directly in module or "
"plugins.<br>This means, all areas in modules/plugins, who generate internal "
"URLs to categories/articles, have to be adapted manually.<br>All Clean-URLs "
"have to be generated by using following function:"
msgstr ""
#: includes/include.mod_rewrite_content.php:274
msgid ""
"# structure of a normal url\n"
"$url = 'front_content.php?idart=123&amp;lang=2&amp;client=1';\n"
"\n"
"# creation of a url by using the CONTENIDOs Url-Builder (since 4.8.9),\n"
"# wich expects the parameter as a assoziative array\n"
"$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n"
"$newUrl = Contenido_Url::getInstance()->build($params);"
msgstr ""
#: includes/include.mod_rewrite_content.php:275
msgid "Differences to variant a.)"
msgstr ""
#: includes/include.mod_rewrite_content.php:276
msgid ""
"The default way to generate URLs to fronend pages\n"
"Each URL in modules/plugins has to be generated by UriBuilder\n"
"Each generated Clean-Url requires a database query"
msgstr ""
#: includes/include.mod_rewrite_content.php:279
msgid "Routing"
msgstr ""
#: includes/include.mod_rewrite_content.php:280
msgid "Routing definitions for incoming URLs"
msgstr ""
#: includes/include.mod_rewrite_content.php:281
msgid "Type one routing definition per line as follows:"
msgstr ""
#: includes/include.mod_rewrite_content.php:282
msgid ""
"# {incoming_url}>>>{new_url}\n"
"/incoming_url/name.html>>>new_url/new_name.html\n"
"\n"
"# route a specific incoming url to a new page\n"
"/campaign/20_percent_on_everything_except_animal_food.html>>>front_content."
"php?idcat=23\n"
"\n"
"# route request to wwwroot to a specific page\n"
"/>>>front_content.php?idart=16"
msgstr ""
#: includes/include.mod_rewrite_content.php:283
msgid ""
"The routing does not sends a HTTP header redirection to the destination URL, "
"the redirection will happen internally by<br>replacing the detected incoming "
"URL against the new destination URL (overwriting of article- categoryid)\n"
"Incoming URLs can point to non existing resources (category/article), but "
"the desttination URLs should point<br>to valid CONTENIDO articles/"
"categories\n"
"Destination URLs should point to real URLs to categories/articles,<br>e. g."
"front_content.php?idcat=23 or front_content.php?idart=34\n"
"The language id should attached to the URL in multi language sites<br>e. g. "
"front_content.php?idcat=23&amp;lang=1\n"
"The client id should attached to the URL in multi client sites sharing the "
"same folder<br>e. g. front_content.php?idcat=23&amp;client=2\n"
"The destination URL should not start with '/' or './' (wrong: /front_content."
"php, correct: front_content.php)"
msgstr ""
#: includes/include.mod_rewrite_content.php:286
#: includes/include.mod_rewrite_contentexpert.php:90
msgid "Discard changes"
msgstr ""
#: includes/include.mod_rewrite_content.php:287
#: includes/include.mod_rewrite_contentexpert.php:91
msgid "Save changes"
msgstr ""
#: includes/include.mod_rewrite_contenttest.php:55
msgid ""
"Define options to genereate the URLs by using the form below and run the "
"test."
msgstr ""
#: includes/include.mod_rewrite_contenttest.php:56
msgid "Parameter to use"
msgstr ""
#: includes/include.mod_rewrite_contenttest.php:57
msgid "Number of URLs to generate"
msgstr ""
#: includes/include.mod_rewrite_contenttest.php:58
msgid "Run test"
msgstr ""
#: includes/include.mod_rewrite_contenttest.php:60
msgid ""
"{pref}<strong>{name}</strong><br>{pref}Builder in: {url_in}<br>{pref}"
"Builder out: {url_out}<br>{pref}<span style='color:{color}'>Resolved URL: "
"{url_res}</span><br>{pref}Resolver err: {err}<br>{pref}Resolved data: {data}"
msgstr ""
#: includes/include.mod_rewrite_contenttest.php:62
msgid ""
"Duration of test run: {time} seconds.<br>Number of processed URLs: {num_urls}"
"<br><span style='color:green'>Successful resolved: {num_success}</"
"span><br><span style='color:red'>Errors during resolving: {num_fail}</span></"
"strong>"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:61
msgid "Plugin functions"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:63
msgid "Copy/Download .htaccess template"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:64
msgid "Select .htaccess template"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:65
msgid "Restrictive .htaccess"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:66
msgid "Simple .htaccess"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:67
msgid ""
"Contains rules with restrictive settings.<br>All requests pointing to "
"extension avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov, <br>mp3, "
"pdf, png, ppt, rar, txt, wav, wmv, xml, zip, will be excluded vom rewriting."
"<br>Remaining requests will be rewritten to front_content.php,<br>except "
"requests to 'contenido/', 'setup/', 'cms/upload', 'cms/front_content.php', "
"etc.<br>Each resource, which has to be excluded from rewriting must be "
"specified explicitly."
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:69
msgid ""
"Contains a simple collection of rules. Each requests pointing to valid "
"symlinks, folders or<br>files, will be excluded from rewriting. Remaining "
"requests will be rewritten to front_content.php"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:71
msgid "and copy to"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:72
msgid "CONTENIDO installation directory"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:73
msgid ""
"Copy the selected .htaccess template into CONTENIDO installation "
"directory<br><br>&nbsp;&nbsp;&nbsp;&nbsp;{CONTENIDO_FULL_PATH}.<br><br>This "
"is the recommended option for a CONTENIDO installation with one or more "
"clients<br>who are running on the same domain."
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:75
msgid "client directory"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:76
msgid ""
"Copy the selected .htaccess template into client's directory<br><br>&nbsp;"
"&nbsp;&nbsp;&nbsp;{CLIENT_FULL_PATH}.<br><br>This is the recommended option "
"for a multiple client system<br>where each client has it's own domain/"
"subdomain"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:78
msgid "or"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:79
msgid "Download"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:80
msgid ""
"Download selected .htaccess template to copy it to the destination "
"folder<br>or to take over the settings manually."
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:82
msgid "Reset category-/ and article aliases"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:83
msgid "Reset only empty aliases"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:84
msgid ""
"Only empty aliases will be reset, existing aliases, e. g. manually set "
"aliases, will not be changed."
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:85
msgid "Reset all aliases"
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:86
msgid ""
"Reset all category-/article aliases. Existing aliases will be overwritten."
msgstr ""
#: includes/include.mod_rewrite_contentexpert.php:88
msgid ""
"This process could require some time depending on amount of categories/"
"articles.<br>The aliases will not contain the configured plugin separators, "
"but the CONTENIDO default separators '/' und '-', e. g. '/category-word/"
"article-word'.<br>Execution of this function ma be helpful to prepare all or "
"empty aliases for the usage by the plugin."
msgstr ""
#: includes/config.plugin.php:71
msgid "Advanced Mod Rewrite"
msgstr ""
#: includes/config.plugin.php:72
msgid "Advanced Mod Rewrite functions"
msgstr ""
#: includes/config.plugin.php:73
msgid "Advanced Mod Rewrite test"
msgstr ""
#: classes/controller/class.modrewrite_controller_abstract.php:107
msgid "More informations"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:65
msgid ""
"The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\\-_"
"\\/\\.]"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:72
#, php-format
msgid "The specified directory '%s' does not exists"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:79
#, php-format
msgid ""
"The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This "
"could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends "
"DOCUMENT_ROOT. However, the setting will be taken over because of disabled "
"check."
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:182
#, php-format
msgid "Please specify separator (%s) for category"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:187
#, php-format
msgid "Invalid separator for category, allowed one of following characters: %s"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:194
#, php-format
msgid "Please specify separator (%s) for category words"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:199
#, php-format
msgid ""
"Invalid separator for category words, allowed one of following characters: %s"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:206
#, php-format
msgid "Please specify separator (%s) for article"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:211
#, php-format
msgid ""
"Invalid separator for article, allowed is one of following characters: %s"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:218
#, php-format
msgid "Please specify separator (%s) for article words"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:223
#, php-format
msgid ""
"Invalid separator for article words, allowed is one of following characters: "
"%s"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:230
msgid "Separator for category and category words must not be identical"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:235
msgid "Separator for category and article words must not be identical"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:240
msgid "Separator for category-article and article words must not be identical"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:257
msgid ""
"The file extension has a invalid format, allowed are the chars \\.([a-zA-"
"Z0-9\\-_\\/])"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:271
msgid "Value has to be numeric."
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:275
msgid "Value has to be between 0 an 100."
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:292
msgid ""
"The article name has a invalid format, allowed are the chars /^[a-zA-Z0-9\\-_"
"\\/\\.]*$/"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:355
msgid "Please check your input"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:365
msgid "Configuration has <b>not</b> been saved, because of enabled debugging"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:373
msgid "Configuration has been saved"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:379
#, php-format
msgid "Configuration could not saved. Please check write permissions for %s "
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:412
msgid ""
"Your Contenido installation runs with the setting 'is_start_compatible'. "
"This plugin will not work properly in this mode.<br />Please check following "
"topic in Contenido forum to change this:<br /><br /><a href='http://forum."
"contenido.org/viewtopic.php?t=32530' class='blue' "
"target='_blank'>is_start_compatible auf neue Version umstellen</a>"
msgstr ""
#: classes/controller/class.modrewrite_content_controller.php:420
#, php-format
msgid ""
"It seems as if some categories don't have a set 'urlpath' entry in the "
"database. Please reset empty aliases in %sFunctions%s area."
msgstr ""

Datei anzeigen

@ -1,24 +0,0 @@
./includes/include.mod_rewrite_content.php
./includes/include.mod_rewrite_contenttest.php
./includes/functions.mod_rewrite.php
./includes/include.mod_rewrite_contentexpert.php
./includes/front_content_controller.php
./includes/config.mod_rewrite_default.php
./includes/include.mod_rewrite_content_top.php
./includes/config.plugin.php
./external/aToolTip/demos.html
./templates/content.html
./templates/contenttest.html
./templates/content_top.html
./templates/contentexpert.html
./classes/controller/class.modrewrite_contenttest_controller.php
./classes/controller/class.modrewrite_contentexpert_controller.php
./classes/controller/class.modrewrite_controller_abstract.php
./classes/controller/class.modrewrite_content_controller.php
./classes/class.modrewritedebugger.php
./classes/class.modrewritetest.php
./classes/class.modrewrite.php
./classes/class.modrewriteurlstack.php
./classes/class.modrewritebase.php
./classes/class.modrewritecontroller.php
./classes/class.modrewriteurlutil.php

Datei anzeigen

@ -1,96 +0,0 @@
/**
* Project:
* CONTENIDO Content Management System
*
* Description:
* Plugin Advanced Mod Rewrite JavaScript functions.
*
* Requirements:
* @con_php_req 5.0
*
*
* @package CONTENIDO Plugins
* @version 0.1
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since CONTENIDO release 4.9.0
*
* {@internal
* created 2011-04-11
*
* $Id: mod_rewrite.js 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
var mrPlugin = {
lng: {
more_informations: "More informations"
},
toggle: function(id) {
// do some animation ;-)
$('#' + id).slideToggle("slow");
},
showReadme: function() {
},
initializeSettingsPage: function() {
$(document).ready(function() {
$("#mr_use_language").change(function() {
if (true == $(this).attr("checked")) {
$("#mr_use_language_name").removeAttr("disabled");
} else {
$("#mr_use_language_name").attr("disabled", "disabled");
}
});
$("#mr_use_client").change(function() {
if (true == $(this).attr("checked")) {
$("#mr_use_client_name").removeAttr("disabled");
} else {
$("#mr_use_client_name").attr("disabled", "disabled");
}
});
$("#mr_add_startart_name_to_url").change(function() {
if (true == $(this).attr("checked")) {
$("#mr_default_startart_name").removeAttr("disabled")
.removeClass("disabled");
} else {
$("#mr_default_startart_name").attr("disabled", "disabled")
.addClass("disabled");
}
});
mrPlugin._initializeTooltip();
});
},
initializeExterpPage: function() {
$(document).ready(function() {
mrPlugin._initializeTooltip();
});
},
_initializeTooltip: function() {
$(".mrPlugin a.i-link").each(function () {
$(this).attr("href", "javascript:void(0);");
$(this).attr("title", mrPlugin.lng.more_informations);
var id = $(this).attr("id").substring(0, $(this).attr("id").indexOf("-link"));
$(this).aToolTip({
clickIt: true,
xOffset: -20,
yOffset: 4,
outSpeed: 250,
tipContent: $("#" + id).html()
});
});
}
};

Datei anzeigen

@ -1,101 +0,0 @@
/**
* Project:
* CONTENIDO Content Management System
*
* Description:
* Plugin Advanced Mod Rewrite JavaScript functions.
*
* Requirements:
* @con_php_req 5.0
*
*
* @package CONTENIDO Plugins
* @version 0.1
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
* @since file available since CONTENIDO release 4.9.0
*
* {@internal
* created 2011-04-11
*
* $Id: styles.css 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
/**
* mrPlugin main page
* @section mrPlugin
*/
body.mrPlugin {margin:10px;}
.mrPlugin a {color:#0060b1;}
.mrPlugin strong {font-weight:bold;}
.mrPlugin img {border:none;}
.mrPlugin pre.example {padding:3px 5px; border:1px #000 dashed; width:60%; min-width:650px;}
.mrPlugin li {padding-bottom:0.4em;}
.mrPlugin span.note {color:red;}
.mrPlugin input.disabled {background-color:#dadada;}
.mrPlugin .altBg {background-color:#f1f1f1;}
.mrPlugin .aToolTip ul {padding-left:1em;}
.mrPlugin .clear {clear:both; font-size:0pt !important; height:0pt !important; line-height:0pt !important;}
.mrPlugin .blockLeft {display:block; float:left;}
.mrPlugin .blockRight {display:block; float:right;}
.mrPlugin .nodisplay {display:none;}
/* Header box */
.mrPlugin .headerBox {background-color:#e2e2e2; border:1px solid #b5b5b5; padding:6px; margin-bottom:10px;}
.mrPlugin .headerBox p {margin:0; padding:0;}
.mrPlugin .headerBox ul {margin-bottom:0;}
/* Content table */
.mrPlugin table#contenttable {border:0; border-top:1px; border-left:1px; border-bottom:1px; border-color:#b3b3b3; border-style:solid;}
.mrPlugin table#contenttable th {font-weight:bold; text-align:left;}
.mrPlugin table#contenttable tr {background-color:#fff;}
.mrPlugin th, .mrPlugin td {vertical-align:top;}
.mrPlugin td.col-I {border:0; border-bottom:1px; border-right:1px; border-color:#b3b3b3; border-style:solid;}
.mrPlugin td.col-II {border:0; border-bottom:1px; border-right:1px; border-color:#b3b3b3; border-style:solid;}
.mrPlugin tr.marked td {background-color:#f2b7a1;}
/* Info button */
.mrPlugin a.infoButton,
.mrPlugin a.infoButton:hover {display:block; float:left; width:16px; height:16px; background:transparent url(../../../images/info.gif) no-repeat; margin:0 0 0 5px;}
.mrPlugin a.infoButton.v2,
.mrPlugin a.infoButton:hover.v2 {margin-top:2px;}
/* Plugininfo layer */
.mrPlugin .pluginInfo {}
.mrPlugin .pluginInfo p {font-weight:bold; margin:0; padding:0;}
.mrPlugin .pluginInfo ul {margin:0; padding:0; list-style-type:none;}
.mrPlugin .pluginInfo li {margin:0; padding:0;}
.mrPlugin .pluginInfo li.first {margin-top:0.6em;}
/**
* mrPlugin test page
* @section mrPluginTest
*/
/** @extends body.mrPlugin */
body.mrPluginTest {}
.mrPluginTest .headerBox form {float:left; width:35%; background:#e2e2e2; margin:0; padding-top:10px;}
.mrPluginTest .headerBox fieldset {margin-bottom:10px;}
.mrPluginTest .headerBox fieldset p {margin:0;}
.mrPluginTest .headerBox form .chk {width:24%; float:left;}
.mrPluginTest a {font-family:monospace;}

Datei anzeigen

@ -1,370 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>mod_rewrite_content</title>
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.jquery.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/scripts/mod_rewrite.js"></script>
<link rel="stylesheet" type="text/css" href="styles/contenido.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/external/aToolTip/css/atooltip.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/styles/styles.css">
<script type="text/javascript"><!--
// session-id
var sid = "{SESSID}";
// setup translation
mrPlugin.lng.more_informations = "{LNG_MORE_INFORMATIONS}";
// initialize page
mrPlugin.initializeSettingsPage();
// --></script>
</head>
<body class="mrPlugin">
<div class="headerBox">
<!--
<div class="pluginInfo">
<div><span class="blockLeft">Plugin Advanced Mod Rewrite</span>
<a href="#" id="pluginInfoDetails-link" class="main i-link infoButton" title=""></a><div class="clear"></div></div>
<div id="pluginInfoDetails" style="display:none;">
<ul class="list">
<li class="first"><strong>{LNG_AUTHOR}:</strong> Murat Purc, <a href="mailto:murat@purc.de" title="{LNG_MAIL_TO_AUTHOR}">murat@purc.de</a></li>
<li><strong>{LNG_PLUGINPAGE}:</strong> <a href="http://www.purc.de/playground-coding-contenido_plugin_-_advanced_mod_rewrite-a.109.html" onclick="window.open(this.href); return false;" title="{LNG_VISIT_PLUGINPAGE} ({LNG_OPENS_IN_NEW_WINDOW})">{LNG_VISIT_PLUGINPAGE}</a></li>
<li><strong>{LNG_CONTENIDO_FORUM}:</strong> <a href="http://forum.contenido.org/viewtopic.php?t=21578" onclick="window.open(this.href); return false;" title="{LNG_PLUGINTHREAD_IN_CONTENIDO_FORUM} ({LNG_OPENS_IN_NEW_WINDOW})">{LNG_PLUGINTHREAD_IN_CONTENIDO_FORUM}</a></li>
</ul>
</div>
</div>
-->
</div>
{CONTENT_BEFORE}
<form name="mr_configuration" id="mr_configuration" method="post" action="main.php">
<input type="hidden" name="contenido" value="{SESSID}">
<input type="hidden" name="area" value="{AREA}">
<input type="hidden" name="mr_action" value="save">
<input type="hidden" name="frame" value="4">
<input type="hidden" name="idclient" value="{IDCLIENT}">
<table id="contenttable" cellspacing="0" cellpadding="3" border="0">
<colgroup>
<col width="30%">
<col width="70%">
</colgroup>
<tr style="background-color:#e2e2e2;">
<th colspan="2" class="text_medium col-I" style="border-top:1px;">{LNG_PLUGIN_SETTINGS}</th>
</tr>
<!-- htaccess info / empty aliases -->
<tr style="{HEADER_NOTES_CSS}" class="marked">
<td colspan="2" class="text_medium col-I" style="padding:13px 3px;">
<strong>{LNG_NOTE}</strong><br>
<p style="{HTACCESS_INFO_CSS}">
{LNG_MSG_NO_HTACCESS_FOUND}<br>
</p>
<p style="{EMPTYALIASES_INFO_CSS}">
{LNG_MSG_NO_EMPTYALIASES_FOUND}<br>
</p>
</td>
</tr>
<!-- enable/disable mod rewrite -->
<tr>
<td colspan="2" class="text_medium col-I">
<div class="blockLeft">
<input type="checkbox" id="mr_use" name="use" value="1"{USE_CHK}>
<label for="mr_use">{LNG_ENABLE_AMR}</label>
</div>
<a href="#" id="enableInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<div id="enableInfo1" style="display:none;">
<strong>{LNG_NOTE}</strong><br>
{LNG_MSG_ENABLE_AMR_INFO}<br>
<br>
<strong>{LNG_EXAMPLE}:</strong>
<pre class="example">{LNG_MSG_ENABLE_AMR_INFO_EXAMPLE}</pre>
</div>
</td>
</tr>
<!-- root dir -->
<tr>
<td class="text_medium col-I">{LNG_ROOTDIR}</td>
<td class="text_medium col-II" align="left">
{ROOTDIR_ERROR}
<input class="text_medium blockLeft" type="text" name="rootdir" size="50" maxlength="64" value="{ROOTDIR}">
<a href="#" id="rootdirInfo1-link" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div id="rootdirInfo1" style="display:none;">{LNG_ROOTDIR_INFO}</div>
<br>
<div class="blockLeft">
<input type="checkbox" id="mr_checkrootdir" name="checkrootdir" value="1"{CHECKROOTDIR_CHK}>
<label for="mr_checkrootdir">{LNG_CHECKROOTDIR}</label>
</div>
<a href="#" id="rootdirInfo2-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<div id="rootdirInfo2" style="display:none;">{LNG_CHECKROOTDIR_INFO}</div>
</td>
</tr>
<!-- use client/use client name -->
<tr>
<td class="text_medium col-I">{LNG_USE_CLIENT}</td>
<td class="text_medium col-II" align="left">
<input type="checkbox" id="mr_use_client" name="use_client" value="1"{USE_CLIENT_CHK}>
<label for="mr_use_client">{LNG_USE_CLIENT_LBL}</label><br>
<br>
<input type="checkbox" id="mr_use_client_name" name="use_client_name" value="1"{USE_CLIENT_NAME_CHK}{USE_CLIENT_NAME_DISABLED}>
<label for="mr_use_client_name">{LNG_USE_CLIENT_NAME_LBL}</label><br>
</td>
</tr>
<!-- use language/use language name -->
<tr>
<td class="text_medium col-I">{LNG_USE_LANGUAGE}</td>
<td class="text_medium col-II" align="left">
<input type="checkbox" id="mr_use_language" name="use_language" value="1"{USE_LANGUAGE_CHK}>
<label for="mr_use_language">{LNG_USE_LANGUAGE_LBL}</label><br>
<br>
<input type="checkbox" id="mr_use_language_name" name="use_language_name" value="1"{USE_LANGUAGE_NAME_CHK}{USE_LANGUAGE_NAME_DISABLED}>
<label for="mr_use_language_name">{LNG_USE_LANGUAGE_NAME_LBL}</label><br>
</td>
</tr>
<!-- start from root -->
<tr>
<td class="text_medium col-I">{LNG_STARTFROMROOT}</td>
<td class="text_medium col-II" align="left">
<div class="blockLeft">
<input type="checkbox" id="mr_startfromroot" name="startfromroot" value="1"{STARTFROMROOT_CHK}>
<label for="mr_startfromroot">{LNG_STARTFROMROOT_LBL}</label>
</div>
<a href="#" id="startFromRootInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<div id="startFromRootInfo1" style="display:none;">{LNG_STARTFROMROOT_INFO}</div>
</td>
</tr>
<!-- activate userdefined separator settings -->
<tr>
<td colspan="2" class="text_medium col-I altBg">
<strong class="blockLeft">{LNG_USERDEFINED_SEPARATORS_HEADER}</strong>
<a href="#" id="userdefSeparatorInfo1-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div id="userdefSeparatorInfo1" style="display:none;">
<strong>{LNG_EXAMPLE}:</strong>
<pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE}</pre>
<strong>{LNG_NOTE}:</strong>
<ul>
<li>{LNG_USERDEFINED_SEPARATORS_EXAMPLE_A}
<pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE_A_EXAMPLE}</pre>
</li>
<li>{LNG_USERDEFINED_SEPARATORS_EXAMPLE_B}
<pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE_B_EXAMPLE}</pre>
</li>
<li>{LNG_USERDEFINED_SEPARATORS_EXAMPLE_C}
<pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE_C_EXAMPLE}</pre>
</li>
</ul>
</div>
</td>
</tr>
<tr>
<td class="text_medium col-I altBg">{LNG_CATEGORY_SEPARATOR}</td>
<td class="text_medium col-II" align="left">
{CATEGORY_SEPARATOR_ERROR}
<input class="text_medium" type="text" id="mr_category_seperator" name="category_seperator" size="5" maxlength="1" value="{CATEGORY_SEPARATOR}"{CATEGORY_SEPARATOR_ATTRIB}>
<small>{LNG_CATART_SEPARATOR_INFO}</small>
</td>
</tr>
<tr>
<td class="text_medium col-I altBg">{LNG_CATEGORY_WORD_SEPARATOR}</td>
<td class="text_medium col-II" align="left">
{CATEGORY_WORD_SEPARATOR_ERROR}
<input class="text_medium" type="text" id="mr_category_word_seperator" name="category_word_seperator" size="5" maxlength="1" value="{CATEGORY_WORD_SEPARATOR}"{CATEGORY_WORD_SEPARATOR_ATTRIB}>
<small>{LNG_WORD_SEPARATOR_INFO}</small>
</td>
</tr>
<tr>
<td class="text_medium col-I altBg">{LNG_ARTICLE_SEPARATOR}</td>
<td class="text_medium col-II" align="left">
{ARTICLE_SEPARATOR_ERROR}
<input class="text_medium" type="text" id="mr_article_seperator" name="article_seperator" size="5" maxlength="1" value="{ARTICLE_SEPARATOR}"{ARTICLE_SEPARATOR_ATTRIB}>
<small>{LNG_CATART_SEPARATOR_INFO}</small>
</td>
</tr>
<tr>
<td class="text_medium col-I altBg">{LNG_ARTICLE_WORD_SEPARATOR}</td>
<td class="text_medium col-II" align="left">
{ARTICLE_WORD_SEPARATOR_ERROR}
<input class="text_medium" type="text" id="mr_article_word_seperator" name="article_word_seperator" size="5" maxlength="1" value="{ARTICLE_WORD_SEPARATOR}"{ARTICLE_WORD_SEPARATOR_ATTRIB}>
<small>{LNG_WORD_SEPARATOR_INFO}</small>
</td>
</tr>
<!-- add start article name to url -->
<tr>
<td class="text_medium col-I">{LNG_ADD_STARTART_NAME_TO_URL}</td>
<td class="text_medium col-II" align="left">
{ADD_STARTART_NAME_TO_URL_ERROR}
<input type="checkbox" id="mr_add_startart_name_to_url" name="add_startart_name_to_url" value="1"{ADD_STARTART_NAME_TO_URL_CHK}>
<label for="mr_add_startart_name_to_url">{LNG_ADD_STARTART_NAME_TO_URL_LBL}</label><br>
<br>
<div class="blockLeft">
<label for="mr_default_startart_name">{LNG_DEFAULT_STARTART_NAME}</label><br>
<input class="text_medium" type="text" id="mr_default_startart_name" name="default_startart_name" size="50" maxlength="64" value="{DEFAULT_STARTART_NAME}">
</div>
<a href="#" id="defaultStartArtNameInfo1-link" title="" class="main i-link infoButton v2" style="margin-top:1.2em;"></a><div class="clear"></div>
<div id="defaultStartArtNameInfo1" style="display:none">{LNG_DEFAULT_STARTART_NAME_INFO}</div>
</td>
</tr>
<!-- file extension -->
<tr>
<td class="text_medium col-I">{LNG_FILE_EXTENSION}</td>
<td class="text_medium col-II" align="left">
{FILE_EXTENSION_ERROR}
<div class="blockLeft">
<input class="text_medium" type="text" name="file_extension" size="10" maxlength="10" value="{FILE_EXTENSION}"><br>
</div>
<a href="#" id="fileExtensionInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<div id="fileExtensionInfo1" style="display:none;">
{LNG_FILE_EXTENSION_INFO}<br><br>
<strong>{LNG_NOTE}:</strong><br>
{LNG_FILE_EXTENSION_INFO2}
</div>
<p style="color:red">{LNG_FILE_EXTENSION_INFO3}</p>
</td>
</tr>
<!-- use lowercase url -->
<tr>
<td class="text_medium col-I">{LNG_USE_LOWERCASE_URI}</td>
<td class="text_medium col-II" align="left">
<input type="checkbox" id="mr_use_lowercase_uri" name="use_lowercase_uri" value="1"{USE_LOWERCASE_URI_CHK}>
<label for="mr_use_lowercase_uri">{LNG_USE_LOWERCASE_URI_LBL}</label>
</td>
</tr>
<!-- prevent duplicated content -->
<tr>
<td class="text_medium col-I">{LNG_PREVENT_DUPLICATED_CONTENT}</td>
<td class="text_medium col-II" align="left">
<div class="blockLeft">
<input type="checkbox" id="mr_prevent_duplicated_content" name="prevent_duplicated_content" value="1"{PREVENT_DUPLICATED_CONTENT_CHK}> <label for="mr_prevent_duplicated_content">{LNG_PREVENT_DUPLICATED_CONTENT_LBL}</label><br>
</div>
<a href="#" id="preventDuplicatedContentInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<div id="preventDuplicatedContentInfo1" style="display:none;">
{LNG_PREVENT_DUPLICATED_CONTENT_INFO}:<br>
<ul>
{LNG_PREVENT_DUPLICATED_CONTENT_INFO2}
</ul>
</div>
</td>
</tr>
<!-- category resolve min percentage -->
<tr>
<td class="text_medium col-I">{LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE}</td>
<td class="text_medium col-II" align="left">
{CATEGORY_RESOLVE_MIN_PERCENTAGE_ERROR}
<div class="blockLeft">
<input class="text_medium" type="text" name="category_resolve_min_percentage" size="5" maxlength="3" value="{CATEGORY_RESOLVE_MIN_PERCENTAGE}"> (0 - 100)
</div>
<a href="#" id="categoryResolveMinPercentageInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<div id="categoryResolveMinPercentageInfo1" style="display:none;">
<p>{LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE_INFO}</p>
<strong>{LNG_EXAMPLE}:</strong>
<pre class="example">{LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE_EXAMPLE}</pre>
</div>
</td>
</tr>
<!-- redirect invalid article to errorsite -->
<tr>
<td class="text_medium col-I">{LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE}</td>
<td class="text_medium col-II" align="left">
<div class="blockLeft">
<input type="checkbox" id="mr_redirect_invalid_article_to_errorsite" name="redirect_invalid_article_to_errorsite" value="1"{REDIRECT_INVALID_ARTICLE_TO_ERRORSITE_CHK}>
<label for="mr_redirect_invalid_article_to_errorsite">{LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE_LBL}</label><br>
</div>
<a href="#" id="redirectInvalidArticleToErrorsiteInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<div id="redirectInvalidArticleToErrorsiteInfo1" style="display:none;">
{LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE_INFO}
</div>
</td>
</tr>
<!-- rewrite urls at -->
<tr>
<td class="text_medium col-I">{LNG_REWRITE_URLS_AT}</td>
<td class="text_medium col-II" align="left">
<div class="blockLeft">
<input type="radio" id="rewrite_urls_at_front_content_output" name="rewrite_urls_at" value="front_content_output"{REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_CHK}>
<label for="rewrite_urls_at_front_content_output">{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_LBL}</label>
</div>
<a href="#" id="rewriteUrlsAtInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<div id="rewriteUrlsAtInfo1" style="display:none;">
{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_INFO}<br>
<br>
<strong>{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_INFO2}:</strong>
<ul>
{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_INFO3}
</ul>
</div>
<br>
<div class="blockLeft">
<input type="radio" id="rewrite_urls_at_congeneratecode" name="rewrite_urls_at" value="congeneratecode"{REWRITE_URLS_AT_CONGENERATECODE_CHK}>
<label for="rewrite_urls_at_congeneratecode">{LNG_REWRITE_URLS_AT_CONGENERATECODE_LBL}</label><br>
</div>
<a href="#" id="rewriteUrlsAtInfo2-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<div id="rewriteUrlsAtInfo2" style="display:none;">
{LNG_REWRITE_URLS_AT_CONGENERATECODE_INFO}<br>
<pre class="example">{LNG_REWRITE_URLS_AT_CONGENERATECODE_EXAMPLE}</pre>
<strong>{LNG_REWRITE_URLS_AT_CONGENERATECODE_INFO2}:</strong>
<ul>
{LNG_REWRITE_URLS_AT_CONGENERATECODE_INFO3}
</ul>
</div>
</td>
</tr>
<!-- routing -->
<tr>
<td class="text_medium col-I">{LNG_REWRITE_ROUTING}</td>
<td class="text_medium col-II" align="left">
<div class="blockLeft">{LNG_REWRITE_ROUTING_INFO}</div>
<a href="#" id="routingInfo1-link" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div id="routingInfo1" style="display:none;">
{LNG_REWRITE_ROUTING_INFO2}
<pre class="example">{LNG_REWRITE_ROUTING_EXAMPLE}</pre>
<br>
<ul>
{LNG_REWRITE_ROUTING_INFO3}
</ul>
</div>
<textarea class="txt" id="rewrite_routing" name="rewrite_routing" rows="5" cols="80" style="width:100%;height:100px;">{REWRITE_ROUTING}</textarea>
</td>
</tr>
<tr>
<td colspan="2" class="text_medium col-I" style="text-align:right">
<a accesskey="c" href="main.php?area={AREA}&amp;frame=4&amp;idclient={IDCLIENT}&amp;contenido={SESSID}">
<img src="images/but_cancel.gif" alt="" title="{LNG_DISCARD_CHANGES}" /></a>
<input style="margin-left:20px;" accesskey="s" type="image" src="images/but_ok.gif" alt="" title="{LNG_SAVE_CHANGES}" />
</td>
</tr>
</table>
</form>
{CONTENT_AFTER}
</body>
</html>

Datei anzeigen

@ -1,36 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>mod_rewrite_content_menu_top</title>
<meta http-equiv="expires" content="0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="stylesheet" type="text/css" href="styles/contenido.css" />
<script type="text/javascript"><!--
// session-id
var sid = "{SESSID}";
// --></script>
<style type="text/css">
img {border:none;}
</style>
</head>
<body>
<div id="navcontainer">
<div style="float:left;">
<img src="images/frame_handle_re.gif" style="border:0px;float:left;" alt="" />
<img style="margin:7px 0 0 7px;" id="toggleimage" onclick="parent.parent.frameResize.toggle()" src="images/spacer.gif" alt="" />
</div>
</div>
<script type="text/javascript"><!--
if (parent.parent.frames[0].name != "header") {
parent.parent.frameResize.init();
parent.parent.frameResize.toggle();
}
// --></script>
</body>
</html>

Datei anzeigen

@ -1,151 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>mod_rewrite_content_expert</title>
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/scripts/mod_rewrite.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.jquery.js"></script>
<link rel="stylesheet" type="text/css" href="styles/contenido.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/external/aToolTip/css/atooltip.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/styles/styles.css">
<script type="text/javascript"><!--
// session-id
var sid = "{SESSID}";
// setup translation
mrPlugin.lng.more_informations = "{LNG_MORE_INFORMATIONS}";
// initialize page
mrPlugin.initializeSettingsPage();
function mrPlugin_sendForm(action, params) {
$('#mr_expert_action').val(action);
var frm = $('#mr_expert');
frm.attr('action', frm.attr('action') + '?' + params).submit();
}
// --></script>
</head>
<body class="mrPlugin">
<div class="headerBox">
{LNG_PLUGIN_FUNCTIONS}
</div>
{CONTENT_BEFORE}
<form name="mr_expert" id="mr_expert" method="post" action="main.php">
<input type="hidden" name="contenido" value="{SESSID}">
<input type="hidden" name="area" value="{AREA}">
<input type="hidden" name="mr_action" id="mr_expert_action" value="">
<input type="hidden" name="frame" value="4">
<input type="hidden" name="idclient" value="{IDCLIENT}">
<table id="contenttable" cellspacing="0" cellpadding="3" border="0">
<colgroup>
<col width="30%">
<col width="70%">
</colgroup>
<!-- copy .htaccess -->
<tr style="{COPY_HTACCESS_CSS}">
<td class="text_medium col-I">{LNG_COPY_HTACCESS_TYPE}</td>
<td class="text_medium col-II" align="left">
{COPY_HTACCESS_ERROR}
<label for="mr_copy_htaccess_type">{LNG_COPY_HTACCESS_TYPE_LBL}</label><br>
<select class="blockLeft" name="htaccesstype" id="mr_copy_htaccess_type">
<option value="restrictive">{LNG_COPY_HTACCESS_TYPE1}</option>
<option value="simple">{LNG_COPY_HTACCESS_TYPE2}</option>
</select>
<a href="#" id="copyHtaccessInfo1-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div id="copyHtaccessInfo1" style="display:none;">
<strong>{LNG_COPY_HTACCESS_TYPE1}:</strong><br>
{LNG_COPY_HTACCESS_TYPE_INFO1}<br>
<br>
<strong>{LNG_COPY_HTACCESS_TYPE2}:</strong><br>
{LNG_COPY_HTACCESS_TYPE_INFO2}<br>
</div>
<div class="clear"></div>
<br>
{LNG_COPY_HTACCESS_TO}<br>
<br>
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('copyhtaccess', 'copy=contenido');">
<img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_COPY_HTACCESS_TO_CONTENIDO}</a>
<a href="#" id="copyHtaccessInfo2-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div id="copyHtaccessInfo2" style="display:none;">
{LNG_COPY_HTACCESS_TO_CONTENIDO_INFO}
</div>
<br>
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('copyhtaccess', 'copy=cms');">
<img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_COPY_HTACCESS_TO_CLIENT}</a>
<a href="#" id="copyHtaccessInfo3-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div id="copyHtaccessInfo3" style="display:none;">
{LNG_COPY_HTACCESS_TO_CLIENT_INFO}
</div>
<br>
{LNG_OR}<br>
<br>
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('downloadhtaccess', '');">
<img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_DOWNLOAD}</a>
<a href="#" id="showHtaccessInfo-link1" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div id="showHtaccessInfo" style="display:none;">
{LNG_DOWNLOAD_INFO}
</div>
<br>
<div class="clear"></div>
</td>
</tr>
<!-- reset -->
<tr>
<td class="text_medium col-I">
{LNG_RESETALIASES}
</td>
<td class="text_medium col-II">
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('resetempty', '');">
<img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_RESETEMPTY_LINK}</a>
<a href="#" id="resetAliasesInfo1-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div id="resetAliasesInfo1" style="display:none;">
{LNG_RESETEMPTY_INFO}
</div>
<br>
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('reset', '');">
<img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_RESETALL_LINK}</a>
<a href="#" id="resetAliasesInfo2-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div id="resetAliasesInfo2" style="display:none;">
{LNG_RESETALL_INFO}
</div>
<br>
<strong>{LNG_NOTE}:</strong><br>
{LNG_RESETALIASES_NOTE}
</td>
</tr>
<tr>
<td colspan="2" class="text_medium col-I" style="text-align:right">
<a accesskey="c" href="main.php?area={AREA}&amp;frame=4&amp;idclient={IDCLIENT}&amp;contenido={SESSID}">
<img src="images/but_cancel.gif" alt="" title="{LNG_DISCARD_CHANGES}"></a>
<input style="margin-left:20px;" accesskey="s" type="image" src="images/but_ok.gif" alt="" title="{LNG_SAVE_CHANGES}">
</td>
</tr>
</table>
</form>
{CONTENT_AFTER}
</body>
</html>

Datei anzeigen

@ -1,63 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>mod_rewrite_content_test</title>
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/scripts/mod_rewrite.js"></script>
<link rel="stylesheet" type="text/css" href="styles/contenido.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/styles/styles.css">
<script type="text/javascript"><!--
// session-id
var sid = "{SESSID}";
// setup translation
mrPlugin.lng.more_informations = "{LNG_MORE_INFORMATIONS}";
// --></script>
</head>
<body class="mrPlugin mrPluginTest">
<div class="headerBox">
<p>{LNG_FORM_INFO}<p>
<form name="mr_test" id="mr_test" action="main.php">
<input type="hidden" name="area" value="{AREA}">
<input type="hidden" name="frame" value="{FRAME}">
<input type="hidden" name="contenido" value="{CONTENIDO}">
<fieldset>
<legend>{LNG_FORM_LABEL}</legend>
<p></p>
<div class="chk">
<input type="checkbox" id="idart" name="idart" value="1"{FORM_IDART_CHK}><label for="idart">idart</label>
</div>
<div class="chk">
<input type="checkbox" id="idcat" name="idcat" value="1"{FORM_IDCAT_CHK}><label for="idcat">idcat</label>
</div>
<div class="chk">
<input type="checkbox" id="idcatart" name="idcatart" value="1"{FORM_IDCATART_CHK}><label for="idcatart">idcatart</label>
</div>
<div class="chk">
<input type="checkbox" id="idartlang" name="idartlang" value="1"{FORM_IDARTLANG_CHK}><label for="idartlang">idartlang</label>
</div>
<br class="clear">
</fieldset>
<div class="contenttest">
<div class="blockLeft">
<label for="maxitems">{LNG_MAXITEMS_LBL}: </label><input type="text" id="maxitems" maxlength="4" name="maxitems" value="{FORM_MAXITEMS}">
</div>
<div class="blockRight pdr5">
<input type="submit" name="test" value="{LNG_RUN_TEST}">
</div>
<br class="clear">
</div>
</form>
<br class="clear">
</div>
{CONTENT}
</body>
</html>

Datei anzeigen

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- CONTENIDO XML language file -->
<language>
<navigation>
<extras>
<mod_rewrite>
<main>AMR</main>
<settings>Einstellungen</settings>
<expert>Funktionen</expert>
<test>Test</test>
</mod_rewrite>
</extras>
</navigation>
</language>

Datei anzeigen

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- CONTENIDO XML language file -->
<language>
<navigation>
<extras>
<mod_rewrite>
<main>AMR</main>
<settings>Settings</settings>
<expert>Functions</expert>
<test>Test</test>
</mod_rewrite>
</extras>
</navigation>
</language>

Datei anzeigen

@ -1 +0,0 @@
/.project

Datei anzeigen

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <https://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:
<program> Copyright (C) <year> <name of author>
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
<https://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
<https://www.gnu.org/licenses/why-not-lgpl.html>.

Datei anzeigen

@ -1,2 +0,0 @@
# cl-workflow
Workflow Plugin for ConLite

Datei anzeigen

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<plugin>
<general active="1">
<plugin_name>ConLite Workflow</plugin_name>
<plugin_foldername>cl-workflow</plugin_foldername>
<uuid>6BAFECC4-AF63-51CE-839D-A4E5FBBEB4A9</uuid>
<description>ConLite Workflow adds a simple worflow management to your ConLite CMS</description>
<author>ConLite Team</author>
<copyright>ConLite Team</copyright>
<mail>cl-workflow@conlite.org</mail>
<website>https://conlite.org</website>
<version>0.1.0</version>
<license>GNU Lesser General Public License</license>
</general>
<requirements php="5.6">
<conlite minversion="2.1.0" />
</requirements>
<conlite>
<areas>
<area menuless="0">workflow</area>
<area parent="workflow" menuless="0">workflow_common</area>
<area parent="workflow" menuless="0">workflow_steps</area>
<area parent="workflow" menuless="0">workflow_step_edit</area>
<area parent="con" menuless="0">con_workflow</area>
</areas>
<actions>
<action area="workflow_common">workflow_show</action>
<action area="workflow_common">workflow_create</action>
<action area="workflow_common">workflow_save</action>
<action area="workflow">workflow_delete</action>
<action area="workflow_steps">workflow_step_edit</action>
<action area="workflow_steps">workflow_step_up</action>
<action area="workflow_steps">workflow_step_down</action>
<action area="workflow_steps">workflow_save_step</action>
<action area="workflow_steps">workflow_create_step</action>
<action area="workflow_steps">workflow_step_delete</action>
<action area="workflow_steps">workflow_user_up</action>
<action area="workflow_steps">workflow_user_down</action>
<action area="workflow_steps">workflow_create_user</action>
<action area="workflow_steps">workflow_user_delete</action>
<action area="str">workflow_cat_assign</action>
<action area="con">workflow_do_action</action>
<action area="str">workflow_inherit_down</action>
<action area="con_workflow">workflow_task_user_select</action>
<action area="con_workflow">workflow_do_action</action>
</actions>
<frames>
<frame area="workflow" filetype="main" name="cl-workflow/includes/include.workflow_left_top.php" frameId="1" />
<frame area="workflow" filetype="main" name="cl-workflow/includes/include.workflow_list.php" frameId="2" />
<frame area="workflow_common" filetype="main" name="cl-workflow/includes/include.workflow_edit.php" frameId="4" />
<frame area="workflow" filetype="main" name="cl-workflow/includes/include.workflow_subnav.php" frameId="3" />
<frame area="workflow_steps" filetype="main" name="cl-workflow/includes/include.workflow_steps.php" frameId="4" />
<frame area="con_workflow" filetype="main" name="cl-workflow/includes/include.workflow_tasks.php" frameId="4" />
</frames>
<nav_sub>
<nav area="workflow" level="0" navm="extra">cl-workflow/xml/lang_de_DE.xml;navigation/extra/workflow/main</nav>
<nav area="workflow_common" level="1" navm="0">cl-workflow/xml/lang_de_DE.xml;navigation/extra/workflow/settings</nav>
<nav area="workflow_steps" level="1" navm="0">cl-workflow/xml/lang_de_DE.xml;navigation/extra/workflow/steps</nav>
</nav_sub>
</conlite>
</plugin>

Datei anzeigen

@ -1,125 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Workflow management class
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend classes
* @version 1.6
* @author Timo Hummel
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* {@internal
* created 2003-07-18
*
* $Id: class.workflow.php 128 2019-07-03 11:58:28Z oldperl $
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Class Workflows
* Class for workflow management
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.2
* @copyright four for business 2003
*/
class Workflows extends ItemCollection {
/**
* Constructor Function
* @param none
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow"], "idworkflow");
$this->_setItemClass("Workflow");
}
function create() {
global $auth, $client, $lang;
$newitem = parent::createNewItem();
$newitem->setField("created", date("Y-m-d H-i-s"));
$newitem->setField("idauthor", $auth->auth["uid"]);
$newitem->setField("idclient", $client);
$newitem->setField("idlang", $lang);
$newitem->store();
return ($newitem);
}
/**
* Deletes all corresponding informations to this workflow and delegate call to parent
* @param integer $idWorkflow - id of workflow to delete
*/
function delete($idWorkflow) {
global $cfg;
$oDb = new DB_ConLite();
$aItemIdsDelete = array();
$sSql = 'SELECT idworkflowitem FROM ' . $cfg["tab"]["workflow_items"] . ' WHERE idworkflow = ' . Contenido_Security::toInteger($idWorkflow) . ';';
$oDb->query($sSql);
while ($oDb->next_record()) {
array_push($aItemIdsDelete, Contenido_Security::escapeDB($oDb->f('idworkflowitem'), $oDb));
}
$aUserSequencesDelete = array();
$sSql = 'SELECT idusersequence FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idworkflowitem in (' . implode(',', $aItemIdsDelete) . ');';
$oDb->query($sSql);
while ($oDb->next_record()) {
array_push($aUserSequencesDelete, Contenido_Security::escapeDB($oDb->f('idusersequence'), $oDb));
}
$sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idworkflowitem in (' . implode(',', $aItemIdsDelete) . ');';
$oDb->query($sSql);
$sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_actions"] . ' WHERE idworkflowitem in (' . implode(',', $aItemIdsDelete) . ');';
$oDb->query($sSql);
$sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_items"] . ' WHERE idworkflow = ' . Contenido_Security::toInteger($idWorkflow) . ';';
$oDb->query($sSql);
$sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_allocation"] . ' WHERE idworkflow = ' . Contenido_Security::toInteger($idWorkflow) . ';';
$oDb->query($sSql);
$sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence in (' . implode(',', $aUserSequencesDelete) . ');';
$oDb->query($sSql);
parent::delete($idWorkflow);
}
}
/**
* Class Workflow
* Class for a single workflow item
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.1
* @copyright four for business 2003
*/
class Workflow extends Item {
/**
* Constructor
*
* @global array $cfg
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow"], "idworkflow");
}
}

Datei anzeigen

@ -1,126 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Management of per-workflowitem actions
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend classes
* @version 1.3
* @author Timo Hummel
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* {@internal
* created 2003-07-18
*
* $Id: class.workflowactions.php 128 2019-07-03 11:58:28Z oldperl $
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Class WorkflowActions
* Class for workflow action collections
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.2
* @copyright four for business 2003
*/
class WorkflowActions extends ItemCollection {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction");
$this->_setItemClass("WorkflowAction");
}
/**
*
* @param type $idworkflowitem
* @param type $action
* @return boolean
*/
function get($idworkflowitem, $action) {
$this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "' AND action = '" . Contenido_Security::escapeDB($action, NULL) . "'");
if ($this->next()) {
return true;
} else {
return false;
}
}
function getAvailableWorkflowActions() {
$availableWorkflowActions = array(
"publish" => i18n("Publish article", "workflow"),
"lock" => i18n("Lock article", "workflow"),
"last" => i18n("Move back to last editor", "workflow"),
"reject" => i18n("Reject article", "workflow"),
"articleedit" => i18n("Edit article content", "workflow"),
"propertyedit" => i18n("Edit article properties", "workflow"),
"templateedit" => i18n("Edit template", "workflow"),
"revise" => i18n("Revise article", "workflow"));
return($availableWorkflowActions);
}
function set($idworkflowitem, $action) {
$this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "' AND action = '" . Contenido_Security::escapeDB($action, NULL) . "'");
if (!$this->next()) {
$newitem = parent::createNewItem();
$newitem->setField("idworkflowitem", $idworkflowitem);
$newitem->setField("action", $action);
$newitem->store();
}
}
function remove($idworkflowitem, $action) {
$this->select("idworkflowitem = '$idworkflowitem' AND action = '$action'");
if ($item = $this->next()) {
$this->delete($item->getField("idworkflowaction"));
}
}
function select($where = "", $group_by = "", $order_by = "", $limit = "") {
global $client;
return parent::select($where, $group_by, $order_by, $limit);
}
}
/**
* Class WorkflowAction
* Class for a single workflow action
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.1
* @copyright four for business 2003
*/
class WorkflowAction extends Item {
/**
* Constructor
* @global type $cfg
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_actions"], "idworkflowaction");
}
}
?>

Datei anzeigen

@ -1,223 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Workflow allocation class
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend classes
* @version 1.5
* @author Timo Hummel
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* {@internal
* created 2003-07-18
*
* $Id: class.workflowallocation.php 128 2019-07-03 11:58:28Z oldperl $
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Class WorkflowAllocations
* Class for workflow allocation management
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.2
* @copyright four for business 2003
*/
class WorkflowAllocations extends ItemCollection {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_allocation"], "idallocation");
$this->_setItemClass("WorkflowAllocation");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowAllocations() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
function delete($idallocation) {
global $cfg, $lang;
$obj = new WorkflowAllocation;
$obj->loadByPrimaryKey($idallocation);
$idcatlang = $obj->get("idcatlang");
$db = new DB_ConLite;
$sql = "SELECT idcat FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcatlang = '" . Contenido_Security::toInteger($idcatlang) . "'";
$db->query($sql);
$db->next_record();
$idcat = $db->f("idcat");
$sql = "SELECT idart FROM " . $cfg["tab"]["cat_art"] . " WHERE idcat = '" . Contenido_Security::toInteger($idcat) . "'";
$db->query($sql);
while ($db->next_record()) {
$idarts[] = $db->f("idart");
}
$idartlangs = array();
if (is_array($idarts)) {
foreach ($idarts as $idart) {
$sql = "SELECT idartlang FROM " . $cfg["tab"]["art_lang"] . " WHERE idart = '" . Contenido_Security::toInteger($idart) . "' and idlang = '" . Contenido_Security::toInteger($lang) . "'";
$db->query($sql);
if ($db->next_record()) {
$idartlangs[] = $db->f("idartlang");
}
}
}
$workflowArtAllocation = new WorkflowArtAllocation;
$workflowArtAllocations = new WorkflowArtAllocations;
foreach ($idartlangs as $idartlang) {
$workflowArtAllocation->loadBy("idartlang", $idartlang);
$workflowArtAllocations->delete($workflowArtAllocation->get("idartallocation"));
}
parent::delete($idallocation);
}
function create($idworkflow, $idcatlang) {
$this->select("idcatlang = '$idcatlang'");
if ($this->next() !== false) {
$this->lasterror = i18n("Category already has a workflow assigned", "workflow");
return false;
}
$workflows = new Workflows;
$workflows->select("idworkflow = '$idworkflow'");
if ($workflows->next() === false) {
$this->lasterror = i18n("Workflow doesn't exist", "workflow");
return false;
}
$newitem = parent::createNewItem();
if (!$newitem->setWorkflow($idworkflow)) {
$this->lasterror = $newitem->lasterror;
$workflows->delete($newitem->getField("idallocation"));
return false;
}
if (!$newitem->setCatLang($idcatlang)) {
$this->lasterror = $newitem->lasterror;
$workflows->delete($newitem->getField("idallocation"));
return false;
}
$newitem->store();
return ($newitem);
}
}
/**
* Class WorkflowAllocation
* Class for a single workflow allocation item
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.1
* @copyright four for business 2003
*/
class WorkflowAllocation extends Item {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_allocation"], "idallocation");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowAllocation() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
/**
* Overridden setField function. Users should only use setWorkflow.
* @param string $field Void field since we override the usual setField function
* @param string $value Void field since we override the usual setField function
*/
function setField($field, $value, $bSafe = true) {
die("Don't use setField for WorkflowAllocation items! Use setWorkflow instead!");
}
/**
* setWorkflow sets the workflow for the current item.
* @param int $idworkflow Workflow-ID to set the item to
*/
function setWorkflow($idworkflow) {
$workflows = new Workflows;
$workflows->select("idworkflow = '$idworkflow'");
if ($workflows->next() === false) {
$this->lasterror = i18n("Workflow doesn't exist", "workflow");
return false;
}
parent::setField("idworkflow", $idworkflow);
parent::store();
return true;
}
/**
* setCatLang sets the idcatlang for the current item. Should
* only be called by the create function.
* @param int $idcatlang idcatlang to set.
*/
function setCatLang($idcatlang) {
global $cfg;
$allocations = new WorkflowAllocations;
$allocations->select("idcatlang = '$idcatlang'");
if ($allocations->next() !== false) {
$this->lasterror = i18n("Category already has a workflow assigned", "workflow");
return false;
}
$db = new DB_ConLite;
$sql = "SELECT idcatlang FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcatlang = '" . Contenido_Security::toInteger($idcatlang) . "'";
$db->query($sql);
if (!$db->next_record()) {
$this->lasterror = i18n("Category doesn't exist, assignment failed", "workflow");
return false;
}
parent::setField("idcatlang", $idcatlang);
parent::store();
return true;
}
}
?>

Datei anzeigen

@ -1,332 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Workflow allocation class
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend classes
* @version 1.4
* @author Timo Hummel
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* {@internal
* created 2003-07-18
* modified : 2008-06-25 - use php mailer class instead of mail()
*
* $Id: class.workflowartallocation.php 128 2019-07-03 11:58:28Z oldperl $:
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Class WorkflowArtAllocations
* Class for workflow art allocation management
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.2
* @copyright four for business 2003
*/
class WorkflowArtAllocations extends ItemCollection {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_art_allocation"], "idartallocation");
$this->_setItemClass("WorkflowArtAllocation");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowArtAllocations() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
function create($idartlang) {
global $cfg;
$sql = "SELECT idartlang FROM " . $cfg["tab"]["art_lang"] .
" WHERE idartlang = '" . Contenido_Security::escapeDB($idartlang, $this->db) . "'";
$this->db->query($sql);
if (!$this->db->next_record()) {
$this->lasterror = i18n("Article doesn't exist", "workflow");
return false;
}
$this->select("idartlang = '$idartlang'");
if ($this->next() !== false) {
$this->lasterror = i18n("Article is already assigned to a usersequence step.", "workflow");
return false;
}
$newitem = parent::createNewItem();
$newitem->setField("idartlang", $idartlang);
$newitem->store();
return ($newitem);
}
}
/**
* Class WorkflowArtAllocation
* Class for a single workflow allocation item
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.1
* @copyright four for business 2003
*/
class WorkflowArtAllocation extends Item {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_art_allocation"], "idartallocation");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowArtAllocation() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
function getWorkflowItem() {
$userSequence = new WorkflowUserSequence;
$userSequence->loadByPrimaryKey($this->values["idusersequence"]);
return ($userSequence->getWorkflowItem());
}
/**
* Returns the current item position
* @param string $field Void field since we override the usual setField function
* @param string $value Void field since we override the usual setField function
*/
function currentItemPosition() {
$idworkflowitem = $this->get("idworkflowitem");
$workflowItems = new WorkflowItems;
$workflowItems->select("idworkflowitem = '$idworkflowitem'");
if ($item = $workflowItems->next()) {
return ($item->get("position"));
}
}
/**
* Returns the current user position
* @param string $field Void field since we override the usual setField function
* @param string $value Void field since we override the usual setField function
*/
function currentUserPosition() {
return ($this->get("position"));
}
/**
* Overriden store function to send mails
* @param none
*/
function store() {
global $cfg;
$sMailhost = getSystemProperty('system', 'mail_host');
if ($sMailhost == '') {
$sMailhost = 'localhost';
}
//modified : 2008-06-25 - use php mailer class instead of mail()
$oMail = new PHPMailer();
$oMail->Host = $sMailhost;
$oMail->IsHTML(0);
$oMail->WordWrap = 1000;
$oMail->IsMail();
if (array_key_exists("idusersequence", $this->modifiedValues)) {
$usersequence = new WorkflowUserSequence;
$usersequence->loadByPrimaryKey($this->values["idusersequence"]);
$email = $usersequence->get("emailnoti");
$escal = $usersequence->get("escalationnoti");
if ($email == 1 || $escal == 1) {
/* Grab the required informations */
$curEditor = getGroupOrUserName($usersequence->get("iduser"));
$idartlang = $this->get("idartlang");
$timeunit = $usersequence->get("timeunit");
$timelimit = $usersequence->get("timelimit");
$db = new DB_ConLite;
$sql = "SELECT author, title, idart FROM " . $cfg["tab"]["art_lang"] . " WHERE idartlang = '" . Contenido_Security::escapeDB($idartlang, $db) . "'";
$db->query($sql);
if ($db->next_record()) {
$idart = $db->f("idart");
$title = $db->f("title");
$author = $db->f("author");
}
/* Extract category */
$sql = "SELECT idcat FROM " . $cfg["tab"]["cat_art"] . " WHERE idart = '" . Contenido_Security::escapeDB($idart, $db) . "'";
$db->query($sql);
if ($db->next_record()) {
$idcat = $db->f("idcat");
}
$sql = "SELECT name FROM " . $cfg["tab"]["cat_lang"] . " WHERE idcat = '" . Contenido_Security::escapeDB($idcat, $db) . "'";
$db->query($sql);
if ($db->next_record()) {
$catname = $db->f("name");
}
$starttime = $this->get("starttime");
$starttime = strtotime(substr_replace(substr(substr($starttime, 0, 2) . chunk_split(substr($starttime, 2, 6), 2, "-") . chunk_split(substr($starttime, 8), 2, ":"), 0, 19), " ", 10, 1));
switch ($timeunit) {
case "Seconds":
$maxtime = $starttime + $timelimit;
break;
case "Minutes":
$maxtime = $starttime + ($timelimit * 60);
break;
case "Hours":
$maxtime = $starttime + ($timelimit * 3600);
break;
case "Days":
$maxtime = $starttime + ($timelimit * 86400);
break;
case "Weeks":
$maxtime = $starttime + ($timelimit * 604800);
break;
case "Months":
$maxtime = $starttime + ($timelimit * 2678400);
break;
case "Years":
$maxtime = $starttime + ($timelimit * 31536000);
break;
default:
$maxtime = $starttime + $timelimit;
}
if ($email == 1) {
$email = "Hello %s,\n\n" .
"you are assigned as the next editor for the Article %s.\n\n" .
"More informations:\n" .
"Article: %s\n" .
"Category: %s\n" .
"Editor: %s\n" .
"Author: %s\n" .
"Editable from: %s\n" .
"Editable to: %s\n";
$filledMail = sprintf($email,
$curEditor,
$title,
$title,
$catname,
$curEditor,
$author,
date("Y-m-d H:i:s", $starttime),
date("Y-m-d H:i:s", $maxtime));
$user = new User;
if (isGroup($usersequence->get("iduser"))) {
$sql = "select idgroupuser, user_id FROM " . $cfg["tab"]["groupmembers"] . " WHERE
group_id = '" . Contenido_Security::escapeDB($usersequence->get("iduser"), $db) . "'";
$db->query($sql);
while ($db->next_record()) {
$user->loadUserByUserID($db->f("user_id"));
//modified : 2008-06-25 - use php mailer class instead of mail()
$oMail->AddAddress($user->getField("email"), "");
$oMail->Subject = stripslashes(i18n('Workflow notification'));
$oMail->Body = $filledMail;
$oMail->Send();
}
} else {
$user->loadUserByUserID($usersequence->get("iduser"));
//modified : 2008-06-25 - use php mailer class instead of mail()
$oMail->AddAddress($user->getField("email"), "");
$oMail->Subject = stripslashes(i18n('Workflow notification'));
$oMail->Body = $filledMail;
$oMail->Send();
}
} else {
$email = "Hello %s,\n\n" .
"you are assigned as the escalator for the Article %s.\n\n" .
"More informations:\n" .
"Article: %s\n" .
"Category: %s\n" .
"Editor: %s\n" .
"Author: %s\n" .
"Editable from: %s\n" .
"Editable to: %s\n";
$filledMail = sprintf($email,
$curEditor,
$title,
$title,
$catname,
$curEditor,
$author,
date("Y-m-d H:i:s", $starttime),
date("Y-m-d H:i:s", $maxtime));
$user = new User;
if (isGroup($usersequence->get("iduser"))) {
$sql = "select idgroupuser, user_id FROM " . $cfg["tab"]["groupmembers"] . " WHERE
group_id = '" . Contenido_Security::escapeDB($usersequence->get("iduser"), $db) . "'";
$db->query($sql);
while ($db->next_record()) {
$user->loadUserByUserID($db->f("user_id"));
echo "mail to " . $user->getField("email") . "<br>";
//modified : 2008-06-25 - use php mailer class instead of mail()
$oMail->AddAddress($user->getField("email"), "");
$oMail->Subject = stripslashes(i18n('Workflow escalation'));
$oMail->Body = $filledMail;
$oMail->Send();
}
} else {
$user->loadUserByUserID($usersequence->get("iduser"));
echo "mail to " . $user->getField("email") . "<br>";
//modified : 2008-06-25 - use php mailer class instead of mail()
$oMail->AddAddress($user->getField("email"), "");
$oMail->Subject = stripslashes(i18n('Workflow escalation'));
$oMail->Body = $filledMail;
$oMail->Send();
}
}
}
}
return parent::store();
}
}
?>

Datei anzeigen

@ -1,304 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Workflow items
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend classes
* @version 1.3
* @author Timo Hummel
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* {@internal
* created 2003-07-18
*
* $Id: class.workflowitems.php 128 2019-07-03 11:58:28Z oldperl $
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Class WorkflowItems
* Class for workflow item management
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.2
* @copyright four for business 2003
*/
class WorkflowItems extends ItemCollection {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_items"], "idworkflowitem");
$this->_setItemClass("WorkflowItem");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowItems() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
function delete($id) {
global $cfg;
$item = new WorkflowItem;
$item->loadByPrimaryKey($id);
$pos = $item->get("position");
$idworkflow = $item->get("idworkflow");
$oDb = new DB_ConLite();
$this->select("position > $pos AND idworkflow = '" . Contenido_Security::escapeDB($idworkflow, $oDb) . "'");
while ($obj = $this->next()) {
$obj->setPosition($obj->get("position") - 1);
$obj->store();
}
$aUserSequencesDelete = array();
$sSql = 'SELECT idusersequence FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idworkflowitem = ' . $id . ';';
$oDb->query($sSql);
while ($oDb->next_record()) {
array_push($aUserSequencesDelete, Contenido_Security::escapeDB($oDb->f('idusersequence'), $oDb));
}
$sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_actions"] . ' WHERE idworkflowitem = ' . Contenido_Security::escapeDB($id, $oDb) . ';';
$oDb->query($sSql);
$this->updateArtAllocation($id, 1);
if (count($aUserSequencesDelete) > 0) {
$sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idusersequence in (' . implode(',', $aUserSequencesDelete) . ');';
$oDb->query($sSql);
}
}
function updateArtAllocation($idworkflowitem, $delete = false) {
global $idworkflow, $cfg;
$oDb = new DB_ConLite();
$aUserSequences = array();
$sSql = 'SELECT idusersequence FROM ' . $cfg["tab"]["workflow_user_sequences"] . ' WHERE idworkflowitem = ' . Contenido_Security::escapeDB($idworkflowitem, $oDb) . ';';
$oDb->query($sSql);
while ($oDb->next_record()) {
array_push($aUserSequences, Contenido_Security::escapeDB($oDb->f('idusersequence'), $oDb));
}
$aIdArtLang = array();
if (count($aUserSequences) > 0) {
$sSql = 'SELECT idartlang FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence in (' . implode(',', $aUserSequences) . ');';
$oDb->query($sSql);
while ($oDb->next_record()) {
array_push($aIdArtLang, $oDb->f('idartlang'));
}
$sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence in (' . implode(',', $aUserSequences) . ');';
$oDb->query($sSql);
}
if ($delete) {
parent::delete($idworkflowitem);
}
foreach ($aIdArtLang as $iIdArtLang) {
setUserSequence($iIdArtLang, $idworkflow);
}
}
function swap($idworkflow, $pos1, $pos2) {
$this->select("idworkflow = '$idworkflow' AND position = '$pos1'");
if (($item = $this->next()) === false) {
$this->lasterror = i18n("Swapping items failed: Item doesn't exist", "workflow");
return false;
}
$pos1ID = $item->getField("idworkflowitem");
$this->select("idworkflow = '$idworkflow' AND position = '$pos2'");
if (($item = $this->next()) === false) {
$this->lasterror = i18n("Swapping items failed: Item doesn't exist", "workflow");
return false;
}
$pos2ID = $item->getField("idworkflowitem");
$item = new WorkflowItem();
$item->loadByPrimaryKey($pos1ID);
$item->setPosition($pos2);
$item->store();
$item->loadByPrimaryKey($pos2ID);
$item->setPosition($pos1);
$item->store();
$this->updateArtAllocation($pos1ID);
$this->updateArtAllocation($pos2ID);
return (true);
}
function create($idworkflow) {
$workflows = new Workflows;
$workflows->select("idworkflow = '$idworkflow'");
if ($workflows->next() === false) {
$this->lasterror = i18n("Can't add item to workflow: Workflow doesn't exist", "workflow");
return false;
}
$this->select("idworkflow = '$idworkflow'", "", "position DESC", "1");
$item = $this->next();
if ($item === false) {
$lastPos = 1;
} else {
$lastPos = $item->getField("position") + 1;
}
$newItem = parent::createNewItem();
if ($newItem->init($idworkflow, $lastPos) === false) {
$this->delete($newItem->getField("idworkflowitem"));
$this->lasterror = $newItem->lasterror;
return false;
}
if ($item === false) {
$this->updateArtAllocation(0);
}
return ($newItem);
}
}
/**
* Class WorkflowItem
* Class for a single workflow item
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.1
* @copyright four for business 2003
*/
class WorkflowItem extends Item {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_items"], "idworkflowitem");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowItem() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
function getStepRights() {
$idwfi = $this->values["idworkflowitem"];
$workflowActions = new WorkflowActions;
$actions = WorkflowActions::getAvailableWorkflowActions();
foreach ($actions as $key => $value) {
$rights[$key] = $workflowActions->get($idwfi, $key);
}
return $rights;
}
/**
* Overridden setField function.
* @param string $field Void field since we override the usual setField function
* @param string $value Void field since we override the usual setField function
*/
function setField($field, $value, $bSafe = TRUE) {
if ($this->virgin == true) {
$this->lasterror = i18n("No item loaded", "workflow");
return false;
}
if ($field == "idsequence") {
die("You can't set the idsequence field using this method. Use 'create' in the WorkflowItems class.");
}
if ($field == "idworkflow") {
die("You can't set the workflow ID using this method. Use 'create' in the WorkflowItems class!");
}
if ($field == "position") {
die("You can't set the position ID using this method. Use 'create' or 'swap' to create or move items!");
}
if ($field == "idtask" && $value != 0) {
$taskCollection = new WorkflowTasks;
$taskCollection->select("idtask = '$value'");
if ($taskCollection->next() === false) {
$this->lasterror = i18n("Requested task doesn't exist, can't assign", "workflow");
return false;
}
}
parent::setField($field, $value, $bSafe);
}
/**
* init initializes a new wf_items entry. Should
* only be called by the create function.
* @param int $idworkflow The workflow to set the item to
*/
function init($idworkflow, $idposition) {
global $cfg;
$workflows = new Workflows;
$workflows->select("idworkflow = '$idworkflow'");
if ($workflows->next() === false) {
$this->lasterror = i18n("Workflow doesn't exist", "workflow");
return false;
}
$workflowItems = new WorkflowItems;
$workflowItems->select("position = '$idposition' AND idworkflow = '$idworkflow'");
if ($workflowItems->next()) {
$this->lasterror = i18n("Position in this workflow already exists.", "workflow");
return false;
}
parent::setField("idworkflow", $idworkflow);
parent::setField("position", $idposition);
parent::store();
return true;
}
/**
* setPosition Sets the position for an item. Should only be
* called by the "swap" function
* @param int $idposition The new position ID
*/
function setPosition($idposition) {
parent::setField("position", $idposition);
parent::store();
return true;
}
}
?>

Datei anzeigen

@ -1,100 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Simple wrapper for workflow tasks
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend classes
* @version 1.2
* @author Timo Hummel
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* {@internal
* created 2003-07-18
*
* $Id: class.workflowtasks.php 128 2019-07-03 11:58:28Z oldperl $
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Class WorkflowTasks
* Class for workflow task collections
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.2
* @copyright four for business 2003
*/
class WorkflowTasks extends ItemCollection {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["tasks"], "idtask");
$this->_setItemClass("WorkflowTask");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowTasks() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
function create() {
$newitem = parent::createNewItem();
return ($newitem);
}
function select($where = "", $group_by = "", $order_by = "", $limit = "") {
global $client;
if ($where != "") {
$where = $where . " AND idclient = '" . Contenido_Security::escapeDB($client, NULL) . "'";
}
return parent::select($where, $group_by, $order_by, $limit);
}
}
/**
* Class WorkflowTask
* Class for a single workflow task item
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.1
* @copyright four for business 2003
*/
class WorkflowTask extends Item {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["tasks"], "idtask");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowTask() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
}
?>

Datei anzeigen

@ -1,258 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Workflow management class
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend classes
* @version 1.3
* @author Timo Hummel
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* {@internal
* created 2003-07-18
*
* $Id: class.workflowusersequence.php 128 2019-07-03 11:58:28Z oldperl $
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
/**
* Class WorkflowUserSequences
* Class for workflow user sequence management
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.2
* @copyright four for business 2003
*/
class WorkflowUserSequences extends ItemCollection {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_user_sequences"], "idusersequence");
$this->_setItemClass("WorkflowUserSequence");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowUserSequences() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
function delete($id) {
global $cfg, $idworkflow;
$item = new WorkflowUserSequence;
$item->loadByPrimaryKey($id);
$pos = $item->get("position");
$idworkflowitem = $item->get("idworkflowitem");
$this->select("position > $pos AND idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "'");
while ($obj = $this->next()) {
$pos = $obj->get("position") - 1;
$obj->setPosition($pos);
$obj->store();
}
parent::delete($id);
$this->updateArtAllocation($id);
}
function updateArtAllocation($idusersequence) {
global $idworkflow, $cfg;
$oDb = new DB_ConLite();
$aIdArtLang = array();
$sSql = 'SELECT idartlang FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence = ' . Contenido_Security::escapeDB($idusersequence, $oDb) . ';';
$oDb->query($sSql);
while ($oDb->next_record()) {
array_push($aIdArtLang, $oDb->f('idartlang'));
}
$sSql = 'DELETE FROM ' . $cfg["tab"]["workflow_art_allocation"] . ' WHERE idusersequence = ' . Contenido_Security::escapeDB($idusersequence, $oDb) . ';';
$oDb->query($sSql);
foreach ($aIdArtLang as $iIdArtLang) {
setUserSequence($iIdArtLang, $idworkflow);
}
}
function create($idworkflowitem) {
global $auth, $client, $idworkflow;
$newitem = parent::createNewItem();
$workflowitems = new WorkflowItems;
if (!$workflowitems->exists($idworkflowitem)) {
$this->delete($newitem->getField("idusersequence"));
$this->lasterror = i18n("Workflow item doesn't exist. Can't create entry.", "workflow");
return false;
}
$this->select("idworkflowitem = '" . Contenido_Security::escapeDB($idworkflowitem, NULL) . "'", "", "position DESC", "1");
$item = $this->next();
if ($item === false) {
$lastPos = 1;
} else {
$lastPos = $item->getField("position") + 1;
}
$newitem->setWorkflowItem($idworkflowitem);
$newitem->setPosition($lastPos);
$newitem->store();
return ($newitem);
}
function swap($idworkflowitem, $pos1, $pos2) {
$this->select("idworkflowitem = '$idworkflowitem' AND position = '" . Contenido_Security::escapeDB($pos1, NULL) . "'");
if (($item = $this->next()) === false) {
$this->lasterror = i18n("Swapping items failed: Item doesn't exist", "workflow");
return false;
}
$pos1ID = $item->getField("idusersequence");
$this->select("idworkflowitem = '$idworkflowitem' AND position = '" . Contenido_Security::escapeDB($pos2, NULL) . "'");
if (($item = $this->next()) === false) {
$this->lasterror(i18n("Swapping items failed: Item doesn't exist", "workflow"));
return false;
}
$pos2ID = $item->getField("idusersequence");
$item = new WorkflowUserSequence();
$item->loadByPrimaryKey($pos1ID);
$item->setPosition($pos2);
$item->store();
$item->loadByPrimaryKey($pos2ID);
$item->setPosition($pos1);
$item->store();
$this->updateArtAllocation($pos2ID);
$this->updateArtAllocation($pos1ID);
return (true);
}
}
/**
* Class WorkflowUserSequence
* Class for a single workflow item
* @author Timo A. Hummel <Timo.Hummel@4fb.de>
* @version 0.1
* @copyright four for business 2003
*/
class WorkflowUserSequence extends Item {
/**
* Constructor Function
* @param string $table The table to use as information source
*/
function __construct() {
global $cfg;
parent::__construct($cfg["tab"]["workflow_user_sequences"], "idusersequence");
}
/** @deprecated [2011-03-15] Old constructor function for downwards compatibility */
function WorkflowUserSequence() {
cWarning(__FILE__, __LINE__, "Deprecated method call, use __construct()");
$this->__construct();
}
/**
* Override setField Function to prevent that somebody modifies
* idsequence.
* @param string $field Field to set
* @param string $valie Value to set
*/
function setField($field, $value, $bSafe = true) {
global $cfg;
switch ($field) {
case "idworkflowitem":
die("Please use create to modify idsequence. Direct modifications are not allowed");
case "idusersequence":
die("Please use create to modify idsequence. Direct modifications are not allowed");
case "position":
die("Please use create and swap to set the position. Direct modifications are not allowed");
case "iduser":
if ($value != 0) {
$db = new DB_ConLite;
$sql = "SELECT user_id FROM " . $cfg["tab"]["phplib_auth_user_md5"] .
" WHERE user_id = '" . Contenido_Security::escapeDB($value, $db) . "'";
$db->query($sql);
if (!$db->next_record()) {
$sql = "SELECT group_id FROM " . $cfg["tab"]["groups"] .
" WHERE group_id = '" . Contenido_Security::escapeDB($value, $db) . "'";
$db->query($sql);
if (!$db->next_record()) {
$this->lasterror = i18n("Can't set user_id: User or group doesn't exist", "workflow");
return false;
}
}
$idusersquence = parent::getField('idusersequence');
}
}
parent::setField($field, $value, $bSafe);
if ($idusersquence) {
WorkflowUserSequences::updateArtAllocation(0);
}
}
/**
* Returns the associated workflowItem for this user sequence
* @param none
*/
function getWorkflowItem() {
if (!$this->virgin) {
$workflowItem = new WorkflowItem;
$workflowItem->loadByPrimaryKey($this->values["idworkflowitem"]);
return ($workflowItem);
} else {
return false;
}
}
/**
* Interface to set idworkflowitem. Should only be called by "create".
* @param string $value The value to set
*/
function setWorkflowItem($value) {
parent::setField("idworkflowitem", $value);
}
/**
* Interface to set idworkflowitem. Should only be called by "create".
* @param string $value The value to set
*/
function setPosition($value) {
parent::setField("position", $value);
}
}
?>

Datei anzeigen

@ -1,103 +0,0 @@
<?php
/**
* Project:
* Contenido Content Management System
*
* Description:
* Advances to the next step if the time limit is "over"
*
* Requirements:
* @con_php_req 5.0
*
*
* @package Contenido Backend classes
* @version 1.5.1
* @author Timo Hummel
* @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de
* @link http://www.contenido.org
*
* {@internal
* created 2003-05-26
* modified 2010-05-20, Murat Purc, removed request check during processing ticket [#CON-307]
*
* $Id: advance_workflow.php 128 2019-07-03 11:58:28Z oldperl $
* }}
*
*/
define('CON_FRAMEWORK', true);
// Contenido startup process
include_once ('../../../includes/startup.php');
cInclude("includes", "cfg_language_de.inc.php");
cInclude("includes", "functions.con.php");
plugin_include('workflow', 'includes/functions.workflow.php');
$workflowartallocations = new WorkflowArtAllocations;
$workflowusersequences = new WorkflowUserSequences;
$workflowartallocations->select();
while ($obj = $workflowartallocations->next()) {
$starttime = $obj->get("starttime");
$idartlang = $obj->get("idartlang");
$lastidusersequence = $obj->get("lastusersequence");
$usersequence = getCurrentUserSequence($idartlang, 0);
if ($usersequence != $lastidusersequence) {
$workflowusersequences->select("idusersequence = '$usersequence'");
if ($wfobj = $workflowusersequences->next()) {
$wfitem = $wfobj->get("idworkflowitem");
$pos = $wfobj->get("position");
$timeunit = $wfobj->get("timeunit");
$timelimit = $wfobj->get("timelimit");
}
$starttime = strtotime(substr_replace(substr(substr($starttime, 0, 2) . chunk_split(substr($starttime, 2, 6), 2, "-") . chunk_split(substr($starttime, 8), 2, ":"), 0, 19), " ", 10, 1));
switch ($timeunit) {
case "Seconds":
$maxtime = $starttime + $timelimit;
break;
case "Minutes":
$maxtime = $starttime + ($timelimit * 60);
break;
case "Hours":
$maxtime = $starttime + ($timelimit * 3600);
break;
case "Days":
$maxtime = $starttime + ($timelimit * 86400);
break;
case "Weeks":
$maxtime = $starttime + ($timelimit * 604800);
break;
case "Months":
$maxtime = $starttime + ($timelimit * 2678400);
break;
case "Years":
$maxtime = $starttime + ($timelimit * 31536000);
break;
default:
$maxtime = $starttime + $timelimit;
}
if ($maxtime < time()) {
$pos = $pos + 1;
$workflowusersequences->select("idworkflowitem = '$wfitem' AND position = '" . Contenido_Security::escapeDB($pos, NULL) . "'");
if ($wfobj = $workflowusersequences->next()) {
$obj->set("idusersequence", $wfobj->get("idusersequence"));
$obj->store();
}
}
}
}
?>

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 121 B

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 121 B

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 96 B

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 96 B

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 90 B

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 74 B

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 84 B

Binäre Datei nicht angezeigt.

Vorher

Breite:  |  Höhe:  |  Größe: 61 B

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen