Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e8b31bce8 | ||
|
|
02104cba1f | ||
|
|
931132f76b | ||
|
|
3354369764 | ||
|
|
fa803cb994 | ||
|
|
9282baee44 | ||
|
|
9f0fe884ce | ||
|
|
e6697fa235 | ||
|
|
1af49879c0 | ||
|
|
42abed5204 | ||
|
|
1a108babd8 | ||
|
|
84e7b1656c | ||
|
|
8bfc81fb12 |
533
LICENSE
533
LICENSE
@@ -1,504 +1,67 @@
|
|||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
Business Source License 1.1
|
||||||
Version 2.1, February 1999
|
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
Lizenzgeber: HexaHost.de
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
Lizenzierte Arbeit: HexaHost Backend
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Die lizenzierte Arbeit ist urheberrechtlich geschützt
|
||||||
of this license document, but changing it is not allowed.
|
© 2026 HexaHost.de
|
||||||
|
|
||||||
[This is the first released version of the Lesser GPL. It also counts
|
Zusätzliche Nutzungsbewilligung: Keine
|
||||||
as the successor of the GNU Library Public License, version 2, hence
|
|
||||||
the version number 2.1.]
|
|
||||||
|
|
||||||
Preamble
|
Änderungsdatum: 2030-01-16
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
Änderungslizenz: GNU General Public License v3.0 oder später
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Lesser General Public License, applies to some
|
-----------------------------------------------------------------------------
|
||||||
specially designated software packages--typically libraries--of the
|
|
||||||
Free Software Foundation and other authors who decide to use it. You
|
|
||||||
can use it too, but we suggest you first think carefully about whether
|
|
||||||
this license or the ordinary General Public License is the better
|
|
||||||
strategy to use in any particular case, based on the explanations below.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom of use,
|
Business Source License 1.1
|
||||||
not price. Our General Public Licenses are designed to make sure that
|
|
||||||
you have the freedom to distribute copies of free software (and charge
|
|
||||||
for this service if you wish); that you receive source code or can get
|
|
||||||
it if you want it; that you can change the software and use pieces of
|
|
||||||
it in new free programs; and that you are informed that you can do
|
|
||||||
these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
Lizenz-Text
|
||||||
distributors to deny you these rights or to ask you to surrender these
|
|
||||||
rights. These restrictions translate to certain responsibilities for
|
|
||||||
you if you distribute copies of the library or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
Der Lizenzgeber gewährt Ihnen hiermit das Recht, die lizenzierte Arbeit zu
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
kopieren, zu modifizieren, abgeleitete Werke zu erstellen, weiterzuverbreiten
|
||||||
you. You must make sure that they, too, receive or can get the source
|
und die lizenzierte Arbeit nicht-produktiv zu nutzen. Der Lizenzgeber kann eine
|
||||||
code. If you link other code with the library, you must provide
|
"Zusätzliche Nutzungsbewilligung" (siehe oben) erteilen, die bestimmte
|
||||||
complete object files to the recipients, so that they can relink them
|
produktive Nutzungen erlaubt.
|
||||||
with the library after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
We protect your rights with a two-step method: (1) we copyright the
|
Mit Wirkung zum Änderungsdatum (siehe oben) oder zum vierten Jahrestag der
|
||||||
library, and (2) we offer you this license, which gives you legal
|
ersten öffentlichen Veröffentlichung einer spezifischen Version der lizenzierten
|
||||||
permission to copy, distribute and/or modify the library.
|
Arbeit, je nachdem, welcher Zeitpunkt später eintritt, wechselt die hier
|
||||||
|
erteilte Lizenz automatisch zur Änderungslizenz (siehe oben), und Sie sind
|
||||||
|
berechtigt, die lizenzierte Arbeit zu jedem Zweck zu nutzen.
|
||||||
|
|
||||||
To protect each distributor, we want to make it very clear that
|
BEGRIFFSBESTIMMUNGEN
|
||||||
there is no warranty for the free library. Also, if the library is
|
|
||||||
modified by someone else and passed on, the recipients should know
|
|
||||||
that what they have is not the original version, so that the original
|
|
||||||
author's reputation will not be affected by problems that might be
|
|
||||||
introduced by others.
|
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
"Lizenzierte Arbeit" bezeichnet alle urheberrechtlich geschützten Werke, die
|
||||||
any free program. We wish to make sure that a company cannot
|
unter dieser Lizenz lizenziert sind.
|
||||||
effectively restrict the users of a free program by obtaining a
|
|
||||||
restrictive license from a patent holder. Therefore, we insist that
|
|
||||||
any patent license obtained for a version of the library must be
|
|
||||||
consistent with the full freedom of use specified in this license.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the
|
"Änderungslizenz" bezeichnet die Lizenz, die nach dem Änderungsdatum auf die
|
||||||
ordinary GNU General Public License. This license, the GNU Lesser
|
lizenzierte Arbeit anwendbar ist.
|
||||||
General Public License, applies to certain designated libraries, and
|
|
||||||
is quite different from the ordinary General Public License. We use
|
|
||||||
this license for certain libraries in order to permit linking those
|
|
||||||
libraries into non-free programs.
|
|
||||||
|
|
||||||
When a program is linked with a library, whether statically or using
|
"Zusätzliche Nutzungsbewilligung" bezeichnet jede zusätzliche Genehmigung, die
|
||||||
a shared library, the combination of the two is legally speaking a
|
der Lizenzgeber gewährt und die bestimmte produktive Nutzungen erlaubt.
|
||||||
combined work, a derivative of the original library. The ordinary
|
|
||||||
General Public License therefore permits such linking only if the
|
|
||||||
entire combination fits its criteria of freedom. The Lesser General
|
|
||||||
Public License permits more lax criteria for linking other code with
|
|
||||||
the library.
|
|
||||||
|
|
||||||
We call this license the "Lesser" General Public License because it
|
"Produktive Nutzung" bezeichnet jede Nutzung der lizenzierten Arbeit für einen
|
||||||
does Less to protect the user's freedom than the ordinary General
|
Zweck, der über die persönliche, nicht-kommerzielle Nutzung hinausgeht. Dies
|
||||||
Public License. It also provides other free software developers Less
|
umfasst, ist aber nicht beschränkt auf:
|
||||||
of an advantage over competing non-free programs. These disadvantages
|
|
||||||
are the reason we use the ordinary General Public License for many
|
|
||||||
libraries. However, the Lesser license provides advantages in certain
|
|
||||||
special circumstances.
|
|
||||||
|
|
||||||
For example, on rare occasions, there may be a special need to
|
(a) Nutzung der lizenzierten Arbeit zur Erbringung von Dienstleistungen für
|
||||||
encourage the widest possible use of a certain library, so that it becomes
|
Dritte;
|
||||||
a de-facto standard. To achieve this, non-free programs must be
|
(b) Nutzung der lizenzierten Arbeit als Teil eines kommerziellen Produkts
|
||||||
allowed to use the library. A more frequent case is that a free
|
oder einer kommerziellen Dienstleistung;
|
||||||
library does the same job as widely used non-free libraries. In this
|
(c) Nutzung der lizenzierten Arbeit zur Generierung von Einnahmen;
|
||||||
case, there is little to gain by limiting the free library to free
|
(d) Nutzung der lizenzierten Arbeit in einer Unternehmensumgebung.
|
||||||
software only, so we use the Lesser General Public License.
|
|
||||||
|
|
||||||
In other cases, permission to use a particular library in non-free
|
GEWÄHRLEISTUNGSAUSSCHLUSS
|
||||||
programs enables a greater number of people to use a large body of
|
|
||||||
free software. For example, permission to use the GNU C Library in
|
|
||||||
non-free programs enables many more people to use the whole GNU
|
|
||||||
operating system, as well as its variant, the GNU/Linux operating
|
|
||||||
system.
|
|
||||||
|
|
||||||
Although the Lesser General Public License is Less protective of the
|
DIE LIZENZIERTE ARBEIT WIRD "WIE BESEHEN" ZUR VERFÜGUNG GESTELLT, OHNE
|
||||||
users' freedom, it does ensure that the user of a program that is
|
JEGLICHE GEWÄHRLEISTUNG, WEDER AUSDRÜCKLICH NOCH STILLSCHWEIGEND,
|
||||||
linked with the Library has the freedom and the wherewithal to run
|
EINSCHLIEßLICH, ABER NICHT BESCHRÄNKT AUF DIE GEWÄHRLEISTUNG DER
|
||||||
that program using a modified version of the Library.
|
MARKTGÄNGIGKEIT, EIGNUNG FÜR EINEN BESTIMMTEN ZWECK UND NICHTVERLETZUNG VON
|
||||||
|
RECHTEN DRITTER. IN KEINEM FALL HAFTET DER LIZENZGEBER FÜR ANSPRÜCHE, SCHÄDEN
|
||||||
|
ODER ANDERE VERBINDLICHKEITEN, OB IN EINER VERTRAGS- ODER DELIKTKLAGE ODER
|
||||||
|
ANDERWEITIG, DIE SICH AUS DER LIZENZIERTEN ARBEIT ODER DER NUTZUNG ODER
|
||||||
|
ANDEREN GESCHÄFTEN MIT DER LIZENZIERTEN ARBEIT ERGEBEN.
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
-----------------------------------------------------------------------------
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, whereas the latter must
|
|
||||||
be combined with the library in order to run.
|
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
Für kommerzielle Lizenzen kontaktieren Sie bitte: kontakt@hexahost.de
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
|
||||||
program which contains a notice placed by the copyright holder or
|
|
||||||
other authorized party saying it may be distributed under the terms of
|
|
||||||
this Lesser General Public License (also called "this License").
|
|
||||||
Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, complete source code means
|
|
||||||
all the source code for all modules it contains, plus any associated
|
|
||||||
interface definition files, plus the scripts used to control compilation
|
|
||||||
and installation of the library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete source code as you receive it, in any medium, provided that
|
|
||||||
you conspicuously and appropriately publish on each copy an
|
|
||||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
|
||||||
all the notices that refer to this License and to the absence of any
|
|
||||||
warranty; and distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy,
|
|
||||||
and you may at your option offer warranty protection in exchange for a
|
|
||||||
fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Library, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote
|
|
||||||
it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you accompany
|
|
||||||
it with the complete corresponding machine-readable source code, which
|
|
||||||
must be distributed under the terms of Sections 1 and 2 above on a
|
|
||||||
medium customarily used for software interchange.
|
|
||||||
|
|
||||||
If distribution of object code is made by offering access to copy
|
|
||||||
from a designated place, then offering equivalent access to copy the
|
|
||||||
source code from the same place satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (1) uses at run time a
|
|
||||||
copy of the library already present on the user's computer system,
|
|
||||||
rather than copying library functions into the executable, and (2)
|
|
||||||
will operate properly with a modified version of the library, if
|
|
||||||
the user installs one, as long as the modified version is
|
|
||||||
interface-compatible with the version that the work was made with.
|
|
||||||
|
|
||||||
c) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
d) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
e) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. However, as a special exception,
|
|
||||||
the materials to be distributed need not include anything that is
|
|
||||||
normally distributed (in either source or binary form) with the major
|
|
||||||
components (compiler, kernel, and so on) of the operating system on
|
|
||||||
which the executable runs, unless that component itself accompanies
|
|
||||||
the executable.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library is void, and will automatically terminate your
|
|
||||||
rights under this License. However, parties who have received copies,
|
|
||||||
or rights, from you under this License will not have their licenses
|
|
||||||
terminated so long as such parties remain in full compliance.
|
|
||||||
|
|
||||||
9. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
subject to these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties with
|
|
||||||
this License.
|
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Library.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under any
|
|
||||||
particular circumstance, the balance of the section is intended to apply,
|
|
||||||
and the section as a whole is intended to apply in other circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library under this License may add
|
|
||||||
an explicit geographical distribution limitation excluding those countries,
|
|
||||||
so that distribution is permitted only in or among countries not thus
|
|
||||||
excluded. In such case, this License incorporates the limitation as if
|
|
||||||
written in the body of this License.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Lesser 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 Library
|
|
||||||
specifies a version number of this License which applies to it and
|
|
||||||
"any later version", you have the option of following the terms and
|
|
||||||
conditions either of that version or of any later version published by
|
|
||||||
the Free Software Foundation. If the Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
write to the author to ask for permission. For software which is
|
|
||||||
copyrighted by the Free Software Foundation, write to the Free
|
|
||||||
Software Foundation; we sometimes make exceptions for this. Our
|
|
||||||
decision will be guided by the two goals of preserving the free status
|
|
||||||
of all derivatives of our free software and of promoting the sharing
|
|
||||||
and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "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
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
|
||||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
|
||||||
AND/OR REDISTRIBUTE THE LIBRARY 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
|
|
||||||
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
|
||||||
possible use to the public, we recommend making it free software that
|
|
||||||
everyone can redistribute and change. You can do so by permitting
|
|
||||||
redistribution under these terms (or, alternatively, under the terms of the
|
|
||||||
ordinary General Public License).
|
|
||||||
|
|
||||||
To apply these terms, attach the following notices to the library. It is
|
|
||||||
safest to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least the
|
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the library's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
|
||||||
License as published by the Free Software Foundation; either
|
|
||||||
version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
This library 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
|
|
||||||
Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
|
||||||
License along with this library; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
||||||
USA
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
|
||||||
library `Frob' (a library for tweaking knobs) written by James Random
|
|
||||||
Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1990
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
That's all there is to it!
|
|
||||||
|
|||||||
95
README.md
95
README.md
@@ -22,7 +22,7 @@ HexaHost-Backend/
|
|||||||
│ ├── header.php # HTML-Header-Template
|
│ ├── header.php # HTML-Header-Template
|
||||||
│ ├── footer.php # HTML-Footer-Template
|
│ ├── footer.php # HTML-Footer-Template
|
||||||
│ └── functions.php # PHP-Hilfsfunktionen
|
│ └── functions.php # PHP-Hilfsfunktionen
|
||||||
├── LICENSE # LGPL-2.1 Lizenz
|
├── LICENSE # BSL-1.1 Lizenz
|
||||||
└── README.md # Diese Datei
|
└── README.md # Diese Datei
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -30,11 +30,19 @@ HexaHost-Backend/
|
|||||||
|
|
||||||
Die Backend-Dateien müssen in das Frontend-Repository integriert werden:
|
Die Backend-Dateien müssen in das Frontend-Repository integriert werden:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Vom main Branch die Produktionsdateien kopieren
|
||||||
|
cd HexaHost-Backend
|
||||||
|
git checkout main
|
||||||
|
cp -r assets config includes ../HexaHost-Frontend/public/
|
||||||
|
git checkout develop
|
||||||
|
```
|
||||||
|
|
||||||
|
Oder mit einem Befehl:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Aus dem Projekt-Root-Verzeichnis
|
# Aus dem Projekt-Root-Verzeichnis
|
||||||
cp -r HexaHost-Backend/assets/* HexaHost-Frontend/public/assets/
|
cd HexaHost-Backend && git checkout main && cp -r assets config includes ../HexaHost-Frontend/public/ && git checkout develop
|
||||||
cp -r HexaHost-Backend/config/* HexaHost-Frontend/public/config/
|
|
||||||
cp -r HexaHost-Backend/includes/* HexaHost-Frontend/public/includes/
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Zielstruktur im Frontend
|
### Zielstruktur im Frontend
|
||||||
@@ -270,14 +278,27 @@ $debug_config = [
|
|||||||
|
|
||||||
```
|
```
|
||||||
Branches:
|
Branches:
|
||||||
├── main → Produktions-Code (mit obfuscated dist/)
|
├── main → Produktions-Code (optimierte Dateien direkt im Root)
|
||||||
└── develop → Entwicklungs-Code (lesbarer Source)
|
└── develop → Entwicklungs-Code (lesbarer Source + Build-System)
|
||||||
```
|
```
|
||||||
|
|
||||||
| Branch | Inhalt | Verwendung |
|
| Branch | Inhalt | Verwendung |
|
||||||
|--------|--------|------------|
|
|--------|--------|------------|
|
||||||
| `main` | Lesbare Quellen + `dist/` Ordner | Für Produktion: Dateien aus `dist/` verwenden |
|
| `main` | Optimierte `assets/`, `config/`, `includes/` im Root | Für Produktion: direkt kopieren |
|
||||||
| `develop` | Nur lesbare Quellen + Build-System | Für Entwicklung |
|
| `develop` | Lesbare Quellen + `dist/` Build-Output | Für Entwicklung |
|
||||||
|
|
||||||
|
### Struktur im `main` Branch
|
||||||
|
|
||||||
|
```
|
||||||
|
HexaHost-Backend/ (main)
|
||||||
|
├── assets/ ← Minifiziertes CSS, obfusciertes JS
|
||||||
|
│ ├── css/
|
||||||
|
│ └── js/
|
||||||
|
├── config/ ← PHP-Konfiguration
|
||||||
|
├── includes/ ← PHP-Templates
|
||||||
|
├── README.md
|
||||||
|
└── LICENSE
|
||||||
|
```
|
||||||
|
|
||||||
### Workflow
|
### Workflow
|
||||||
|
|
||||||
@@ -289,12 +310,24 @@ npm run build # dist/ neu generieren
|
|||||||
git add .
|
git add .
|
||||||
git commit -m "feat: ..."
|
git commit -m "feat: ..."
|
||||||
|
|
||||||
# Release
|
# Release (automatisch mit deploy script)
|
||||||
|
npm run deploy # Build + Copy to main + Push
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manueller Release
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git checkout develop
|
||||||
|
npm run build
|
||||||
|
git add dist/ && git commit -m "build: ..."
|
||||||
git checkout main
|
git checkout main
|
||||||
git merge develop
|
git checkout develop -- dist/
|
||||||
npm run build # dist/ aktualisieren
|
# Dateien von dist/ ins Root verschieben
|
||||||
git add dist/
|
mv dist/assets dist/config dist/includes .
|
||||||
git commit -m "build: Update production files"
|
rm -rf dist/
|
||||||
|
git add -A && git commit -m "deploy: Update"
|
||||||
|
git push origin main
|
||||||
|
git checkout develop
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🔨 Build-System
|
## 🔨 Build-System
|
||||||
@@ -311,20 +344,21 @@ npm install
|
|||||||
npm run build # Alles bauen (JS + CSS + PHP)
|
npm run build # Alles bauen (JS + CSS + PHP)
|
||||||
npm run build:js # Nur JavaScript obfuscieren
|
npm run build:js # Nur JavaScript obfuscieren
|
||||||
npm run build:css # Nur CSS minifizieren
|
npm run build:css # Nur CSS minifizieren
|
||||||
|
npm run deploy # Build + Deploy zu main Branch
|
||||||
npm run clean # dist/ Ordner löschen
|
npm run clean # dist/ Ordner löschen
|
||||||
```
|
```
|
||||||
|
|
||||||
### Ausgabe
|
### Build-Ausgabe (`dist/`)
|
||||||
|
|
||||||
Nach dem Build enthält der `dist/` Ordner:
|
Nach dem Build enthält der `dist/` Ordner im develop Branch:
|
||||||
|
|
||||||
```
|
```
|
||||||
dist/
|
dist/
|
||||||
├── assets/
|
├── assets/
|
||||||
│ ├── css/
|
│ ├── css/
|
||||||
│ │ └── style.css # Minifiziert
|
│ │ └── style.css # Minifiziert (-25%)
|
||||||
│ └── js/
|
│ └── js/
|
||||||
│ ├── main.js # Obfusciert
|
│ ├── main.js # Obfusciert (Code-Schutz)
|
||||||
│ ├── contact.js # Obfusciert
|
│ ├── contact.js # Obfusciert
|
||||||
│ └── cookie-consent.js # Obfusciert
|
│ └── cookie-consent.js # Obfusciert
|
||||||
├── config/
|
├── config/
|
||||||
@@ -336,6 +370,16 @@ dist/
|
|||||||
└── functions.php # Kopiert
|
└── functions.php # Kopiert
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Deploy-Prozess
|
||||||
|
|
||||||
|
Das `npm run deploy` Script:
|
||||||
|
1. Prüft ob du auf `develop` bist
|
||||||
|
2. Führt `npm run build` aus
|
||||||
|
3. Wechselt zu `main`
|
||||||
|
4. Kopiert `dist/` Inhalte direkt ins Root
|
||||||
|
5. Committed und pusht zu `origin/main`
|
||||||
|
6. Wechselt zurück zu `develop`
|
||||||
|
|
||||||
## 📋 Voraussetzungen
|
## 📋 Voraussetzungen
|
||||||
|
|
||||||
- **Node.js 18+** (für Build-System)
|
- **Node.js 18+** (für Build-System)
|
||||||
@@ -345,7 +389,22 @@ dist/
|
|||||||
|
|
||||||
## 📄 Lizenz
|
## 📄 Lizenz
|
||||||
|
|
||||||
GNU Lesser General Public License v2.1 (LGPL-2.1)
|
Dieses Projekt ist unter der **Business Source License 1.1 (BSL)** lizenziert.
|
||||||
|
|
||||||
|
### Was bedeutet das?
|
||||||
|
|
||||||
|
| Erlaubt | Nicht erlaubt (ohne kommerzielle Lizenz) |
|
||||||
|
|---------|------------------------------------------|
|
||||||
|
| ✅ Code ansehen & lernen | ❌ Kommerzieller Einsatz |
|
||||||
|
| ✅ Privater, nicht-kommerzieller Gebrauch | ❌ Nutzung für SaaS/Hosting-Dienste |
|
||||||
|
| ✅ Modifikationen für persönliche Zwecke | ❌ Unternehmensnutzung |
|
||||||
|
| ✅ Akademische/Bildungszwecke | ❌ Weiterverkauf oder Sublizenzierung |
|
||||||
|
|
||||||
|
**Änderungsdatum:** Am 16. Januar 2030 wird der Code automatisch unter der **GPL v3** verfügbar.
|
||||||
|
|
||||||
|
**Kommerzielle Lizenz:** Für kommerzielle Nutzung kontaktieren Sie bitte kontakt@hexahost.de
|
||||||
|
|
||||||
|
Siehe [LICENSE](LICENSE) für den vollständigen Lizenztext.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,171 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* HexaHost.de SMTP Konfiguration
|
* HexaHost.de Konfiguration
|
||||||
*
|
*
|
||||||
* WICHTIG: Ändern Sie diese Werte entsprechend Ihren SMTP-Einstellungen!
|
* HINWEIS: Diese Datei ist veraltet!
|
||||||
*
|
*
|
||||||
* Beispiele für verschiedene E-Mail-Provider:
|
* Die Konfiguration wurde nach mail-config.php verschoben.
|
||||||
|
* Bitte verwenden Sie stattdessen:
|
||||||
*
|
*
|
||||||
* Gmail:
|
* require_once 'config/mail-config.php';
|
||||||
* - smtp_host: smtp.gmail.com
|
|
||||||
* - smtp_port: 587
|
|
||||||
* - smtp_encryption: tls
|
|
||||||
*
|
*
|
||||||
* Outlook/Hotmail:
|
* Diese Datei wird nur aus Kompatibilitätsgründen beibehalten.
|
||||||
* - smtp_host: smtp-mail.outlook.com
|
|
||||||
* - smtp_port: 587
|
|
||||||
* - smtp_encryption: tls
|
|
||||||
*
|
|
||||||
* GMX:
|
|
||||||
* - smtp_host: mail.gmx.net
|
|
||||||
* - smtp_port: 587
|
|
||||||
* - smtp_encryption: tls
|
|
||||||
*
|
|
||||||
* Web.de:
|
|
||||||
* - smtp_host: smtp.web.de
|
|
||||||
* - smtp_port: 587
|
|
||||||
* - smtp_encryption: tls
|
|
||||||
*
|
|
||||||
* Eigener Mail-Server:
|
|
||||||
* - smtp_host: mail.ihre-domain.de
|
|
||||||
* - smtp_port: 587 (oder 465 für SSL)
|
|
||||||
* - smtp_encryption: tls (oder ssl)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// SMTP Konfiguration - HIER IHRE WERTE EINTRAGEN
|
// Lade die neue Konfiguration
|
||||||
$smtp_config = [
|
require_once __DIR__ . '/mail-config.php';
|
||||||
// SMTP Server-Einstellungen
|
|
||||||
'smtp_host' => 'smtp.gmail.com', // z.B. smtp.gmail.com
|
|
||||||
'smtp_port' => 587, // 587 für TLS, 465 für SSL
|
|
||||||
'smtp_username' => 'test@hexahost.de', // z.B. info@hexahost.de
|
|
||||||
'smtp_password' => 'your-app-password', // Ihr SMTP-Passwort
|
|
||||||
'smtp_encryption' => 'tls', // 'tls' oder 'ssl'
|
|
||||||
|
|
||||||
// Absender-Einstellungen
|
|
||||||
'from_email' => 'test@hexahost.de', // Absender-E-Mail
|
|
||||||
'from_name' => 'HexaHost.de Kontaktformular', // Absender-Name
|
|
||||||
|
|
||||||
// Empfänger-Einstellungen
|
|
||||||
'to_email' => 'info@hexahost.de', // Empfänger-E-Mail
|
|
||||||
'to_name' => 'HexaHost Support', // Empfänger-Name
|
|
||||||
|
|
||||||
// Sicherheitseinstellungen
|
|
||||||
'max_requests_per_hour' => 5, // Max. Anfragen pro Stunde pro IP
|
|
||||||
'honeypot_field' => 'website', // Verstecktes Feld für Bot-Schutz
|
|
||||||
|
|
||||||
// E-Mail-Template-Einstellungen
|
|
||||||
'email_template' => 'html', // 'html' oder 'text'
|
|
||||||
'include_ip_address' => true, // IP-Adresse in E-Mail anzeigen
|
|
||||||
'include_timestamp' => true, // Zeitstempel in E-Mail anzeigen
|
|
||||||
];
|
|
||||||
|
|
||||||
// DNS-Einstellungen für Spam-Schutz (werden über DNS konfiguriert)
|
|
||||||
$dns_config = [
|
|
||||||
// SPF Record (TXT Record in DNS)
|
|
||||||
'spf_record' => 'v=spf1 include:_spf.hexahost.de ~all',
|
|
||||||
|
|
||||||
// DMARC Record (TXT Record in DNS)
|
|
||||||
'dmarc_record' => 'v=DMARC1; p=quarantine; rua=mailto:dmarc@hexahost.de',
|
|
||||||
|
|
||||||
// DKIM wird über den Mail-Server konfiguriert
|
|
||||||
];
|
|
||||||
|
|
||||||
// Debug-Einstellungen (nur für Entwicklung)
|
|
||||||
$debug_config = [
|
|
||||||
'debug_mode' => false, // Debug-Modus aktivieren
|
|
||||||
'log_errors' => true, // Fehler loggen
|
|
||||||
'log_file' => 'contact_form_errors.log', // Log-Datei
|
|
||||||
];
|
|
||||||
|
|
||||||
// Exportiere Konfiguration für andere Dateien
|
|
||||||
if (!defined('HEXAHOST_CONFIG_LOADED')) {
|
|
||||||
define('HEXAHOST_CONFIG_LOADED', true);
|
|
||||||
|
|
||||||
// Globale Variablen für andere Dateien
|
|
||||||
$GLOBALS['hexahost_smtp_config'] = $smtp_config;
|
|
||||||
$GLOBALS['hexahost_dns_config'] = $dns_config;
|
|
||||||
$GLOBALS['hexahost_debug_config'] = $debug_config;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hilfsfunktion zum Abrufen der Konfiguration
|
|
||||||
function getHexaHostConfig($key = null) {
|
|
||||||
global $smtp_config, $dns_config, $debug_config;
|
|
||||||
|
|
||||||
if ($key === null) {
|
|
||||||
return array_merge($smtp_config, $dns_config, $debug_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($smtp_config[$key])) {
|
|
||||||
return $smtp_config[$key];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($dns_config[$key])) {
|
|
||||||
return $dns_config[$key];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($debug_config[$key])) {
|
|
||||||
return $debug_config[$key];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Debug-Funktion
|
|
||||||
function hexahostDebug($message, $type = 'info') {
|
|
||||||
global $debug_config;
|
|
||||||
|
|
||||||
if (!$debug_config['debug_mode']) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$timestamp = date('Y-m-d H:i:s');
|
|
||||||
$log_message = "[$timestamp] [$type] $message" . PHP_EOL;
|
|
||||||
|
|
||||||
if ($debug_config['log_errors']) {
|
|
||||||
error_log($log_message, 3, $debug_config['log_file']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($debug_config['debug_mode']) {
|
|
||||||
echo "<!-- HexaHost Debug: $message -->\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validierung der SMTP-Konfiguration
|
|
||||||
function validateSMTPConfig() {
|
|
||||||
$config = getHexaHostConfig();
|
|
||||||
$errors = [];
|
|
||||||
|
|
||||||
// Prüfe ob alle erforderlichen Felder ausgefüllt sind
|
|
||||||
$required_fields = ['smtp_host', 'smtp_username', 'smtp_password', 'from_email', 'to_email'];
|
|
||||||
|
|
||||||
foreach ($required_fields as $field) {
|
|
||||||
if (empty($config[$field]) || $config[$field] === 'YOUR_SMTP_' . strtoupper(substr($field, 5))) {
|
|
||||||
$errors[] = "Konfigurationsfehler: $field ist nicht korrekt eingestellt.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prüfe SMTP-Port
|
|
||||||
if (!is_numeric($config['smtp_port']) || $config['smtp_port'] < 1 || $config['smtp_port'] > 65535) {
|
|
||||||
$errors[] = "Konfigurationsfehler: Ungültiger SMTP-Port.";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prüfe E-Mail-Format
|
|
||||||
if (!filter_var($config['from_email'], FILTER_VALIDATE_EMAIL)) {
|
|
||||||
$errors[] = "Konfigurationsfehler: Ungültige Absender-E-Mail.";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!filter_var($config['to_email'], FILTER_VALIDATE_EMAIL)) {
|
|
||||||
$errors[] = "Konfigurationsfehler: Ungültige Empfänger-E-Mail.";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $errors;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Zeige Konfigurationsfehler an (nur im Debug-Modus)
|
|
||||||
if (getHexaHostConfig('debug_mode')) {
|
|
||||||
$config_errors = validateSMTPConfig();
|
|
||||||
if (!empty($config_errors)) {
|
|
||||||
hexahostDebug('SMTP-Konfigurationsfehler: ' . implode(', ', $config_errors), 'error');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
@@ -140,16 +140,59 @@ function isValidEmail($email) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CSRF Token generieren
|
// CSRF Token generieren (wird in functions.php verwendet)
|
||||||
function generateCSRFToken() {
|
// Hinweis: Diese Funktion existiert auch in functions.php - hier nur als Fallback
|
||||||
|
if (!function_exists('generateCSRFToken')) {
|
||||||
|
function generateCSRFToken() {
|
||||||
if (!isset($_SESSION['csrf_token'])) {
|
if (!isset($_SESSION['csrf_token'])) {
|
||||||
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
|
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
|
||||||
}
|
}
|
||||||
return $_SESSION['csrf_token'];
|
return $_SESSION['csrf_token'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CSRF Token validieren
|
// CSRF Token validieren
|
||||||
function validateCSRFToken($token) {
|
if (!function_exists('validateCSRFToken')) {
|
||||||
|
function validateCSRFToken($token) {
|
||||||
return isset($_SESSION['csrf_token']) && hash_equals($_SESSION['csrf_token'], $token);
|
return isset($_SESSION['csrf_token']) && hash_equals($_SESSION['csrf_token'], $token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hilfsfunktion zum Abrufen der Konfiguration als Array
|
||||||
|
* Kompatibilität mit contact-handler.php
|
||||||
|
*
|
||||||
|
* @param string|null $key Optional: einzelner Schlüssel
|
||||||
|
* @return mixed Konfigurationsarray oder einzelner Wert
|
||||||
|
*/
|
||||||
|
function getHexaHostConfig($key = null) {
|
||||||
|
$config = [
|
||||||
|
// SMTP Server-Einstellungen
|
||||||
|
'smtp_host' => SMTP_HOST,
|
||||||
|
'smtp_port' => SMTP_PORT,
|
||||||
|
'smtp_username' => SMTP_USERNAME,
|
||||||
|
'smtp_password' => SMTP_PASSWORD,
|
||||||
|
'smtp_encryption' => 'tls',
|
||||||
|
|
||||||
|
// Absender/Empfänger
|
||||||
|
'from_email' => SMTP_FROM_EMAIL,
|
||||||
|
'from_name' => 'HexaHost.de Kontaktformular',
|
||||||
|
'to_email' => SMTP_TO_EMAIL,
|
||||||
|
'to_name' => 'HexaHost Support',
|
||||||
|
|
||||||
|
// Sicherheit
|
||||||
|
'max_requests_per_hour' => MAX_REQUESTS_PER_HOUR,
|
||||||
|
'honeypot_field' => 'website',
|
||||||
|
|
||||||
|
// Debug
|
||||||
|
'debug_mode' => DEBUG_MODE,
|
||||||
|
'log_errors' => LOG_EMAILS,
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($key === null) {
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $config[$key] ?? null;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
517
config/products-config.php
Normal file
517
config/products-config.php
Normal file
@@ -0,0 +1,517 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* HexaHost.de Produkt-Konfiguration
|
||||||
|
*
|
||||||
|
* Hier können Sie alle Preise und Produktinformationen zentral verwalten.
|
||||||
|
* Nach Änderungen: npm run build && npm run deploy
|
||||||
|
*
|
||||||
|
* Verwendung in PHP-Seiten:
|
||||||
|
* require_once 'config/products-config.php';
|
||||||
|
* $packages = getProductPackages('vpc');
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// VIRTUAL PRIVATE CONTAINER (VPC)
|
||||||
|
// ============================================================================
|
||||||
|
$PRODUCTS['vpc'] = [
|
||||||
|
'name' => 'Virtual Private Container',
|
||||||
|
'short_name' => 'VPC',
|
||||||
|
'description' => 'Effiziente LXC-Container auf Proxmox-Basis',
|
||||||
|
'min_price' => '4,99',
|
||||||
|
'page_title' => 'Virtual Private Container - Effiziente LXC Container | HexaHost.de',
|
||||||
|
'page_description' => 'Virtual Private Container auf Proxmox LXC-Basis. Effiziente und preiswerte Container-Lösungen ab 4,99€/Monat bei HexaHost.de',
|
||||||
|
'packages' => [
|
||||||
|
'starter' => [
|
||||||
|
'name' => 'VPC Starter',
|
||||||
|
'price' => '4,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '1 vCore'],
|
||||||
|
['label' => 'RAM', 'value' => '1 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '20 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '1 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox LXC Container',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Backup inklusive',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'business' => [
|
||||||
|
'name' => 'VPC Business',
|
||||||
|
'price' => '9,99',
|
||||||
|
'featured' => true,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '2 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '4 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '80 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '3 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox LXC Container',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Tägliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'professional' => [
|
||||||
|
'name' => 'VPC Professional',
|
||||||
|
'price' => '19,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '4 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '8 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '160 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '5 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '2'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox LXC Container',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Stündliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
'Priority Support',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'enterprise' => [
|
||||||
|
'name' => 'VPC Enterprise',
|
||||||
|
'price' => '39,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '8 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '16 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '320 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '10 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '3'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox LXC Container',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Stündliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
'Priority Support',
|
||||||
|
'Individuelle Konfiguration',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// VIRTUAL PRIVATE SERVER (VPS)
|
||||||
|
// ============================================================================
|
||||||
|
$PRODUCTS['vps'] = [
|
||||||
|
'name' => 'Virtual Private Server',
|
||||||
|
'short_name' => 'VPS',
|
||||||
|
'description' => 'Vollwertige KVM-Virtualisierung mit Root-Zugriff',
|
||||||
|
'min_price' => '9,99',
|
||||||
|
'page_title' => 'Virtual Private Server - KVM Virtualisierung | HexaHost.de',
|
||||||
|
'page_description' => 'Virtual Private Server auf Proxmox KVM-Basis. Vollwertige Virtualisierung mit Root-Zugriff ab 9,99€/Monat bei HexaHost.de',
|
||||||
|
'packages' => [
|
||||||
|
'starter' => [
|
||||||
|
'name' => 'VPS Starter',
|
||||||
|
'price' => '9,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '1 vCore'],
|
||||||
|
['label' => 'RAM', 'value' => '2 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '40 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '2 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox KVM Virtualisierung',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Backup inklusive',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'business' => [
|
||||||
|
'name' => 'VPS Business',
|
||||||
|
'price' => '19,99',
|
||||||
|
'featured' => true,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '2 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '4 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '80 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '4 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox KVM Virtualisierung',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Tägliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'professional' => [
|
||||||
|
'name' => 'VPS Professional',
|
||||||
|
'price' => '39,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '4 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '8 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '160 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '8 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '2'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox KVM Virtualisierung',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Stündliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
'Priority Support',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'enterprise' => [
|
||||||
|
'name' => 'VPS Enterprise',
|
||||||
|
'price' => '79,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '8 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '16 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '320 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '15 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '3'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox KVM Virtualisierung',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Stündliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
'Priority Support',
|
||||||
|
'Individuelle Konfiguration',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// MAIL GATEWAY
|
||||||
|
// ============================================================================
|
||||||
|
$PRODUCTS['mail-gateway'] = [
|
||||||
|
'name' => 'Mail Gateway',
|
||||||
|
'short_name' => 'Mail',
|
||||||
|
'description' => 'Professioneller E-Mail-Schutz für Unternehmen',
|
||||||
|
'min_price' => '4,99',
|
||||||
|
'page_title' => 'Mail Gateway - Professionelle E-Mail-Lösungen | HexaHost.de',
|
||||||
|
'page_description' => 'Professionelle Mail Gateway Lösungen für Unternehmen. Spam-Schutz, E-Mail-Archivierung und sichere E-Mail-Kommunikation bei HexaHost.de',
|
||||||
|
'packages' => [
|
||||||
|
'starter' => [
|
||||||
|
'name' => 'Mail Starter',
|
||||||
|
'price' => '4,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Postfächer', 'value' => '5'],
|
||||||
|
['label' => 'Speicher/Postfach', 'value' => '5 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '1'],
|
||||||
|
['label' => 'E-Mails/Tag', 'value' => '500'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Spam-Filter',
|
||||||
|
'Virus-Schutz',
|
||||||
|
'Webmail',
|
||||||
|
'IMAP/POP3',
|
||||||
|
'SSL/TLS Verschlüsselung',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'business' => [
|
||||||
|
'name' => 'Mail Business',
|
||||||
|
'price' => '14,99',
|
||||||
|
'featured' => true,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Postfächer', 'value' => '25'],
|
||||||
|
['label' => 'Speicher/Postfach', 'value' => '10 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '3'],
|
||||||
|
['label' => 'E-Mails/Tag', 'value' => '2.000'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Spam-Filter (erweitert)',
|
||||||
|
'Virus-Schutz',
|
||||||
|
'Webmail',
|
||||||
|
'IMAP/POP3',
|
||||||
|
'SSL/TLS Verschlüsselung',
|
||||||
|
'E-Mail Archivierung (30 Tage)',
|
||||||
|
'Kalender & Kontakte',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'professional' => [
|
||||||
|
'name' => 'Mail Professional',
|
||||||
|
'price' => '29,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Postfächer', 'value' => '100'],
|
||||||
|
['label' => 'Speicher/Postfach', 'value' => '25 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '10'],
|
||||||
|
['label' => 'E-Mails/Tag', 'value' => '10.000'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Spam-Filter (KI-gestützt)',
|
||||||
|
'Virus-Schutz',
|
||||||
|
'Webmail',
|
||||||
|
'IMAP/POP3',
|
||||||
|
'SSL/TLS Verschlüsselung',
|
||||||
|
'E-Mail Archivierung (1 Jahr)',
|
||||||
|
'Kalender & Kontakte',
|
||||||
|
'ActiveSync für Mobile',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'enterprise' => [
|
||||||
|
'name' => 'Mail Enterprise',
|
||||||
|
'price' => '59,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Postfächer', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'Speicher/Postfach', 'value' => '50 GB'],
|
||||||
|
['label' => 'Domains', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'E-Mails/Tag', 'value' => 'Unbegrenzt'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Spam-Filter (KI-gestützt)',
|
||||||
|
'Virus-Schutz',
|
||||||
|
'Webmail',
|
||||||
|
'IMAP/POP3',
|
||||||
|
'SSL/TLS Verschlüsselung',
|
||||||
|
'E-Mail Archivierung (10 Jahre)',
|
||||||
|
'Kalender & Kontakte',
|
||||||
|
'ActiveSync für Mobile',
|
||||||
|
'Dedizierte IP',
|
||||||
|
'Priority Support',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// WEBHOSTING
|
||||||
|
// ============================================================================
|
||||||
|
$PRODUCTS['webhosting'] = [
|
||||||
|
'name' => 'Webhosting',
|
||||||
|
'short_name' => 'Webhosting',
|
||||||
|
'description' => 'Klassisches Hosting mit PHP, MySQL und SSL',
|
||||||
|
'min_price' => '1,99',
|
||||||
|
'page_title' => 'Webhosting - Klassisches Hosting für Websites | HexaHost.de',
|
||||||
|
'page_description' => 'Webhosting mit PHP, MySQL und SSL-Zertifikaten. Klassisches Hosting für Websites ab 1,99€/Monat bei HexaHost.de',
|
||||||
|
'packages' => [
|
||||||
|
'starter' => [
|
||||||
|
'name' => 'Webhosting Starter',
|
||||||
|
'price' => '1,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Webspace', 'value' => '5 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '1'],
|
||||||
|
['label' => 'E-Mail-Postfächer', 'value' => '5'],
|
||||||
|
['label' => 'Datenbanken', 'value' => '1 MySQL'],
|
||||||
|
['label' => 'Traffic', 'value' => '10 GB'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'cPanel/Webmin',
|
||||||
|
'PHP 8.1',
|
||||||
|
'SSL-Zertifikat',
|
||||||
|
'E-Mail-Postfächer',
|
||||||
|
'MySQL Datenbank',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'business' => [
|
||||||
|
'name' => 'Webhosting Business',
|
||||||
|
'price' => '4,99',
|
||||||
|
'featured' => true,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Webspace', 'value' => '20 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '5'],
|
||||||
|
['label' => 'E-Mail-Postfächer', 'value' => '25'],
|
||||||
|
['label' => 'Datenbanken', 'value' => '5 MySQL'],
|
||||||
|
['label' => 'Traffic', 'value' => '50 GB'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'cPanel/Webmin',
|
||||||
|
'PHP 8.1',
|
||||||
|
'SSL-Zertifikat',
|
||||||
|
'E-Mail-Postfächer',
|
||||||
|
'MySQL Datenbanken',
|
||||||
|
'Backup-Service',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'professional' => [
|
||||||
|
'name' => 'Webhosting Professional',
|
||||||
|
'price' => '9,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Webspace', 'value' => '50 GB'],
|
||||||
|
['label' => 'Domains', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'E-Mail-Postfächer', 'value' => '100'],
|
||||||
|
['label' => 'Datenbanken', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'Traffic', 'value' => '200 GB'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'cPanel/Webmin',
|
||||||
|
'PHP 8.1',
|
||||||
|
'SSL-Zertifikat',
|
||||||
|
'E-Mail-Postfächer',
|
||||||
|
'MySQL Datenbanken',
|
||||||
|
'Backup-Service',
|
||||||
|
'Priority Support',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'enterprise' => [
|
||||||
|
'name' => 'Webhosting Enterprise',
|
||||||
|
'price' => '19,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Webspace', 'value' => '100 GB'],
|
||||||
|
['label' => 'Domains', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'E-Mail-Postfächer', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'Datenbanken', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'Traffic', 'value' => '500 GB'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'cPanel/Webmin',
|
||||||
|
'PHP 8.1',
|
||||||
|
'SSL-Zertifikat',
|
||||||
|
'E-Mail-Postfächer',
|
||||||
|
'MySQL Datenbanken',
|
||||||
|
'Backup-Service',
|
||||||
|
'Priority Support',
|
||||||
|
'Individuelle Konfiguration',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// HILFSFUNKTIONEN
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alle Produkte abrufen
|
||||||
|
*/
|
||||||
|
function getAllProducts() {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ein Produkt abrufen
|
||||||
|
*/
|
||||||
|
function getProduct($productId) {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS[$productId] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alle Pakete eines Produkts abrufen
|
||||||
|
*/
|
||||||
|
function getProductPackages($productId) {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS[$productId]['packages'] ?? [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ein bestimmtes Paket abrufen
|
||||||
|
*/
|
||||||
|
function getPackage($productId, $packageId) {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS[$productId]['packages'][$packageId] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Preis eines Pakets abrufen
|
||||||
|
*/
|
||||||
|
function getPackagePrice($productId, $packageId) {
|
||||||
|
$package = getPackage($productId, $packageId);
|
||||||
|
return $package['price'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimalen Preis eines Produkts abrufen
|
||||||
|
*/
|
||||||
|
function getMinPrice($productId) {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS[$productId]['min_price'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Preis formatiert ausgeben
|
||||||
|
*/
|
||||||
|
function formatPrice($price, $withCurrency = true) {
|
||||||
|
return $withCurrency ? $price . '€' : $price;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generiert HTML für eine Paket-Karte
|
||||||
|
*/
|
||||||
|
function renderPackageCard($productId, $packageId, $package) {
|
||||||
|
$featuredClass = $package['featured'] ? ' featured' : '';
|
||||||
|
$featuredBadge = $package['featured'] ? '<div class="featured-badge">Beliebt</div>' : '';
|
||||||
|
|
||||||
|
$specsHtml = '';
|
||||||
|
foreach ($package['specs'] as $spec) {
|
||||||
|
$specsHtml .= sprintf(
|
||||||
|
'<div class="spec-item"><span class="spec-label">%s:</span><span class="spec-value">%s</span></div>',
|
||||||
|
htmlspecialchars($spec['label']),
|
||||||
|
htmlspecialchars($spec['value'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$featuresHtml = '';
|
||||||
|
foreach ($package['features'] as $feature) {
|
||||||
|
$featuresHtml .= sprintf('<div class="feature">✓ %s</div>', htmlspecialchars($feature));
|
||||||
|
}
|
||||||
|
|
||||||
|
return sprintf('
|
||||||
|
<div class="package-card glass-card%s">
|
||||||
|
%s
|
||||||
|
<div class="package-header">
|
||||||
|
<h3 class="package-name">%s</h3>
|
||||||
|
<div class="package-price">
|
||||||
|
<span class="price">%s€</span>
|
||||||
|
<span class="period">/Monat</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="package-specs">
|
||||||
|
%s
|
||||||
|
</div>
|
||||||
|
<div class="package-features">
|
||||||
|
%s
|
||||||
|
</div>
|
||||||
|
<a href="contact.php?package=%s-%s" class="btn btn-primary">Jetzt bestellen</a>
|
||||||
|
</div>',
|
||||||
|
$featuredClass,
|
||||||
|
$featuredBadge,
|
||||||
|
htmlspecialchars($package['name']),
|
||||||
|
$package['price'],
|
||||||
|
$specsHtml,
|
||||||
|
$featuresHtml,
|
||||||
|
$productId,
|
||||||
|
$packageId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generiert HTML für alle Pakete eines Produkts
|
||||||
|
*/
|
||||||
|
function renderAllPackages($productId) {
|
||||||
|
$packages = getProductPackages($productId);
|
||||||
|
$html = '';
|
||||||
|
foreach ($packages as $packageId => $package) {
|
||||||
|
$html .= renderPackageCard($productId, $packageId, $package);
|
||||||
|
}
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
?>
|
||||||
2
dist/assets/js/contact.js
vendored
2
dist/assets/js/contact.js
vendored
File diff suppressed because one or more lines are too long
2
dist/assets/js/cookie-consent.js
vendored
2
dist/assets/js/cookie-consent.js
vendored
File diff suppressed because one or more lines are too long
2
dist/assets/js/main.js
vendored
2
dist/assets/js/main.js
vendored
File diff suppressed because one or more lines are too long
170
dist/config/config.php
vendored
170
dist/config/config.php
vendored
@@ -1,171 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* HexaHost.de SMTP Konfiguration
|
* HexaHost.de Konfiguration
|
||||||
*
|
*
|
||||||
* WICHTIG: Ändern Sie diese Werte entsprechend Ihren SMTP-Einstellungen!
|
* HINWEIS: Diese Datei ist veraltet!
|
||||||
*
|
*
|
||||||
* Beispiele für verschiedene E-Mail-Provider:
|
* Die Konfiguration wurde nach mail-config.php verschoben.
|
||||||
|
* Bitte verwenden Sie stattdessen:
|
||||||
*
|
*
|
||||||
* Gmail:
|
* require_once 'config/mail-config.php';
|
||||||
* - smtp_host: smtp.gmail.com
|
|
||||||
* - smtp_port: 587
|
|
||||||
* - smtp_encryption: tls
|
|
||||||
*
|
*
|
||||||
* Outlook/Hotmail:
|
* Diese Datei wird nur aus Kompatibilitätsgründen beibehalten.
|
||||||
* - smtp_host: smtp-mail.outlook.com
|
|
||||||
* - smtp_port: 587
|
|
||||||
* - smtp_encryption: tls
|
|
||||||
*
|
|
||||||
* GMX:
|
|
||||||
* - smtp_host: mail.gmx.net
|
|
||||||
* - smtp_port: 587
|
|
||||||
* - smtp_encryption: tls
|
|
||||||
*
|
|
||||||
* Web.de:
|
|
||||||
* - smtp_host: smtp.web.de
|
|
||||||
* - smtp_port: 587
|
|
||||||
* - smtp_encryption: tls
|
|
||||||
*
|
|
||||||
* Eigener Mail-Server:
|
|
||||||
* - smtp_host: mail.ihre-domain.de
|
|
||||||
* - smtp_port: 587 (oder 465 für SSL)
|
|
||||||
* - smtp_encryption: tls (oder ssl)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// SMTP Konfiguration - HIER IHRE WERTE EINTRAGEN
|
// Lade die neue Konfiguration
|
||||||
$smtp_config = [
|
require_once __DIR__ . '/mail-config.php';
|
||||||
// SMTP Server-Einstellungen
|
|
||||||
'smtp_host' => 'smtp.gmail.com', // z.B. smtp.gmail.com
|
|
||||||
'smtp_port' => 587, // 587 für TLS, 465 für SSL
|
|
||||||
'smtp_username' => 'test@hexahost.de', // z.B. info@hexahost.de
|
|
||||||
'smtp_password' => 'your-app-password', // Ihr SMTP-Passwort
|
|
||||||
'smtp_encryption' => 'tls', // 'tls' oder 'ssl'
|
|
||||||
|
|
||||||
// Absender-Einstellungen
|
|
||||||
'from_email' => 'test@hexahost.de', // Absender-E-Mail
|
|
||||||
'from_name' => 'HexaHost.de Kontaktformular', // Absender-Name
|
|
||||||
|
|
||||||
// Empfänger-Einstellungen
|
|
||||||
'to_email' => 'info@hexahost.de', // Empfänger-E-Mail
|
|
||||||
'to_name' => 'HexaHost Support', // Empfänger-Name
|
|
||||||
|
|
||||||
// Sicherheitseinstellungen
|
|
||||||
'max_requests_per_hour' => 5, // Max. Anfragen pro Stunde pro IP
|
|
||||||
'honeypot_field' => 'website', // Verstecktes Feld für Bot-Schutz
|
|
||||||
|
|
||||||
// E-Mail-Template-Einstellungen
|
|
||||||
'email_template' => 'html', // 'html' oder 'text'
|
|
||||||
'include_ip_address' => true, // IP-Adresse in E-Mail anzeigen
|
|
||||||
'include_timestamp' => true, // Zeitstempel in E-Mail anzeigen
|
|
||||||
];
|
|
||||||
|
|
||||||
// DNS-Einstellungen für Spam-Schutz (werden über DNS konfiguriert)
|
|
||||||
$dns_config = [
|
|
||||||
// SPF Record (TXT Record in DNS)
|
|
||||||
'spf_record' => 'v=spf1 include:_spf.hexahost.de ~all',
|
|
||||||
|
|
||||||
// DMARC Record (TXT Record in DNS)
|
|
||||||
'dmarc_record' => 'v=DMARC1; p=quarantine; rua=mailto:dmarc@hexahost.de',
|
|
||||||
|
|
||||||
// DKIM wird über den Mail-Server konfiguriert
|
|
||||||
];
|
|
||||||
|
|
||||||
// Debug-Einstellungen (nur für Entwicklung)
|
|
||||||
$debug_config = [
|
|
||||||
'debug_mode' => false, // Debug-Modus aktivieren
|
|
||||||
'log_errors' => true, // Fehler loggen
|
|
||||||
'log_file' => 'contact_form_errors.log', // Log-Datei
|
|
||||||
];
|
|
||||||
|
|
||||||
// Exportiere Konfiguration für andere Dateien
|
|
||||||
if (!defined('HEXAHOST_CONFIG_LOADED')) {
|
|
||||||
define('HEXAHOST_CONFIG_LOADED', true);
|
|
||||||
|
|
||||||
// Globale Variablen für andere Dateien
|
|
||||||
$GLOBALS['hexahost_smtp_config'] = $smtp_config;
|
|
||||||
$GLOBALS['hexahost_dns_config'] = $dns_config;
|
|
||||||
$GLOBALS['hexahost_debug_config'] = $debug_config;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hilfsfunktion zum Abrufen der Konfiguration
|
|
||||||
function getHexaHostConfig($key = null) {
|
|
||||||
global $smtp_config, $dns_config, $debug_config;
|
|
||||||
|
|
||||||
if ($key === null) {
|
|
||||||
return array_merge($smtp_config, $dns_config, $debug_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($smtp_config[$key])) {
|
|
||||||
return $smtp_config[$key];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($dns_config[$key])) {
|
|
||||||
return $dns_config[$key];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($debug_config[$key])) {
|
|
||||||
return $debug_config[$key];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Debug-Funktion
|
|
||||||
function hexahostDebug($message, $type = 'info') {
|
|
||||||
global $debug_config;
|
|
||||||
|
|
||||||
if (!$debug_config['debug_mode']) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$timestamp = date('Y-m-d H:i:s');
|
|
||||||
$log_message = "[$timestamp] [$type] $message" . PHP_EOL;
|
|
||||||
|
|
||||||
if ($debug_config['log_errors']) {
|
|
||||||
error_log($log_message, 3, $debug_config['log_file']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($debug_config['debug_mode']) {
|
|
||||||
echo "<!-- HexaHost Debug: $message -->\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validierung der SMTP-Konfiguration
|
|
||||||
function validateSMTPConfig() {
|
|
||||||
$config = getHexaHostConfig();
|
|
||||||
$errors = [];
|
|
||||||
|
|
||||||
// Prüfe ob alle erforderlichen Felder ausgefüllt sind
|
|
||||||
$required_fields = ['smtp_host', 'smtp_username', 'smtp_password', 'from_email', 'to_email'];
|
|
||||||
|
|
||||||
foreach ($required_fields as $field) {
|
|
||||||
if (empty($config[$field]) || $config[$field] === 'YOUR_SMTP_' . strtoupper(substr($field, 5))) {
|
|
||||||
$errors[] = "Konfigurationsfehler: $field ist nicht korrekt eingestellt.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prüfe SMTP-Port
|
|
||||||
if (!is_numeric($config['smtp_port']) || $config['smtp_port'] < 1 || $config['smtp_port'] > 65535) {
|
|
||||||
$errors[] = "Konfigurationsfehler: Ungültiger SMTP-Port.";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prüfe E-Mail-Format
|
|
||||||
if (!filter_var($config['from_email'], FILTER_VALIDATE_EMAIL)) {
|
|
||||||
$errors[] = "Konfigurationsfehler: Ungültige Absender-E-Mail.";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!filter_var($config['to_email'], FILTER_VALIDATE_EMAIL)) {
|
|
||||||
$errors[] = "Konfigurationsfehler: Ungültige Empfänger-E-Mail.";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $errors;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Zeige Konfigurationsfehler an (nur im Debug-Modus)
|
|
||||||
if (getHexaHostConfig('debug_mode')) {
|
|
||||||
$config_errors = validateSMTPConfig();
|
|
||||||
if (!empty($config_errors)) {
|
|
||||||
hexahostDebug('SMTP-Konfigurationsfehler: ' . implode(', ', $config_errors), 'error');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
49
dist/config/mail-config.php
vendored
49
dist/config/mail-config.php
vendored
@@ -140,16 +140,59 @@ function isValidEmail($email) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CSRF Token generieren
|
// CSRF Token generieren (wird in functions.php verwendet)
|
||||||
function generateCSRFToken() {
|
// Hinweis: Diese Funktion existiert auch in functions.php - hier nur als Fallback
|
||||||
|
if (!function_exists('generateCSRFToken')) {
|
||||||
|
function generateCSRFToken() {
|
||||||
if (!isset($_SESSION['csrf_token'])) {
|
if (!isset($_SESSION['csrf_token'])) {
|
||||||
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
|
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
|
||||||
}
|
}
|
||||||
return $_SESSION['csrf_token'];
|
return $_SESSION['csrf_token'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CSRF Token validieren
|
// CSRF Token validieren
|
||||||
function validateCSRFToken($token) {
|
if (!function_exists('validateCSRFToken')) {
|
||||||
|
function validateCSRFToken($token) {
|
||||||
return isset($_SESSION['csrf_token']) && hash_equals($_SESSION['csrf_token'], $token);
|
return isset($_SESSION['csrf_token']) && hash_equals($_SESSION['csrf_token'], $token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hilfsfunktion zum Abrufen der Konfiguration als Array
|
||||||
|
* Kompatibilität mit contact-handler.php
|
||||||
|
*
|
||||||
|
* @param string|null $key Optional: einzelner Schlüssel
|
||||||
|
* @return mixed Konfigurationsarray oder einzelner Wert
|
||||||
|
*/
|
||||||
|
function getHexaHostConfig($key = null) {
|
||||||
|
$config = [
|
||||||
|
// SMTP Server-Einstellungen
|
||||||
|
'smtp_host' => SMTP_HOST,
|
||||||
|
'smtp_port' => SMTP_PORT,
|
||||||
|
'smtp_username' => SMTP_USERNAME,
|
||||||
|
'smtp_password' => SMTP_PASSWORD,
|
||||||
|
'smtp_encryption' => 'tls',
|
||||||
|
|
||||||
|
// Absender/Empfänger
|
||||||
|
'from_email' => SMTP_FROM_EMAIL,
|
||||||
|
'from_name' => 'HexaHost.de Kontaktformular',
|
||||||
|
'to_email' => SMTP_TO_EMAIL,
|
||||||
|
'to_name' => 'HexaHost Support',
|
||||||
|
|
||||||
|
// Sicherheit
|
||||||
|
'max_requests_per_hour' => MAX_REQUESTS_PER_HOUR,
|
||||||
|
'honeypot_field' => 'website',
|
||||||
|
|
||||||
|
// Debug
|
||||||
|
'debug_mode' => DEBUG_MODE,
|
||||||
|
'log_errors' => LOG_EMAILS,
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($key === null) {
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $config[$key] ?? null;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
517
dist/config/products-config.php
vendored
Normal file
517
dist/config/products-config.php
vendored
Normal file
@@ -0,0 +1,517 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* HexaHost.de Produkt-Konfiguration
|
||||||
|
*
|
||||||
|
* Hier können Sie alle Preise und Produktinformationen zentral verwalten.
|
||||||
|
* Nach Änderungen: npm run build && npm run deploy
|
||||||
|
*
|
||||||
|
* Verwendung in PHP-Seiten:
|
||||||
|
* require_once 'config/products-config.php';
|
||||||
|
* $packages = getProductPackages('vpc');
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// VIRTUAL PRIVATE CONTAINER (VPC)
|
||||||
|
// ============================================================================
|
||||||
|
$PRODUCTS['vpc'] = [
|
||||||
|
'name' => 'Virtual Private Container',
|
||||||
|
'short_name' => 'VPC',
|
||||||
|
'description' => 'Effiziente LXC-Container auf Proxmox-Basis',
|
||||||
|
'min_price' => '4,99',
|
||||||
|
'page_title' => 'Virtual Private Container - Effiziente LXC Container | HexaHost.de',
|
||||||
|
'page_description' => 'Virtual Private Container auf Proxmox LXC-Basis. Effiziente und preiswerte Container-Lösungen ab 4,99€/Monat bei HexaHost.de',
|
||||||
|
'packages' => [
|
||||||
|
'starter' => [
|
||||||
|
'name' => 'VPC Starter',
|
||||||
|
'price' => '4,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '1 vCore'],
|
||||||
|
['label' => 'RAM', 'value' => '1 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '20 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '1 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox LXC Container',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Backup inklusive',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'business' => [
|
||||||
|
'name' => 'VPC Business',
|
||||||
|
'price' => '9,99',
|
||||||
|
'featured' => true,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '2 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '4 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '80 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '3 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox LXC Container',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Tägliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'professional' => [
|
||||||
|
'name' => 'VPC Professional',
|
||||||
|
'price' => '19,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '4 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '8 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '160 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '5 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '2'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox LXC Container',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Stündliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
'Priority Support',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'enterprise' => [
|
||||||
|
'name' => 'VPC Enterprise',
|
||||||
|
'price' => '39,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '8 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '16 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '320 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '10 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '3'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox LXC Container',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Stündliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
'Priority Support',
|
||||||
|
'Individuelle Konfiguration',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// VIRTUAL PRIVATE SERVER (VPS)
|
||||||
|
// ============================================================================
|
||||||
|
$PRODUCTS['vps'] = [
|
||||||
|
'name' => 'Virtual Private Server',
|
||||||
|
'short_name' => 'VPS',
|
||||||
|
'description' => 'Vollwertige KVM-Virtualisierung mit Root-Zugriff',
|
||||||
|
'min_price' => '9,99',
|
||||||
|
'page_title' => 'Virtual Private Server - KVM Virtualisierung | HexaHost.de',
|
||||||
|
'page_description' => 'Virtual Private Server auf Proxmox KVM-Basis. Vollwertige Virtualisierung mit Root-Zugriff ab 9,99€/Monat bei HexaHost.de',
|
||||||
|
'packages' => [
|
||||||
|
'starter' => [
|
||||||
|
'name' => 'VPS Starter',
|
||||||
|
'price' => '9,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '1 vCore'],
|
||||||
|
['label' => 'RAM', 'value' => '2 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '40 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '2 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox KVM Virtualisierung',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Backup inklusive',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'business' => [
|
||||||
|
'name' => 'VPS Business',
|
||||||
|
'price' => '19,99',
|
||||||
|
'featured' => true,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '2 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '4 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '80 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '4 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '1'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox KVM Virtualisierung',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Tägliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'professional' => [
|
||||||
|
'name' => 'VPS Professional',
|
||||||
|
'price' => '39,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '4 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '8 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '160 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '8 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '2'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox KVM Virtualisierung',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Stündliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
'Priority Support',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'enterprise' => [
|
||||||
|
'name' => 'VPS Enterprise',
|
||||||
|
'price' => '79,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'CPU Kerne', 'value' => '8 vCores'],
|
||||||
|
['label' => 'RAM', 'value' => '16 GB'],
|
||||||
|
['label' => 'SSD Speicher', 'value' => '320 GB'],
|
||||||
|
['label' => 'Traffic', 'value' => '15 TB'],
|
||||||
|
['label' => 'IPv4 Adressen', 'value' => '3'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Proxmox KVM Virtualisierung',
|
||||||
|
'Root-Zugriff',
|
||||||
|
'SSH-Zugang',
|
||||||
|
'Stündliches Backup',
|
||||||
|
'24/7 Monitoring',
|
||||||
|
'Snapshot-Funktion',
|
||||||
|
'Priority Support',
|
||||||
|
'Individuelle Konfiguration',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// MAIL GATEWAY
|
||||||
|
// ============================================================================
|
||||||
|
$PRODUCTS['mail-gateway'] = [
|
||||||
|
'name' => 'Mail Gateway',
|
||||||
|
'short_name' => 'Mail',
|
||||||
|
'description' => 'Professioneller E-Mail-Schutz für Unternehmen',
|
||||||
|
'min_price' => '4,99',
|
||||||
|
'page_title' => 'Mail Gateway - Professionelle E-Mail-Lösungen | HexaHost.de',
|
||||||
|
'page_description' => 'Professionelle Mail Gateway Lösungen für Unternehmen. Spam-Schutz, E-Mail-Archivierung und sichere E-Mail-Kommunikation bei HexaHost.de',
|
||||||
|
'packages' => [
|
||||||
|
'starter' => [
|
||||||
|
'name' => 'Mail Starter',
|
||||||
|
'price' => '4,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Postfächer', 'value' => '5'],
|
||||||
|
['label' => 'Speicher/Postfach', 'value' => '5 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '1'],
|
||||||
|
['label' => 'E-Mails/Tag', 'value' => '500'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Spam-Filter',
|
||||||
|
'Virus-Schutz',
|
||||||
|
'Webmail',
|
||||||
|
'IMAP/POP3',
|
||||||
|
'SSL/TLS Verschlüsselung',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'business' => [
|
||||||
|
'name' => 'Mail Business',
|
||||||
|
'price' => '14,99',
|
||||||
|
'featured' => true,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Postfächer', 'value' => '25'],
|
||||||
|
['label' => 'Speicher/Postfach', 'value' => '10 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '3'],
|
||||||
|
['label' => 'E-Mails/Tag', 'value' => '2.000'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Spam-Filter (erweitert)',
|
||||||
|
'Virus-Schutz',
|
||||||
|
'Webmail',
|
||||||
|
'IMAP/POP3',
|
||||||
|
'SSL/TLS Verschlüsselung',
|
||||||
|
'E-Mail Archivierung (30 Tage)',
|
||||||
|
'Kalender & Kontakte',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'professional' => [
|
||||||
|
'name' => 'Mail Professional',
|
||||||
|
'price' => '29,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Postfächer', 'value' => '100'],
|
||||||
|
['label' => 'Speicher/Postfach', 'value' => '25 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '10'],
|
||||||
|
['label' => 'E-Mails/Tag', 'value' => '10.000'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Spam-Filter (KI-gestützt)',
|
||||||
|
'Virus-Schutz',
|
||||||
|
'Webmail',
|
||||||
|
'IMAP/POP3',
|
||||||
|
'SSL/TLS Verschlüsselung',
|
||||||
|
'E-Mail Archivierung (1 Jahr)',
|
||||||
|
'Kalender & Kontakte',
|
||||||
|
'ActiveSync für Mobile',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'enterprise' => [
|
||||||
|
'name' => 'Mail Enterprise',
|
||||||
|
'price' => '59,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Postfächer', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'Speicher/Postfach', 'value' => '50 GB'],
|
||||||
|
['label' => 'Domains', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'E-Mails/Tag', 'value' => 'Unbegrenzt'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'Spam-Filter (KI-gestützt)',
|
||||||
|
'Virus-Schutz',
|
||||||
|
'Webmail',
|
||||||
|
'IMAP/POP3',
|
||||||
|
'SSL/TLS Verschlüsselung',
|
||||||
|
'E-Mail Archivierung (10 Jahre)',
|
||||||
|
'Kalender & Kontakte',
|
||||||
|
'ActiveSync für Mobile',
|
||||||
|
'Dedizierte IP',
|
||||||
|
'Priority Support',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// WEBHOSTING
|
||||||
|
// ============================================================================
|
||||||
|
$PRODUCTS['webhosting'] = [
|
||||||
|
'name' => 'Webhosting',
|
||||||
|
'short_name' => 'Webhosting',
|
||||||
|
'description' => 'Klassisches Hosting mit PHP, MySQL und SSL',
|
||||||
|
'min_price' => '1,99',
|
||||||
|
'page_title' => 'Webhosting - Klassisches Hosting für Websites | HexaHost.de',
|
||||||
|
'page_description' => 'Webhosting mit PHP, MySQL und SSL-Zertifikaten. Klassisches Hosting für Websites ab 1,99€/Monat bei HexaHost.de',
|
||||||
|
'packages' => [
|
||||||
|
'starter' => [
|
||||||
|
'name' => 'Webhosting Starter',
|
||||||
|
'price' => '1,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Webspace', 'value' => '5 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '1'],
|
||||||
|
['label' => 'E-Mail-Postfächer', 'value' => '5'],
|
||||||
|
['label' => 'Datenbanken', 'value' => '1 MySQL'],
|
||||||
|
['label' => 'Traffic', 'value' => '10 GB'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'cPanel/Webmin',
|
||||||
|
'PHP 8.1',
|
||||||
|
'SSL-Zertifikat',
|
||||||
|
'E-Mail-Postfächer',
|
||||||
|
'MySQL Datenbank',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'business' => [
|
||||||
|
'name' => 'Webhosting Business',
|
||||||
|
'price' => '4,99',
|
||||||
|
'featured' => true,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Webspace', 'value' => '20 GB'],
|
||||||
|
['label' => 'Domains', 'value' => '5'],
|
||||||
|
['label' => 'E-Mail-Postfächer', 'value' => '25'],
|
||||||
|
['label' => 'Datenbanken', 'value' => '5 MySQL'],
|
||||||
|
['label' => 'Traffic', 'value' => '50 GB'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'cPanel/Webmin',
|
||||||
|
'PHP 8.1',
|
||||||
|
'SSL-Zertifikat',
|
||||||
|
'E-Mail-Postfächer',
|
||||||
|
'MySQL Datenbanken',
|
||||||
|
'Backup-Service',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'professional' => [
|
||||||
|
'name' => 'Webhosting Professional',
|
||||||
|
'price' => '9,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Webspace', 'value' => '50 GB'],
|
||||||
|
['label' => 'Domains', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'E-Mail-Postfächer', 'value' => '100'],
|
||||||
|
['label' => 'Datenbanken', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'Traffic', 'value' => '200 GB'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'cPanel/Webmin',
|
||||||
|
'PHP 8.1',
|
||||||
|
'SSL-Zertifikat',
|
||||||
|
'E-Mail-Postfächer',
|
||||||
|
'MySQL Datenbanken',
|
||||||
|
'Backup-Service',
|
||||||
|
'Priority Support',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'enterprise' => [
|
||||||
|
'name' => 'Webhosting Enterprise',
|
||||||
|
'price' => '19,99',
|
||||||
|
'featured' => false,
|
||||||
|
'specs' => [
|
||||||
|
['label' => 'Webspace', 'value' => '100 GB'],
|
||||||
|
['label' => 'Domains', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'E-Mail-Postfächer', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'Datenbanken', 'value' => 'Unbegrenzt'],
|
||||||
|
['label' => 'Traffic', 'value' => '500 GB'],
|
||||||
|
],
|
||||||
|
'features' => [
|
||||||
|
'cPanel/Webmin',
|
||||||
|
'PHP 8.1',
|
||||||
|
'SSL-Zertifikat',
|
||||||
|
'E-Mail-Postfächer',
|
||||||
|
'MySQL Datenbanken',
|
||||||
|
'Backup-Service',
|
||||||
|
'Priority Support',
|
||||||
|
'Individuelle Konfiguration',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// HILFSFUNKTIONEN
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alle Produkte abrufen
|
||||||
|
*/
|
||||||
|
function getAllProducts() {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ein Produkt abrufen
|
||||||
|
*/
|
||||||
|
function getProduct($productId) {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS[$productId] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alle Pakete eines Produkts abrufen
|
||||||
|
*/
|
||||||
|
function getProductPackages($productId) {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS[$productId]['packages'] ?? [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ein bestimmtes Paket abrufen
|
||||||
|
*/
|
||||||
|
function getPackage($productId, $packageId) {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS[$productId]['packages'][$packageId] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Preis eines Pakets abrufen
|
||||||
|
*/
|
||||||
|
function getPackagePrice($productId, $packageId) {
|
||||||
|
$package = getPackage($productId, $packageId);
|
||||||
|
return $package['price'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Minimalen Preis eines Produkts abrufen
|
||||||
|
*/
|
||||||
|
function getMinPrice($productId) {
|
||||||
|
global $PRODUCTS;
|
||||||
|
return $PRODUCTS[$productId]['min_price'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Preis formatiert ausgeben
|
||||||
|
*/
|
||||||
|
function formatPrice($price, $withCurrency = true) {
|
||||||
|
return $withCurrency ? $price . '€' : $price;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generiert HTML für eine Paket-Karte
|
||||||
|
*/
|
||||||
|
function renderPackageCard($productId, $packageId, $package) {
|
||||||
|
$featuredClass = $package['featured'] ? ' featured' : '';
|
||||||
|
$featuredBadge = $package['featured'] ? '<div class="featured-badge">Beliebt</div>' : '';
|
||||||
|
|
||||||
|
$specsHtml = '';
|
||||||
|
foreach ($package['specs'] as $spec) {
|
||||||
|
$specsHtml .= sprintf(
|
||||||
|
'<div class="spec-item"><span class="spec-label">%s:</span><span class="spec-value">%s</span></div>',
|
||||||
|
htmlspecialchars($spec['label']),
|
||||||
|
htmlspecialchars($spec['value'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$featuresHtml = '';
|
||||||
|
foreach ($package['features'] as $feature) {
|
||||||
|
$featuresHtml .= sprintf('<div class="feature">✓ %s</div>', htmlspecialchars($feature));
|
||||||
|
}
|
||||||
|
|
||||||
|
return sprintf('
|
||||||
|
<div class="package-card glass-card%s">
|
||||||
|
%s
|
||||||
|
<div class="package-header">
|
||||||
|
<h3 class="package-name">%s</h3>
|
||||||
|
<div class="package-price">
|
||||||
|
<span class="price">%s€</span>
|
||||||
|
<span class="period">/Monat</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="package-specs">
|
||||||
|
%s
|
||||||
|
</div>
|
||||||
|
<div class="package-features">
|
||||||
|
%s
|
||||||
|
</div>
|
||||||
|
<a href="contact.php?package=%s-%s" class="btn btn-primary">Jetzt bestellen</a>
|
||||||
|
</div>',
|
||||||
|
$featuredClass,
|
||||||
|
$featuredBadge,
|
||||||
|
htmlspecialchars($package['name']),
|
||||||
|
$package['price'],
|
||||||
|
$specsHtml,
|
||||||
|
$featuresHtml,
|
||||||
|
$productId,
|
||||||
|
$packageId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generiert HTML für alle Pakete eines Produkts
|
||||||
|
*/
|
||||||
|
function renderAllPackages($productId) {
|
||||||
|
$packages = getProductPackages($productId);
|
||||||
|
$html = '';
|
||||||
|
foreach ($packages as $packageId => $package) {
|
||||||
|
$html .= renderPackageCard($productId, $packageId, $package);
|
||||||
|
}
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
?>
|
||||||
@@ -7,7 +7,8 @@
|
|||||||
"build:js": "node scripts/build.js --js-only",
|
"build:js": "node scripts/build.js --js-only",
|
||||||
"build:css": "node scripts/build.js --css-only",
|
"build:css": "node scripts/build.js --css-only",
|
||||||
"clean": "rm -rf dist",
|
"clean": "rm -rf dist",
|
||||||
"watch": "node scripts/watch.js"
|
"watch": "node scripts/watch.js",
|
||||||
|
"deploy": "node scripts/deploy.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"javascript-obfuscator": "^4.1.1",
|
"javascript-obfuscator": "^4.1.1",
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ const config = {
|
|||||||
phpFiles: [
|
phpFiles: [
|
||||||
'config/config.php',
|
'config/config.php',
|
||||||
'config/mail-config.php',
|
'config/mail-config.php',
|
||||||
|
'config/products-config.php',
|
||||||
'includes/header.php',
|
'includes/header.php',
|
||||||
'includes/footer.php',
|
'includes/footer.php',
|
||||||
'includes/functions.php'
|
'includes/functions.php'
|
||||||
|
|||||||
208
scripts/deploy.js
Normal file
208
scripts/deploy.js
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
/**
|
||||||
|
* Deploy-Script für HexaHost Backend
|
||||||
|
*
|
||||||
|
* Dieses Script:
|
||||||
|
* 1. Prüft ob wir auf develop sind
|
||||||
|
* 2. Führt den Build aus (npm run build)
|
||||||
|
* 3. Wechselt zu main
|
||||||
|
* 4. Kopiert die dist/ Dateien
|
||||||
|
* 5. Committed und pusht
|
||||||
|
* 6. Wechselt zurück zu develop
|
||||||
|
*/
|
||||||
|
|
||||||
|
const { execSync } = require('child_process');
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
// Farben für die Konsole
|
||||||
|
const colors = {
|
||||||
|
reset: '\x1b[0m',
|
||||||
|
green: '\x1b[32m',
|
||||||
|
red: '\x1b[31m',
|
||||||
|
yellow: '\x1b[33m',
|
||||||
|
blue: '\x1b[34m',
|
||||||
|
cyan: '\x1b[36m'
|
||||||
|
};
|
||||||
|
|
||||||
|
function log(message, color = 'reset') {
|
||||||
|
console.log(`${colors[color]}${message}${colors.reset}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function exec(command, options = {}) {
|
||||||
|
try {
|
||||||
|
return execSync(command, {
|
||||||
|
encoding: 'utf8',
|
||||||
|
stdio: options.silent ? 'pipe' : 'inherit',
|
||||||
|
...options
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
if (!options.ignoreError) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCurrentBranch() {
|
||||||
|
return exec('git branch --show-current', { silent: true }).trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
function hasUncommittedChanges() {
|
||||||
|
const status = exec('git status --porcelain', { silent: true });
|
||||||
|
return status && status.trim().length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function copyRecursive(src, dest) {
|
||||||
|
if (!fs.existsSync(src)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const stats = fs.statSync(src);
|
||||||
|
|
||||||
|
if (stats.isDirectory()) {
|
||||||
|
if (!fs.existsSync(dest)) {
|
||||||
|
fs.mkdirSync(dest, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
const files = fs.readdirSync(src);
|
||||||
|
for (const file of files) {
|
||||||
|
copyRecursive(
|
||||||
|
path.join(src, file),
|
||||||
|
path.join(dest, file)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fs.copyFileSync(src, dest);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function deploy() {
|
||||||
|
log('\n🚀 HexaHost Deploy Script\n', 'cyan');
|
||||||
|
log('=' .repeat(50), 'cyan');
|
||||||
|
|
||||||
|
const startBranch = getCurrentBranch();
|
||||||
|
|
||||||
|
// 1. Prüfen ob wir auf develop sind
|
||||||
|
log('\n📋 Schritt 1: Branch prüfen...', 'blue');
|
||||||
|
if (startBranch !== 'develop') {
|
||||||
|
log(`❌ Du bist auf '${startBranch}', nicht auf 'develop'!`, 'red');
|
||||||
|
log(' Bitte wechsle erst zu develop: git checkout develop', 'yellow');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
log('✅ Auf develop Branch', 'green');
|
||||||
|
|
||||||
|
// 2. Prüfen ob uncommitted changes existieren
|
||||||
|
log('\n📋 Schritt 2: Uncommitted Changes prüfen...', 'blue');
|
||||||
|
if (hasUncommittedChanges()) {
|
||||||
|
log('❌ Es gibt uncommitted changes!', 'red');
|
||||||
|
log(' Bitte erst committen oder stashen.', 'yellow');
|
||||||
|
exec('git status --short');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
log('✅ Keine uncommitted changes', 'green');
|
||||||
|
|
||||||
|
// 3. Build ausführen
|
||||||
|
log('\n📋 Schritt 3: Build ausführen...', 'blue');
|
||||||
|
try {
|
||||||
|
exec('npm run build');
|
||||||
|
log('✅ Build erfolgreich', 'green');
|
||||||
|
} catch (error) {
|
||||||
|
log('❌ Build fehlgeschlagen!', 'red');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Zu main wechseln
|
||||||
|
log('\n📋 Schritt 4: Zu main wechseln...', 'blue');
|
||||||
|
exec('git checkout main');
|
||||||
|
log('✅ Auf main gewechselt', 'green');
|
||||||
|
|
||||||
|
// 5. Produktionsdateien ins Root kopieren
|
||||||
|
log('\n📋 Schritt 5: Produktionsdateien aktualisieren...', 'blue');
|
||||||
|
|
||||||
|
// Ordner die aus dist/ ins Root kopiert werden
|
||||||
|
const prodFolders = ['assets', 'config', 'includes'];
|
||||||
|
|
||||||
|
// Alte Ordner im Root löschen
|
||||||
|
for (const folder of prodFolders) {
|
||||||
|
const folderPath = path.join(process.cwd(), folder);
|
||||||
|
if (fs.existsSync(folderPath)) {
|
||||||
|
fs.rmSync(folderPath, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dateien aus develop/dist/ ins Root holen
|
||||||
|
for (const folder of prodFolders) {
|
||||||
|
exec(`git checkout develop -- dist/${folder}/`, { silent: true, ignoreError: true });
|
||||||
|
|
||||||
|
// Von dist/ ins Root verschieben
|
||||||
|
const srcPath = path.join(process.cwd(), 'dist', folder);
|
||||||
|
const destPath = path.join(process.cwd(), folder);
|
||||||
|
if (fs.existsSync(srcPath)) {
|
||||||
|
copyRecursive(srcPath, destPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// dist/ Ordner aufräumen (falls vorhanden)
|
||||||
|
const distPath = path.join(process.cwd(), 'dist');
|
||||||
|
if (fs.existsSync(distPath)) {
|
||||||
|
fs.rmSync(distPath, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
log('✅ Produktionsdateien aktualisiert', 'green');
|
||||||
|
|
||||||
|
// 6. Prüfen ob es Änderungen gibt
|
||||||
|
log('\n📋 Schritt 6: Änderungen prüfen...', 'blue');
|
||||||
|
if (!hasUncommittedChanges()) {
|
||||||
|
log('ℹ️ Keine Änderungen - nichts zu deployen', 'yellow');
|
||||||
|
exec('git checkout develop');
|
||||||
|
log('\n✅ Zurück auf develop', 'green');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 7. Commit erstellen
|
||||||
|
log('\n📋 Schritt 7: Commit erstellen...', 'blue');
|
||||||
|
const timestamp = new Date().toISOString().split('T')[0];
|
||||||
|
const commitMessage = `deploy: Produktions-Update ${timestamp}`;
|
||||||
|
|
||||||
|
exec('git add assets/ config/ includes/');
|
||||||
|
exec(`git commit -m "${commitMessage}"`);
|
||||||
|
log(`✅ Commit erstellt: "${commitMessage}"`, 'green');
|
||||||
|
|
||||||
|
// 8. Push zu origin
|
||||||
|
log('\n📋 Schritt 8: Push zu origin...', 'blue');
|
||||||
|
try {
|
||||||
|
exec('git push origin main');
|
||||||
|
log('✅ Push erfolgreich', 'green');
|
||||||
|
} catch (error) {
|
||||||
|
log('⚠️ Push fehlgeschlagen - manuell pushen mit: git push origin main', 'yellow');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 9. Zurück zu develop
|
||||||
|
log('\n📋 Schritt 9: Zurück zu develop...', 'blue');
|
||||||
|
exec('git checkout develop');
|
||||||
|
log('✅ Zurück auf develop', 'green');
|
||||||
|
|
||||||
|
// Fertig!
|
||||||
|
log('\n' + '=' .repeat(50), 'cyan');
|
||||||
|
log('🎉 Deploy erfolgreich abgeschlossen!', 'green');
|
||||||
|
log('=' .repeat(50) + '\n', 'cyan');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Script starten
|
||||||
|
deploy().catch(error => {
|
||||||
|
log(`\n❌ Fehler: ${error.message}`, 'red');
|
||||||
|
|
||||||
|
// Versuche zurück zu develop zu wechseln
|
||||||
|
try {
|
||||||
|
const currentBranch = getCurrentBranch();
|
||||||
|
if (currentBranch !== 'develop') {
|
||||||
|
log('🔄 Versuche zurück zu develop zu wechseln...', 'yellow');
|
||||||
|
exec('git checkout develop', { ignoreError: true });
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Ignorieren
|
||||||
|
}
|
||||||
|
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user