Compare commits
582 Commits
zahlungsei
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
4b9bc8754b | |
|
|
980b4d3056 | |
|
|
602bd21f99 | |
|
|
4e8c12b631 | |
|
|
aff20577d0 | |
|
|
212789faa9 | |
|
|
3aba261ba3 | |
|
|
e45e783d39 | |
|
|
962529cbc9 | |
|
|
93b1f8d61a | |
|
|
a05d497774 | |
|
|
7d4138dd18 | |
|
|
d0f53eb1f4 | |
|
|
d5de8365ee | |
|
|
12cf3f7767 | |
|
|
b8f1efbe12 | |
|
|
5a040d69da | |
|
|
d69b2fb342 | |
|
|
70b7a63694 | |
|
|
50e232cae7 | |
|
|
0f06a5838d | |
|
|
e297ff8669 | |
|
|
cffe00216c | |
|
|
051a0805b9 | |
|
|
3d0210dc6d | |
|
|
c99958525e | |
|
|
308c2aefa8 | |
|
|
925b8bf56e | |
|
|
5adc7458b2 | |
|
|
e7af1e1164 | |
|
|
29f8fe38ca | |
|
|
0ef8c498a2 | |
|
|
cf266fb4aa | |
|
|
8b8474e6eb | |
|
|
8b43c9c08d | |
|
|
b39a7e5adb | |
|
|
9f633a8fdd | |
|
|
4d956f1e38 | |
|
|
ca4825e84e | |
|
|
1b952e3021 | |
|
|
bce18dcece | |
|
|
9fc07ca3df | |
|
|
345bbc5a9d | |
|
|
dd713c2286 | |
|
|
c89c36e596 | |
|
|
4d5b46e903 | |
|
|
7b1d12d59b | |
|
|
c6ee9c0faf | |
|
|
324c7dbf17 | |
|
|
4e5011c5f5 | |
|
|
885cf37d29 | |
|
|
e348560cf7 | |
|
|
c3cbf0d214 | |
|
|
c5cf7bcba4 | |
|
|
ca4e320085 | |
|
|
8dc86fdddf | |
|
|
4a5a723a15 | |
|
|
0360d5657f | |
|
|
2efc34c280 | |
|
|
9d543e6635 | |
|
|
2ff5c007c1 | |
|
|
4acb921b51 | |
|
|
40734ccd66 | |
|
|
15f4ef55f2 | |
|
|
2b29457763 | |
|
|
2dcc5b664e | |
|
|
e8c7908d29 | |
|
|
63b85f213a | |
|
|
f84e7af78a | |
|
|
24905d3674 | |
|
|
4570cbc342 | |
|
|
08d97478d1 | |
|
|
8c1343dff1 | |
|
|
a32b79e2a8 | |
|
|
00333f8762 | |
|
|
ce6ffb0580 | |
|
|
e7911e973b | |
|
|
dd8421eac6 | |
|
|
3c57df65e6 | |
|
|
169a5c34c5 | |
|
|
567976ecda | |
|
|
f6129a6ef7 | |
|
|
5948b728d2 | |
|
|
cb49810251 | |
|
|
5abde88596 | |
|
|
c0de40ac86 | |
|
|
fdad52f168 | |
|
|
1baf957891 | |
|
|
b9bec98855 | |
|
|
f148fbdf08 | |
|
|
602bc38585 | |
|
|
500e8b5838 | |
|
|
2cd60b0bd8 | |
|
|
3fe8fcd8aa | |
|
|
63d6f2e7d4 | |
|
|
c764a387b4 | |
|
|
a1affd18d8 | |
|
|
6c1f40aab9 | |
|
|
346ff4cc4a | |
|
|
cfbecd780b | |
|
|
3c4a4a8754 | |
|
|
f1a118af6b | |
|
|
4c14f266e9 | |
|
|
3a023592e9 | |
|
|
6a6aab4304 | |
|
|
e5393bb7de | |
|
|
153c9652ee | |
|
|
2e3a7e7b73 | |
|
|
c582cc1423 | |
|
|
580aef2bf6 | |
|
|
0cde94e672 | |
|
|
c424d79fd6 | |
|
|
eae4644921 | |
|
|
054bb882da | |
|
|
0806785d91 | |
|
|
fe273bb832 | |
|
|
7029295cb3 | |
|
|
7435a0605b | |
|
|
39409b0358 | |
|
|
2b95a3891a | |
|
|
f7c64bec79 | |
|
|
ae377e452f | |
|
|
38d0ac4c49 | |
|
|
b18e8ff444 | |
|
|
dc5de062b8 | |
|
|
afd60b382b | |
|
|
302bfee669 | |
|
|
8f9ed4d7ae | |
|
|
bef8e02217 | |
|
|
53b228b06c | |
|
|
fa9b572e3e | |
|
|
8664e16c55 | |
|
|
57f0e2f627 | |
|
|
042a64589b | |
|
|
8ba116ccf1 | |
|
|
33aa53b7c5 | |
|
|
aabdc74af6 | |
|
|
6df9ba2d00 | |
|
|
3bc0eafc51 | |
|
|
90f38c9496 | |
|
|
3c8588562b | |
|
|
3e2b5f6ee8 | |
|
|
7ffb9a86a5 | |
|
|
5816dedbc0 | |
|
|
12f5ca8211 | |
|
|
8b9969176c | |
|
|
a6f742ccc0 | |
|
|
2129627a5b | |
|
|
bbf8b071c0 | |
|
|
626c75bbc1 | |
|
|
22e411a6cc | |
|
|
d7db78489c | |
|
|
088ad4555c | |
|
|
2cb1f91a43 | |
|
|
dff342276e | |
|
|
c76cb43bac | |
|
|
72684cb092 | |
|
|
7624e01de4 | |
|
|
9ebd5d2b2b | |
|
|
bf3dad7e83 | |
|
|
b7f8c7b359 | |
|
|
54fe339c65 | |
|
|
7d0a5a0eee | |
|
|
7cfb87c2c5 | |
|
|
2ae5e9f44a | |
|
|
c106282b13 | |
|
|
e737d69a77 | |
|
|
2f646a7715 | |
|
|
c67d91a7dd | |
|
|
3e69b8d7e0 | |
|
|
77092171c3 | |
|
|
a03d28ac69 | |
|
|
f55f801cee | |
|
|
1fe0aea620 | |
|
|
e474014b8c | |
|
|
3e70af8466 | |
|
|
662410fdc8 | |
|
|
7dcaae7fbb | |
|
|
18397a03c8 | |
|
|
504f0beb54 | |
|
|
ecf986d33b | |
|
|
eb00034a79 | |
|
|
a5be2e984a | |
|
|
fb32cda643 | |
|
|
ca73f3dda5 | |
|
|
4488cf8688 | |
|
|
ec7dc7b8a6 | |
|
|
6e857e6567 | |
|
|
a35ab21f7c | |
|
|
f794b4db74 | |
|
|
e899b1c389 | |
|
|
b171dd7760 | |
|
|
4f7eb4049b | |
|
|
b838b63258 | |
|
|
5e1359f770 | |
|
|
1bb701322b | |
|
|
1e55ca1b3d | |
|
|
b34ba86421 | |
|
|
b2bf2f14f2 | |
|
|
bdb05c747a | |
|
|
b613a99791 | |
|
|
1dba7e9d7e | |
|
|
60e21956ad | |
|
|
545a39bbdc | |
|
|
5ed516f9da | |
|
|
b759e2accd | |
|
|
5d1201637f | |
|
|
c6dd3fdeff | |
|
|
4dd8b01ea9 | |
|
|
150381a20f | |
|
|
76c770aba3 | |
|
|
c9aee26df7 | |
|
|
91c2dc88ba | |
|
|
be222cc581 | |
|
|
a9f3292f8f | |
|
|
ac723e9fda | |
|
|
5408f197fd | |
|
|
c0a9156f0e | |
|
|
fd0a5a5d4c | |
|
|
1daf876976 | |
|
|
7a29151bdd | |
|
|
623b041a5f | |
|
|
6242024451 | |
|
|
0262c31e93 | |
|
|
5557c54fd6 | |
|
|
7df897d9d7 | |
|
|
1a94af6b0b | |
|
|
fa4125d63b | |
|
|
ac0048c788 | |
|
|
f430b7f5ac | |
|
|
83e739d378 | |
|
|
a32c201a91 | |
|
|
cb2b75a3ca | |
|
|
1f27f9a5f5 | |
|
|
81e2cdb222 | |
|
|
5b49171a74 | |
|
|
869c888947 | |
|
|
322ca715eb | |
|
|
ab4e9f001e | |
|
|
51b70aed0d | |
|
|
08579804a8 | |
|
|
64241842f6 | |
|
|
f5c61ca6eb | |
|
|
aa32bd1276 | |
|
|
e6960f0030 | |
|
|
b02da95c2f | |
|
|
9994f8c18d | |
|
|
ce5f359a75 | |
|
|
57e398e7d4 | |
|
|
ca5e5c52a1 | |
|
|
6f5272717f | |
|
|
2eabd85b91 | |
|
|
1be7ba66ee | |
|
|
56e743334a | |
|
|
e125a29fa9 | |
|
|
63a99b1a6e | |
|
|
1ea3d3a175 | |
|
|
fcb9b0aeb7 | |
|
|
53bb9fcdf9 | |
|
|
2b2f84a020 | |
|
|
f3587501f2 | |
|
|
4b40c27c84 | |
|
|
265d815534 | |
|
|
7c17b2aed9 | |
|
|
174909c178 | |
|
|
b8cfa9efbb | |
|
|
5da0490260 | |
|
|
9fbd0eb85a | |
|
|
1c1c7034f1 | |
|
|
2c7f113d6b | |
|
|
1f6caa8632 | |
|
|
73725a31bb | |
|
|
06686a6020 | |
|
|
1e04647dae | |
|
|
62cca6fe3c | |
|
|
bf10c0d807 | |
|
|
d9ff872a98 | |
|
|
05699986eb | |
|
|
dcedcec0f2 | |
|
|
6fc74f1bf3 | |
|
|
33b5c1e171 | |
|
|
3f7cf88d99 | |
|
|
1ebaa24473 | |
|
|
5ca3a7297b | |
|
|
88e1e2ebc2 | |
|
|
5a4c73d9b8 | |
|
|
d294daa08b | |
|
|
75bd00770c | |
|
|
674c7b9958 | |
|
|
60611a2d03 | |
|
|
2e70e1f2dc | |
|
|
7548c601f5 | |
|
|
ac8407faed | |
|
|
14e727500e | |
|
|
011f2915c1 | |
|
|
38cf7c3bc2 | |
|
|
209364f8c3 | |
|
|
fea7a173dc | |
|
|
33d2ca9497 | |
|
|
9002a66085 | |
|
|
c8426bcbc0 | |
|
|
25cf7de75b | |
|
|
2d938e96a0 | |
|
|
4ffeafa5ac | |
|
|
2533e4ca4f | |
|
|
a144e2183b | |
|
|
30ce445ac1 | |
|
|
51d7ad7f17 | |
|
|
f6d71cbbc8 | |
|
|
1bf58aa8ba | |
|
|
63dbedc1a8 | |
|
|
cd3c0f2113 | |
|
|
b497d65d81 | |
|
|
87a884bd8a | |
|
|
3efbcb82d9 | |
|
|
f0f468c94e | |
|
|
b82d17d6f4 | |
|
|
9db337ce95 | |
|
|
62f6df1aeb | |
|
|
828c1b1a75 | |
|
|
7de88ca3b5 | |
|
|
5794301826 | |
|
|
1a28b5d75b | |
|
|
df292c9c02 | |
|
|
f0a24b7e5b | |
|
|
50df55e35e | |
|
|
4720cc8e94 | |
|
|
64d6b90312 | |
|
|
17bdb1c5e1 | |
|
|
c1d42f6ceb | |
|
|
c4eaaa966a | |
|
|
a43ac720b6 | |
|
|
170a33687f | |
|
|
ea6a6a5dda | |
|
|
69172672b2 | |
|
|
667b70eaf5 | |
|
|
44af8f3b3d | |
|
|
82fc367405 | |
|
|
828af9ab50 | |
|
|
e79f2839e2 | |
|
|
7aab51a390 | |
|
|
3dfba163df | |
|
|
4a4b1f8320 | |
|
|
03f0f7217b | |
|
|
c6a4cf0d23 | |
|
|
92f016d06b | |
|
|
222b0ac239 | |
|
|
1e59009862 | |
|
|
76740aee02 | |
|
|
06bc38e66a | |
|
|
ad4599e381 | |
|
|
b1349afb6b | |
|
|
820dc9fec6 | |
|
|
46f9e0728d | |
|
|
8bdedcb72f | |
|
|
ebd50b4f28 | |
|
|
85094921a0 | |
|
|
d97f41e293 | |
|
|
b701a880a4 | |
|
|
7ee2bfae5b | |
|
|
2b573268fa | |
|
|
e79e2e24d2 | |
|
|
03f51a548a | |
|
|
b6c23399c6 | |
|
|
689fdb0490 | |
|
|
c223e7c956 | |
|
|
a15d7b0b41 | |
|
|
ebc7034164 | |
|
|
3715c2f205 | |
|
|
95d26d5c6e | |
|
|
5bc7a64c8c | |
|
|
b7153c423c | |
|
|
1637bf965a | |
|
|
9a6ed1ae75 | |
|
|
b6b856fd11 | |
|
|
c361a82583 | |
|
|
aa93070185 | |
|
|
7a83c9fd29 | |
|
|
09039f9d2a | |
|
|
49dfd255e4 | |
|
|
791a12b731 | |
|
|
62e16cfcc1 | |
|
|
23dc74cd08 | |
|
|
18f2785abd | |
|
|
691ad237b5 | |
|
|
71ef13f41d | |
|
|
c220639e82 | |
|
|
98bbdec8d3 | |
|
|
51552e7530 | |
|
|
696e9efc76 | |
|
|
34def013f7 | |
|
|
6a566a99af | |
|
|
e356051f5a | |
|
|
1f52278758 | |
|
|
ab91715c20 | |
|
|
ecd86d120a | |
|
|
8dd78dfa55 | |
|
|
71883d34ae | |
|
|
73dbbb061a | |
|
|
5638f18770 | |
|
|
8f76574d00 | |
|
|
d7d4de7a32 | |
|
|
f5b326682c | |
|
|
f02be869d0 | |
|
|
7623f2fb6a | |
|
|
3f135f6852 | |
|
|
28fc3f6bd3 | |
|
|
2d0e9cd8f1 | |
|
|
75aaf5e2af | |
|
|
e9cec0ce30 | |
|
|
226a2dffdf | |
|
|
44781b52bb | |
|
|
245e2d1545 | |
|
|
e2fc1e15e8 | |
|
|
49c934ede4 | |
|
|
61047af440 | |
|
|
cb8b2487d7 | |
|
|
2ffee66e00 | |
|
|
37a6fecc36 | |
|
|
cd73a58ece | |
|
|
f37ef6e591 | |
|
|
8b183c88a1 | |
|
|
62de5cdacf | |
|
|
d23c0f09dd | |
|
|
d35a4f41b9 | |
|
|
aae29d6281 | |
|
|
d846a251ca | |
|
|
c00ae0eb5b | |
|
|
05714cfd21 | |
|
|
4be2d5af23 | |
|
|
1e371e7377 | |
|
|
2397fda1e6 | |
|
|
ad3207d67c | |
|
|
e0a049608e | |
|
|
0572295637 | |
|
|
770a36b183 | |
|
|
826923fd51 | |
|
|
9657e16797 | |
|
|
9defde81ae | |
|
|
f495964d2b | |
|
|
ef8b79ff19 | |
|
|
aff5eef945 | |
|
|
3d8c7a13e3 | |
|
|
6bb54be5a3 | |
|
|
9a45653eaf | |
|
|
9daaf58281 | |
|
|
d84b20fafe | |
|
|
0eb3ba50f2 | |
|
|
f0bebba1ff | |
|
|
36322b0171 | |
|
|
aafcb4130f | |
|
|
406811872c | |
|
|
88eb1757b2 | |
|
|
b14265b49d | |
|
|
575ab86157 | |
|
|
3fe2c7a5d9 | |
|
|
da0b7d2720 | |
|
|
4eac5fbbdc | |
|
|
bcf2544735 | |
|
|
100024391d | |
|
|
1af809954c | |
|
|
0e3afa437b | |
|
|
d705d1a3eb | |
|
|
00dc3414a2 | |
|
|
5539c9849c | |
|
|
ce11caac12 | |
|
|
bb3a68042d | |
|
|
f8bfe19f1d | |
|
|
d89c23ad0e | |
|
|
cb3191393a | |
|
|
0b4be37433 | |
|
|
9a721758a9 | |
|
|
424d77a795 | |
|
|
357497f10f | |
|
|
f9550ca18b | |
|
|
fe7d4332c8 | |
|
|
99eed95d85 | |
|
|
c9a24e7f75 | |
|
|
f535679263 | |
|
|
613d45b1cc | |
|
|
1fdd6dbf95 | |
|
|
cad0103b7f | |
|
|
57d0592a9a | |
|
|
f76400e248 | |
|
|
3c7e189acb | |
|
|
c006c1c474 | |
|
|
2844c1cc67 | |
|
|
14bf992b2b | |
|
|
78e56ab160 | |
|
|
ab65feb455 | |
|
|
93e3b01a25 | |
|
|
5b74049f5c | |
|
|
aa3dea0277 | |
|
|
67d7a63898 | |
|
|
2acc8aceb9 | |
|
|
5bac7c479c | |
|
|
781fbc2600 | |
|
|
1f661b9a2b | |
|
|
45164166f5 | |
|
|
d94c05383a | |
|
|
135017158c | |
|
|
71861079e3 | |
|
|
66d248d9e5 | |
|
|
474970e358 | |
|
|
6e8f715f66 | |
|
|
0648e57b63 | |
|
|
bb9fd68613 | |
|
|
143e4e96bd | |
|
|
2cfe710c9a | |
|
|
0afc12e718 | |
|
|
529587c0f5 | |
|
|
35f6532520 | |
|
|
84eaf1b495 | |
|
|
c519d8030a | |
|
|
0848148b9e | |
|
|
6c9d8b7594 | |
|
|
51f9929228 | |
|
|
508ee0ae8e | |
|
|
ca9b48cb58 | |
|
|
817dd802aa | |
|
|
6a5679ba23 | |
|
|
724c57d309 | |
|
|
5ccd0edbb9 | |
|
|
0ad4b9600c | |
|
|
a731d0f5df | |
|
|
3ea5c0e478 | |
|
|
68554f91c1 | |
|
|
d44fa8ddb0 | |
|
|
7a530e1274 | |
|
|
e3b7634581 | |
|
|
87e941516e | |
|
|
e5637b226e | |
|
|
08262cce5c | |
|
|
ce268dca0e | |
|
|
77393c186e | |
|
|
8159ae4346 | |
|
|
264bc56365 | |
|
|
e4773da6f0 | |
|
|
c248cb16fb | |
|
|
23f390a74f | |
|
|
8cc64aee19 | |
|
|
36501a5013 | |
|
|
c1c963624d | |
|
|
a041c6a82c | |
|
|
4815e61883 | |
|
|
1a343b4b55 | |
|
|
b70676f4a0 | |
|
|
6df7be74b7 | |
|
|
a3c253a13b | |
|
|
b5926ee039 | |
|
|
9b62b7c247 | |
|
|
d41745ceda | |
|
|
8c1eb6c3cc | |
|
|
d6dcc9f4c6 | |
|
|
ae261d7a47 | |
|
|
c443496462 | |
|
|
5d1319b419 | |
|
|
d31c7a8961 | |
|
|
1351def3bd | |
|
|
cdfb234393 | |
|
|
483a002014 | |
|
|
e25ffdd1f1 | |
|
|
84483f0444 | |
|
|
1c955a5bca | |
|
|
6dad06e07d | |
|
|
9da2e33077 | |
|
|
9087f4f01d | |
|
|
e82685d280 | |
|
|
e2869af239 | |
|
|
beb004f374 | |
|
|
e6baa612a5 | |
|
|
c641d41219 | |
|
|
c37f0d3847 | |
|
|
76603076cd | |
|
|
461b262e16 | |
|
|
8ad45ed723 | |
|
|
d676a1b09a | |
|
|
1c7e84d8f2 | |
|
|
c5b6f01f9c | |
|
|
6a2a16c0a6 | |
|
|
1ddee4350c | |
|
|
cd93d643f8 |
|
|
@ -1,5 +1,5 @@
|
||||||
conf/user.inc.php
|
conf/user.inc.php
|
||||||
conf/user_defined.php
|
conf/user_defined.php
|
||||||
userdata/cronjobkey.txt
|
userdata
|
||||||
userdata/tmp/
|
|
||||||
www/cache/
|
www/cache/
|
||||||
|
www/themes/new/css/custom.css
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated file from class.acl.php
|
||||||
|
# For detection of htaccess functionality
|
||||||
|
SetEnv OPENXE_HTACCESS on
|
||||||
|
# Disable directory browsing
|
||||||
|
Options -Indexes
|
||||||
|
# Set default page to index.php
|
||||||
|
DirectoryIndex "index.php"
|
||||||
|
# Deny general access
|
||||||
|
Order deny,allow
|
||||||
|
<FilesMatch ".">
|
||||||
|
Order Allow,Deny
|
||||||
|
Deny from all
|
||||||
|
</FilesMatch>
|
||||||
|
# Allow index.php
|
||||||
|
<Files "index.php">
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</Files>
|
||||||
|
# end
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: OpenXE
|
||||||
|
Source: https://openxe.org
|
||||||
653
LICENSE.md
653
LICENSE.md
|
|
@ -1,654 +1,5 @@
|
||||||
GNU Affero General Public License
|
# THE CONTENT OF THIS FILE HAS BEEN MOVED TO THE [LICENSES](LICENSES) SUBFOLDER
|
||||||
=================================
|
# SEE [README](README.md) AND [LICENSES](LICENSES) FOLDER FOR MORE INFORMATION
|
||||||
|
|
||||||
_Version 3, 19 November 2007_
|
|
||||||
_Copyright © 2007 Free Software Foundation, Inc. <<http://fsf.org/>>_
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
## Preamble
|
|
||||||
|
|
||||||
The GNU Affero General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works, specifically designed to ensure
|
|
||||||
cooperation with the community in the case of network server software.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
our General Public Licenses are intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
Developers that use our General Public Licenses protect your rights
|
|
||||||
with two steps: **(1)** assert copyright on the software, and **(2)** offer
|
|
||||||
you this License which gives you legal permission to copy, distribute
|
|
||||||
and/or modify the software.
|
|
||||||
|
|
||||||
A secondary benefit of defending all users' freedom is that
|
|
||||||
improvements made in alternate versions of the program, if they
|
|
||||||
receive widespread use, become available for other developers to
|
|
||||||
incorporate. Many developers of free software are heartened and
|
|
||||||
encouraged by the resulting cooperation. However, in the case of
|
|
||||||
software used on network servers, this result may fail to come about.
|
|
||||||
The GNU General Public License permits making a modified version and
|
|
||||||
letting the public access it on a server without ever releasing its
|
|
||||||
source code to the public.
|
|
||||||
|
|
||||||
The GNU Affero General Public License is designed specifically to
|
|
||||||
ensure that, in such cases, the modified source code becomes available
|
|
||||||
to the community. It requires the operator of a network server to
|
|
||||||
provide the source code of the modified version running there to the
|
|
||||||
users of that server. Therefore, public use of a modified version, on
|
|
||||||
a publicly accessible server, gives the public access to the source
|
|
||||||
code of the modified version.
|
|
||||||
|
|
||||||
An older license, called the Affero General Public License and
|
|
||||||
published by Affero, was designed to accomplish similar goals. This is
|
|
||||||
a different license, not a version of the Affero GPL, but Affero has
|
|
||||||
released a new version of the Affero GPL which permits relicensing under
|
|
||||||
this license.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
## TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
### 0. Definitions
|
|
||||||
|
|
||||||
“This License” refers to version 3 of the GNU Affero General Public License.
|
|
||||||
|
|
||||||
“Copyright” also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
“The Program” refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as “you”. “Licensees” and
|
|
||||||
“recipients” may be individuals or organizations.
|
|
||||||
|
|
||||||
To “modify” a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a “modified version” of the
|
|
||||||
earlier work or a work “based on” the earlier work.
|
|
||||||
|
|
||||||
A “covered work” means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To “propagate” a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To “convey” a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays “Appropriate Legal Notices”
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that **(1)** displays an appropriate copyright notice, and **(2)**
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
### 1. Source Code
|
|
||||||
|
|
||||||
The “source code” for a work means the preferred form of the work
|
|
||||||
for making modifications to it. “Object code” means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A “Standard Interface” means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The “System Libraries” of an executable work include anything, other
|
|
||||||
than the work as a whole, that **(a)** is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and **(b)** serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
“Major Component”, in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The “Corresponding Source” for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
### 2. Basic Permissions
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
### 4. Conveying Verbatim Copies
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
### 5. Conveying Modified Source Versions
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
* **a)** The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
* **b)** The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section 7.
|
|
||||||
This requirement modifies the requirement in section 4 to
|
|
||||||
“keep intact all notices”.
|
|
||||||
* **c)** You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
* **d)** If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
“aggregate” if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
### 6. Conveying Non-Source Forms
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
* **a)** Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
* **b)** Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either **(1)** a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or **(2)** access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
* **c)** Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
* **d)** Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
* **e)** Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A “User Product” is either **(1)** a “consumer product”, which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or **(2)** anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, “normally used” refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
“Installation Information” for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
### 7. Additional Terms
|
|
||||||
|
|
||||||
“Additional permissions” are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
* **a)** Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
* **b)** Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
* **c)** Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
* **d)** Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
* **e)** Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
* **f)** Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered “further
|
|
||||||
restrictions” within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
### 8. Termination
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated **(a)**
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and **(b)** permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
### 9. Acceptance Not Required for Having Copies
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
### 10. Automatic Licensing of Downstream Recipients
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An “entity transaction” is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
### 11. Patents
|
|
||||||
|
|
||||||
A “contributor” is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's “contributor version”.
|
|
||||||
|
|
||||||
A contributor's “essential patent claims” are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, “control” includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a “patent license” is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To “grant” such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either **(1)** cause the Corresponding Source to be so
|
|
||||||
available, or **(2)** arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or **(3)** arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. “Knowingly relying” means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is “discriminatory” if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license **(a)** in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or **(b)** primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
### 12. No Surrender of Others' Freedom
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
### 13. Remote Network Interaction; Use with the GNU General Public License
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, if you modify the
|
|
||||||
Program, your modified version must prominently offer all users
|
|
||||||
interacting with it remotely through a computer network (if your version
|
|
||||||
supports such interaction) an opportunity to receive the Corresponding
|
|
||||||
Source of your version by providing access to the Corresponding Source
|
|
||||||
from a network server at no charge, through some standard or customary
|
|
||||||
means of facilitating copying of software. This Corresponding Source
|
|
||||||
shall include the Corresponding Source for any work covered by version 3
|
|
||||||
of the GNU General Public License that is incorporated pursuant to the
|
|
||||||
following paragraph.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the work with which it is combined will remain governed by version
|
|
||||||
3 of the GNU General Public License.
|
|
||||||
|
|
||||||
### 14. Revised Versions of this License
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU Affero General Public License from time to time. Such new versions
|
|
||||||
will be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU Affero General
|
|
||||||
Public License “or any later version” applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU Affero General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU Affero General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
### 15. Disclaimer of Warranty
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
### 16. Limitation of Liability
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
### 17. Interpretation of Sections 15 and 16
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
_END OF TERMS AND CONDITIONS_
|
|
||||||
|
|
||||||
## How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the “copyright” line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If your software can interact with users remotely through a computer
|
|
||||||
network, you should also make sure that it provides a way for users to
|
|
||||||
get its source. For example, if your program is a web application, its
|
|
||||||
interface could display a “Source” link that leads users to an archive
|
|
||||||
of the code. There are many ways you could offer source, and different
|
|
||||||
solutions will be better for different programs; see section 13 for the
|
|
||||||
specific requirements.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a “copyright disclaimer” for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
|
||||||
<<http://www.gnu.org/licenses/>>.
|
|
||||||
|
|
||||||
|
|
||||||
## Plugins/Bibliotheken
|
## Plugins/Bibliotheken
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,660 @@
|
||||||
|
### GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
|
<https://fsf.org/>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this
|
||||||
|
license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
### Preamble
|
||||||
|
|
||||||
|
The GNU Affero General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works, specifically designed to ensure
|
||||||
|
cooperation with the community in the case of network server software.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
our General Public Licenses are intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains
|
||||||
|
free software for all its users.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
Developers that use our General Public Licenses protect your rights
|
||||||
|
with two steps: (1) assert copyright on the software, and (2) offer
|
||||||
|
you this License which gives you legal permission to copy, distribute
|
||||||
|
and/or modify the software.
|
||||||
|
|
||||||
|
A secondary benefit of defending all users' freedom is that
|
||||||
|
improvements made in alternate versions of the program, if they
|
||||||
|
receive widespread use, become available for other developers to
|
||||||
|
incorporate. Many developers of free software are heartened and
|
||||||
|
encouraged by the resulting cooperation. However, in the case of
|
||||||
|
software used on network servers, this result may fail to come about.
|
||||||
|
The GNU General Public License permits making a modified version and
|
||||||
|
letting the public access it on a server without ever releasing its
|
||||||
|
source code to the public.
|
||||||
|
|
||||||
|
The GNU Affero General Public License is designed specifically to
|
||||||
|
ensure that, in such cases, the modified source code becomes available
|
||||||
|
to the community. It requires the operator of a network server to
|
||||||
|
provide the source code of the modified version running there to the
|
||||||
|
users of that server. Therefore, public use of a modified version, on
|
||||||
|
a publicly accessible server, gives the public access to the source
|
||||||
|
code of the modified version.
|
||||||
|
|
||||||
|
An older license, called the Affero General Public License and
|
||||||
|
published by Affero, was designed to accomplish similar goals. This is
|
||||||
|
a different license, not a version of the Affero GPL, but Affero has
|
||||||
|
released a new version of the Affero GPL which permits relicensing
|
||||||
|
under this license.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
### TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
#### 0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU Affero General Public
|
||||||
|
License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds
|
||||||
|
of works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of
|
||||||
|
an exact copy. The resulting work is called a "modified version" of
|
||||||
|
the earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user
|
||||||
|
through a computer network, with no transfer of a copy, is not
|
||||||
|
conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices" to
|
||||||
|
the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
#### 1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. "Object code" means any non-source form of
|
||||||
|
a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users can
|
||||||
|
regenerate automatically from other parts of the Corresponding Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that same
|
||||||
|
work.
|
||||||
|
|
||||||
|
#### 2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not convey,
|
||||||
|
without conditions so long as your license otherwise remains in force.
|
||||||
|
You may convey covered works to others for the sole purpose of having
|
||||||
|
them make modifications exclusively for you, or provide you with
|
||||||
|
facilities for running those works, provided that you comply with the
|
||||||
|
terms of this License in conveying all material for which you do not
|
||||||
|
control copyright. Those thus making or running the covered works for
|
||||||
|
you must do so exclusively on your behalf, under your direction and
|
||||||
|
control, on terms that prohibit them from making any copies of your
|
||||||
|
copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under the
|
||||||
|
conditions stated below. Sublicensing is not allowed; section 10 makes
|
||||||
|
it unnecessary.
|
||||||
|
|
||||||
|
#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such
|
||||||
|
circumvention is effected by exercising rights under this License with
|
||||||
|
respect to the covered work, and you disclaim any intention to limit
|
||||||
|
operation or modification of the work as a means of enforcing, against
|
||||||
|
the work's users, your or third parties' legal rights to forbid
|
||||||
|
circumvention of technological measures.
|
||||||
|
|
||||||
|
#### 4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
#### 5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these
|
||||||
|
conditions:
|
||||||
|
|
||||||
|
- a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
- b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under
|
||||||
|
section 7. This requirement modifies the requirement in section 4
|
||||||
|
to "keep intact all notices".
|
||||||
|
- c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
- d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
#### 6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms of
|
||||||
|
sections 4 and 5, provided that you also convey the machine-readable
|
||||||
|
Corresponding Source under the terms of this License, in one of these
|
||||||
|
ways:
|
||||||
|
|
||||||
|
- a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
- b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the Corresponding
|
||||||
|
Source from a network server at no charge.
|
||||||
|
- c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
- d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
- e) Convey the object code using peer-to-peer transmission,
|
||||||
|
provided you inform other peers where the object code and
|
||||||
|
Corresponding Source of the work are being offered to the general
|
||||||
|
public at no charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal,
|
||||||
|
family, or household purposes, or (2) anything designed or sold for
|
||||||
|
incorporation into a dwelling. In determining whether a product is a
|
||||||
|
consumer product, doubtful cases shall be resolved in favor of
|
||||||
|
coverage. For a particular product received by a particular user,
|
||||||
|
"normally used" refers to a typical or common use of that class of
|
||||||
|
product, regardless of the status of the particular user or of the way
|
||||||
|
in which the particular user actually uses, or expects or is expected
|
||||||
|
to use, the product. A product is a consumer product regardless of
|
||||||
|
whether the product has substantial commercial, industrial or
|
||||||
|
non-consumer uses, unless such uses represent the only significant
|
||||||
|
mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to
|
||||||
|
install and execute modified versions of a covered work in that User
|
||||||
|
Product from a modified version of its Corresponding Source. The
|
||||||
|
information must suffice to ensure that the continued functioning of
|
||||||
|
the modified object code is in no case prevented or interfered with
|
||||||
|
solely because modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or
|
||||||
|
updates for a work that has been modified or installed by the
|
||||||
|
recipient, or for the User Product in which it has been modified or
|
||||||
|
installed. Access to a network may be denied when the modification
|
||||||
|
itself materially and adversely affects the operation of the network
|
||||||
|
or violates the rules and protocols for communication across the
|
||||||
|
network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
#### 7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders
|
||||||
|
of that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
- a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
- b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
- c) Prohibiting misrepresentation of the origin of that material,
|
||||||
|
or requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
- d) Limiting the use for publicity purposes of names of licensors
|
||||||
|
or authors of the material; or
|
||||||
|
- e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
- f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions
|
||||||
|
of it) with contractual assumptions of liability to the recipient,
|
||||||
|
for any liability that these contractual assumptions directly
|
||||||
|
impose on those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions; the
|
||||||
|
above requirements apply either way.
|
||||||
|
|
||||||
|
#### 8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your license
|
||||||
|
from a particular copyright holder is reinstated (a) provisionally,
|
||||||
|
unless and until the copyright holder explicitly and finally
|
||||||
|
terminates your license, and (b) permanently, if the copyright holder
|
||||||
|
fails to notify you of the violation by some reasonable means prior to
|
||||||
|
60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
#### 9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or run
|
||||||
|
a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
#### 10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
#### 11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims owned
|
||||||
|
or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within the
|
||||||
|
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||||
|
the non-exercise of one or more of the rights that are specifically
|
||||||
|
granted under this License. You may not convey a covered work if you
|
||||||
|
are a party to an arrangement with a third party that is in the
|
||||||
|
business of distributing software, under which you make payment to the
|
||||||
|
third party based on the extent of your activity of conveying the
|
||||||
|
work, and under which the third party grants, to any of the parties
|
||||||
|
who would receive the covered work from you, a discriminatory patent
|
||||||
|
license (a) in connection with copies of the covered work conveyed by
|
||||||
|
you (or copies made from those copies), or (b) primarily for and in
|
||||||
|
connection with specific products or compilations that contain the
|
||||||
|
covered work, unless you entered into that arrangement, or that patent
|
||||||
|
license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
#### 12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under
|
||||||
|
this License and any other pertinent obligations, then as a
|
||||||
|
consequence you may not convey it at all. For example, if you agree to
|
||||||
|
terms that obligate you to collect a royalty for further conveying
|
||||||
|
from those to whom you convey the Program, the only way you could
|
||||||
|
satisfy both those terms and this License would be to refrain entirely
|
||||||
|
from conveying the Program.
|
||||||
|
|
||||||
|
#### 13. Remote Network Interaction; Use with the GNU General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, if you modify the
|
||||||
|
Program, your modified version must prominently offer all users
|
||||||
|
interacting with it remotely through a computer network (if your
|
||||||
|
version supports such interaction) an opportunity to receive the
|
||||||
|
Corresponding Source of your version by providing access to the
|
||||||
|
Corresponding Source from a network server at no charge, through some
|
||||||
|
standard or customary means of facilitating copying of software. This
|
||||||
|
Corresponding Source shall include the Corresponding Source for any
|
||||||
|
work covered by version 3 of the GNU General Public License that is
|
||||||
|
incorporated pursuant to the following paragraph.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the work with which it is combined will remain governed by version
|
||||||
|
3 of the GNU General Public License.
|
||||||
|
|
||||||
|
#### 14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Affero General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies that a certain numbered version of the GNU Affero General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU Affero General Public License, you may choose any version ever
|
||||||
|
published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future versions
|
||||||
|
of the GNU Affero General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
#### 15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||||
|
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||||
|
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||||
|
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||||
|
CORRECTION.
|
||||||
|
|
||||||
|
#### 16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||||
|
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||||
|
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||||
|
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||||
|
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||||
|
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||||
|
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
#### 17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
### How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these
|
||||||
|
terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest to
|
||||||
|
attach them to the start of each source file to most effectively state
|
||||||
|
the exclusion of warranty; and each file should have at least the
|
||||||
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as
|
||||||
|
published by the Free Software Foundation, either version 3 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper
|
||||||
|
mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for
|
||||||
|
the specific requirements.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. For more information on this, and how to apply and follow
|
||||||
|
the GNU AGPL, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
# EMBEDDED PROJECTS GENERAL PUBLIC LICENSE Version 3.1
|
||||||
|
‘EGPLv3.1’
|
||||||
|
|
||||||
|
Copyright (C) 2015 embedded projects GmbH, Augsburg, Germany
|
||||||
|
|
||||||
|
## Preamble
|
||||||
|
The EGPLv3.1 incorporates the terms of the GNU AFFERO GENERAL PUBLIC LICENSE Version 3, dated 19 November 2007 (‘AGPLv3’) as shown under EXHIBIT A *and* the following terms, WHEREAS the following terms
|
||||||
|
- extend, amend and/or clarify the AGPLv3 and
|
||||||
|
- prevail in case of any contradictions with the AGPLv3.
|
||||||
|
|
||||||
|
The following terms of the EGPLv3.1 may not be separated from the terms of the AGPLv3 in EXHIBIT A – together they form the EGPLv3.1.
|
||||||
|
It is purpose of the EGPLv3.1 to make any user and/or recipient of this file or its content aware of the identity of the copyright holder/licensor and its business.
|
||||||
|
|
||||||
|
## DEVELOPER & DISTRIBUTOR NOTES:
|
||||||
|
- For purpose of clarification, the following terms have priority over the terms of the AGPLv3, especially No. 7 of the AGPLv3. This however, may render the EGPLv3.1 incompatible with any other AGPLv3s or any other GPL.
|
||||||
|
- Inasmuch as embedded projects GmbH is the licensor, embedded projects reserves the right to publish guidelines for the interpretation of the EGPLv3.1 on http://www.wawision.de which are incorporated into this license by reference in case they are published prior to your obtainment of the EGPLv3.1. You bear the burden of proof that you obtained this license prior to the publishment of a certain guideline.
|
||||||
|
|
||||||
|
## 0. Definition of ‘the program’
|
||||||
|
‘The Program’ hereinafeter (and pursuant to No. 0 AGPLv3) includes but is not limited to any file or portion of it that
|
||||||
|
- a) references to the EGPLv3.1 including but not limited to such references from source code header files
|
||||||
|
|
||||||
|
OR
|
||||||
|
|
||||||
|
- b) is referenced to the EGPLv3.1 by
|
||||||
|
- (i) any documentation provided with the file OR
|
||||||
|
- (ii) a notice file that is contained in the same directory in which the file is stored. In the absence of such notice file in the same directory, said notice file can be found in the upper directory that is next to the file – which would be the root directory as a last resort.
|
||||||
|
|
||||||
|
The use of this file and its content (including but not limited to all modules, databases, pictorial images and documentation and all forms of computer program codes and parts thereof) are subject to the EGPLv3.1.
|
||||||
|
|
||||||
|
## 1. Adevertising Clauses
|
||||||
|
- a) All advertising materials for (i) any work that contains this file, its content and/or any portion of it or (ii) mentioning features and/or use of this file, its content and/or any portion of it must mention at least ONE of the following statements:
|
||||||
|
> “Diese Software ist eine Ableitung und Veränderung von WaWision ERP. WaWision ERP wurde von embedded projects GmbH entwickelt und steht unter der EGPLv3.1-Lizenz als Open Source Software. Informationen zu WaWision und der Open-Source Version findet man unter http://www.wawision.de.”
|
||||||
|
|
||||||
|
AND/OR
|
||||||
|
|
||||||
|
> “This Software is a derivative and modification of WaWision ERP. WaWision ERP was developed by embedded projects GmbH und is licensed under the EGPLv3.1 license as Open Source Software. Information on WaWision and its open source distribution can be obtained from http://www.wawision.”
|
||||||
|
|
||||||
|
- b) The statement under clause 1 a) has to be displayed in black latin font (“Arial” or “Times New Roman”) on white background with font size of at least 12pt.
|
||||||
|
- c) The “advertising materials” under clause 1 a) comprises all non-verbal forms of advertising and business in theprogram, including but not limited to digital or printed offers or displays (e.g. on convention displays, brochures, websites or webshops) or terms and conditions for the distribution or cloud/SaaS use of the program.
|
||||||
|
- d) You are required to provide customers and/or any recipients of your advertising materials with the text of the complete EGPLv3.1 text upon request. You may not charge any fee for the provision of the EGPLv3.1 text, when you are requested to provide the EGPLv3.1 by means of electronic communication (e.g. e-mail).
|
||||||
|
|
||||||
|
## 2. Integrity of Copyright and License Notices
|
||||||
|
You are not allowed to remove or modify any copyright and license notices from the program unless you only add your own copyright notice exclusively for your own contributions.
|
||||||
|
|
||||||
|
## 3. Network Interaction
|
||||||
|
- a) A user interaction with the program pursuant to No. 13 AGPLv3 includes but is not limited to situations in which the user receives parts of the program on a client machine during interaction with a server. For the purpose of clarification,
|
||||||
|
- i) said user interaction does not necessarily mean access to all functions of the program in order to interact with it. Said interaction comprises but is not limited to any code of the program that is purposefully cached on the user’s machine for preparing code execution and any login dialog of the program – no matter whether the user has the suitable login information.
|
||||||
|
- ii) the term ‘user’ means anyone but the licensee, i.e. comprising but not limited to employees of the licensee.
|
||||||
|
- b) Instead of providing the user that interacts with the program pursuant to No. 13 AGPLv3 with the source code of the original program, you are obliged to offer the complete corresponding code of the licensee’s covered work for internet download to the PUBLIC under the EGPLv3.1, including but not limited to No. 5 AGPLv3. The aforementioned offer has to be prominently positioned
|
||||||
|
|
||||||
|
## 4. Defintion of a ‘Work Based on the Program’
|
||||||
|
A ‘work based on the program’ includes but is not limited to
|
||||||
|
- a) any new arrangement of the program with other new files, e.g. libraries – without regard to the form of linking (dynamic or static) AND
|
||||||
|
- b) any other new module that contains portions of the program, e.g. any code fragment of the program. In case, the aforementioned incorporation of a code fragment into a new module does not require the permission by the licensor, said module must be licensed under the EGPLv3.1 when the module is conveyed together with the program.
|
||||||
|
|
||||||
|
## 5. No Trademark or Name Rights
|
||||||
|
Notwithstanding No. 1 and 5 EGPLv3.1, nothing in the EGPLv3.1 grants you the to right to use the trademark ‘WaWision’ or the name of the embedded projects GmbH.
|
||||||
|
|
||||||
|
## 6. Integrity of the EGPLv3.1
|
||||||
|
The EGPLv3.1 may not be changed, including but not limited for the distribution of the program or any work based on the program; No. 14 AGPLv3 does not apply.
|
||||||
|
|
||||||
|
## 7. Choice of Law, Jurisdiction
|
||||||
|
The EGPLv3.1 is governed by the laws of Germany whereas the application of the International Convention of the Sale of Goods (CISG) is excluded. Inasmuch as you are a merchant pursuant to Sec. 13 German Civil Code (BGB), all courts in Germany shall have jurisdiction for any dispute arising from the EGPLv3.1.
|
||||||
|
|
||||||
|
# – EXHIBIT A –
|
||||||
|
## GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
-> See [AGPL-3.0-only.md](AGPL-3.0-only.md)
|
||||||
|
|
@ -36,4 +36,6 @@ Neuimplementierung des Xentral 20 Enterprise Ticketsystems mit vielen Verbesseru
|
||||||
|
|
||||||
[Hier gehts zur OpenXE Installation](INSTALL.md)
|
[Hier gehts zur OpenXE Installation](INSTALL.md)
|
||||||
|
|
||||||
OpenXE ist freie Software, lizensiert unter AGPL 3 und basiert auf der Open Source Version von Xentral https://xentral.com/
|
OpenXE ist freie Software, lizensiert unter der EGPL 3.1.
|
||||||
|
Diese Software ist eine Ableitung und Veränderung von WaWision ERP. WaWision ERP wurde von embedded projects GmbH entwickelt und steht unter der EGPLv3.1-Lizenz als Open Source Software. Informationen zu WaWision und der Open-Source Version findet man unter http://www.wawision.de
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,14 +54,11 @@ memory_limit = 256M
|
||||||
## Install additional zip
|
## Install additional zip
|
||||||
`sudo apt-get install zip`
|
`sudo apt-get install zip`
|
||||||
|
|
||||||
## Install mysql client
|
|
||||||
`sudo apt-get install mysql-client`
|
|
||||||
|
|
||||||
## Install database server
|
## Install database server
|
||||||
`sudo apt-get install mariadb-server`
|
`sudo apt-get install mariadb-server`
|
||||||
|
|
||||||
## Configure database server
|
## Configure database server
|
||||||
`sudo mysql_secure_installation`
|
`sudo mariadb-secure-installation`
|
||||||
```
|
```
|
||||||
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
|
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
|
||||||
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
|
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Bank
|
||||||
|
{
|
||||||
|
public string $accountOwner;
|
||||||
|
public string $bankName;
|
||||||
|
public string $iban;
|
||||||
|
public string $note1;
|
||||||
|
public string $note2;
|
||||||
|
public ?string $bic;
|
||||||
|
public ?string $accountreference;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Communication
|
||||||
|
{
|
||||||
|
public ?string $phone;
|
||||||
|
public ?string $email;
|
||||||
|
public ?string $contactPerson;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Contact
|
||||||
|
{
|
||||||
|
public ?Communication $Communication;
|
||||||
|
public ?NativeAddress $Address;
|
||||||
|
public ?Name $Name;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Country
|
||||||
|
{
|
||||||
|
public ?string $country;
|
||||||
|
public string $countryISOCode;
|
||||||
|
public ?string $state;
|
||||||
|
|
||||||
|
public static function Create(string $isoCode, ?string $state = null):Country {
|
||||||
|
$obj = new Country();
|
||||||
|
$obj->countryISOCode = $isoCode;
|
||||||
|
$obj->state = $state;
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class CreateShipmentOrderRequest
|
||||||
|
{
|
||||||
|
public Version $Version;
|
||||||
|
public ShipmentOrder $ShipmentOrder;
|
||||||
|
public ?string $labelResponseType;
|
||||||
|
public ?string $groupProfileName;
|
||||||
|
public ?string $labelFormat;
|
||||||
|
public ?string $labelFormatRetoure;
|
||||||
|
public ?string $combinedPrinting;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class CreateShipmentOrderResponse
|
||||||
|
{
|
||||||
|
public Version $Version;
|
||||||
|
public Statusinformation $Status;
|
||||||
|
public ?CreationState $CreationState;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class CreationState
|
||||||
|
{
|
||||||
|
public string $sequenceNumber;
|
||||||
|
public ?string $shipmentNumber;
|
||||||
|
public ?string $returnShipmentNumber;
|
||||||
|
public LabelData $LabelData;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Customer
|
||||||
|
{
|
||||||
|
public Name $Name;
|
||||||
|
public ?string $vatID;
|
||||||
|
public string $EKP;
|
||||||
|
public NativeAddress $Address;
|
||||||
|
public Contact $Contact;
|
||||||
|
public ?Bank $Bank;
|
||||||
|
public ?string $note;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class DeleteShipmentOrderRequest
|
||||||
|
{
|
||||||
|
public Version $Version;
|
||||||
|
public string $shipmentNumber;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class DeleteShipmentOrderResponse
|
||||||
|
{
|
||||||
|
public Version $Version;
|
||||||
|
public Statusinformation $Status;
|
||||||
|
public ?DeletionState $DeletionState;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class DeletionState
|
||||||
|
{
|
||||||
|
public string $shipmentNumber;
|
||||||
|
public Statusinformation $Status;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class DeliveryAddress
|
||||||
|
{
|
||||||
|
public ?NativeAddress $NativeAddress;
|
||||||
|
public ?Postfiliale $PostOffice;
|
||||||
|
public ?PackStation $PackStation;
|
||||||
|
public ?string $streetNameCode;
|
||||||
|
public ?string $streetNumberCode;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Dimension
|
||||||
|
{
|
||||||
|
public int $length;
|
||||||
|
public int $width;
|
||||||
|
public int $height;
|
||||||
|
public ?string $unit;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class ExportDocPosition
|
||||||
|
{
|
||||||
|
public string $description;
|
||||||
|
public string $countryCodeOrigin;
|
||||||
|
public string $customsTariffNumber;
|
||||||
|
public int $amount;
|
||||||
|
public float $netWeightInKG;
|
||||||
|
public float $customsValue;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class ExportDocument
|
||||||
|
{
|
||||||
|
const TYPE_PRESENT = 'PRESENT';
|
||||||
|
const TYPE_DOCUMENT = 'DOCUMENT';
|
||||||
|
const TYPE_COMMERCIAL_GOODS = 'COMMERCIAL_GOODS';
|
||||||
|
const TYPE_COMMERCIAL_SAMPLE = 'COMMERCIAL_SAMPLE';
|
||||||
|
const TYPE_RETURN_OF_GOODS= 'RETURN_OF_GOODS';
|
||||||
|
const TYPE_OTHER = 'OTHER';
|
||||||
|
|
||||||
|
const TERMS_DDP = 'DDP';
|
||||||
|
const TERMS_DXV = 'DXV';
|
||||||
|
const TERMS_DAP = 'DAP';
|
||||||
|
const TERMS_DDX = 'DDX';
|
||||||
|
const TERMS_CPT = 'CPT';
|
||||||
|
|
||||||
|
public ?string $invoiceNumber;
|
||||||
|
public string $exportType;
|
||||||
|
public ?string $exportTypeDescription;
|
||||||
|
public ?string $termsOfTrade;
|
||||||
|
public string $placeOfCommital;
|
||||||
|
public ?float $additionalFee;
|
||||||
|
public ?string $customsCurrency;
|
||||||
|
public ?string $permitNumber;
|
||||||
|
public ?string $attestationNumber;
|
||||||
|
public ?string $addresseesCustomsReference;
|
||||||
|
public ?string $sendersCustomsReference;
|
||||||
|
public ?bool $WithElectronicExportNtfctn;
|
||||||
|
/** @var ExportDocPosition[] $ExportDocPosition */
|
||||||
|
public array $ExportDocPosition;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class LabelData
|
||||||
|
{
|
||||||
|
public Statusinformation $Status;
|
||||||
|
public ?string $shipmentNumber;
|
||||||
|
public ?string $labelUrl;
|
||||||
|
public ?string $labelData;
|
||||||
|
public ?string $returnLabelUrl;
|
||||||
|
public ?string $returnLabelData;
|
||||||
|
public ?string $exportLabelUrl;
|
||||||
|
public ?string $exportLabelData;
|
||||||
|
public ?string $codLabelUrl;
|
||||||
|
public ?string $codLabelData;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Name
|
||||||
|
{
|
||||||
|
public string $name1;
|
||||||
|
public ?string $name2;
|
||||||
|
public ?string $name3;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class NativeAddress
|
||||||
|
{
|
||||||
|
public string $streetName;
|
||||||
|
public ?string $streetNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[]
|
||||||
|
*/
|
||||||
|
public array $addressAddition;
|
||||||
|
public ?string $dispatchingInformation;
|
||||||
|
public string $zip;
|
||||||
|
public string $city;
|
||||||
|
public ?string $province;
|
||||||
|
public ?Country $Origin;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class NativeAddressNew
|
||||||
|
{
|
||||||
|
public string $streetName;
|
||||||
|
public ?string $streetNumber;
|
||||||
|
public string $zip;
|
||||||
|
public string $city;
|
||||||
|
public ?Country $Origin;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class PackStation
|
||||||
|
{
|
||||||
|
public string $postNumber;
|
||||||
|
public string $packstationNumber;
|
||||||
|
public string $zip;
|
||||||
|
public string $city;
|
||||||
|
public ?string $province;
|
||||||
|
public ?Country $Origin;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Postfiliale
|
||||||
|
{
|
||||||
|
public string $postfilialeNumber;
|
||||||
|
public string $postNumber;
|
||||||
|
public string $zip;
|
||||||
|
public string $city;
|
||||||
|
public ?Country $Origin;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Receiver
|
||||||
|
{
|
||||||
|
public string $name1;
|
||||||
|
public ?ReceiverNativeAddress $Address;
|
||||||
|
public ?PackStation $Packstation;
|
||||||
|
public ?Postfiliale $Postfiliale;
|
||||||
|
public ?Communication $Communication;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class ReceiverNativeAddress
|
||||||
|
{
|
||||||
|
public ?string $name2;
|
||||||
|
public ?string $name3;
|
||||||
|
public string $streetName;
|
||||||
|
public ?string $streetNumber;
|
||||||
|
public array|string|null $addressAddition;
|
||||||
|
public ?string $dispatchingInformation;
|
||||||
|
public string $zip;
|
||||||
|
public string $city;
|
||||||
|
public ?string $province;
|
||||||
|
public ?Country $Origin;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Shipment
|
||||||
|
{
|
||||||
|
public ShipmentDetails $ShipmentDetails;
|
||||||
|
public Shipper $Shipper;
|
||||||
|
public string $ShipperReference;
|
||||||
|
public Receiver $Receiver;
|
||||||
|
public ?Shipper $ReturnReceiver;
|
||||||
|
public ?ExportDocument $ExportDocument;
|
||||||
|
public ?string $feederSystem;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->ShipmentDetails = new ShipmentDetails();
|
||||||
|
$this->Shipper = new Shipper();
|
||||||
|
$this->ShipperReference = '';
|
||||||
|
$this->Receiver = new Receiver();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
use DateTimeImmutable;
|
||||||
|
|
||||||
|
class ShipmentDetails
|
||||||
|
{
|
||||||
|
public string $product;
|
||||||
|
public string $accountNumber;
|
||||||
|
public string $customerReference;
|
||||||
|
private string $shipmentDate;
|
||||||
|
public string $costCentre;
|
||||||
|
public string $returnShipmentAccountNumber;
|
||||||
|
public string $returnShipmentReference;
|
||||||
|
public ShipmentItem $ShipmentItem;
|
||||||
|
public ShipmentService $Service;
|
||||||
|
public ShipmentNotification $Notification;
|
||||||
|
public Bank $BankData;
|
||||||
|
|
||||||
|
public function SetShipmentDate(DateTimeImmutable $date): void {
|
||||||
|
$this->shipmentDate = $date->format('Y-m-d');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function GetShipmentDate(): DateTimeImmutable {
|
||||||
|
return DateTimeImmutable::createFromFormat('Y-m-d', $this->shipmentDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class ShipmentItem
|
||||||
|
{
|
||||||
|
public float $weightInKG;
|
||||||
|
public ?int $lengthInCM;
|
||||||
|
public ?int $widthInCM;
|
||||||
|
public ?int $heightInCM;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class ShipmentNotification
|
||||||
|
{
|
||||||
|
public string $recipientEmailAddress;
|
||||||
|
public ?string $templateId;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class ShipmentOrder
|
||||||
|
{
|
||||||
|
public string $sequenceNumber;
|
||||||
|
public Shipment $Shipment;
|
||||||
|
public ?Serviceconfiguration $PrintOnlyIfCodeable;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class ShipmentService
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Shipper
|
||||||
|
{
|
||||||
|
public Name $Name;
|
||||||
|
public NativeAddressNew $Address;
|
||||||
|
public ?Communication $Communication;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->Name = new Name();
|
||||||
|
$this->Address = new NativeAddressNew();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Status
|
||||||
|
{
|
||||||
|
public string $statuscode;
|
||||||
|
public string $statusDescription;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class StatusElement
|
||||||
|
{
|
||||||
|
public string $statusElement;
|
||||||
|
public string $statusMessage;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Statusinformation
|
||||||
|
{
|
||||||
|
public int $statusCode;
|
||||||
|
public string $statusText;
|
||||||
|
public array|string $statusMessage;
|
||||||
|
public string $statusType;
|
||||||
|
public StatusElement $errorMessage;
|
||||||
|
public StatusElement $warningMessage;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl\Data;
|
||||||
|
|
||||||
|
class Version
|
||||||
|
{
|
||||||
|
public string $majorRelease;
|
||||||
|
public string $minorRelease;
|
||||||
|
public ?string $build;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\Dhl;
|
||||||
|
|
||||||
|
use SoapClient;
|
||||||
|
use SoapHeader;
|
||||||
|
use Xentral\Carrier\Dhl\Data\CreateShipmentOrderRequest;
|
||||||
|
use Xentral\Carrier\Dhl\Data\CreateShipmentOrderResponse;
|
||||||
|
use Xentral\Carrier\Dhl\Data\CreationState;
|
||||||
|
use Xentral\Carrier\Dhl\Data\LabelData;
|
||||||
|
use Xentral\Carrier\Dhl\Data\Shipment;
|
||||||
|
use Xentral\Carrier\Dhl\Data\ShipmentOrder;
|
||||||
|
use Xentral\Carrier\Dhl\Data\Statusinformation;
|
||||||
|
use Xentral\Carrier\Dhl\Data\Version;
|
||||||
|
|
||||||
|
class DhlApi
|
||||||
|
{
|
||||||
|
private SoapClient $soapClient;
|
||||||
|
|
||||||
|
private const SANDBOX_URL = 'https://cig.dhl.de/services/sandbox/soap';
|
||||||
|
private const PRODUCTION_URL = 'https://cig.dhl.de/services/production/soap';
|
||||||
|
private const NAMESPACE_CIS = 'http://dhl.de/webservice/cisbase';
|
||||||
|
|
||||||
|
public function __construct(string $user, string $signature)
|
||||||
|
{
|
||||||
|
$this->soapClient = new SoapClient(__DIR__ . '/Wsdl/geschaeftskundenversand-api-3.4.0.wsdl', [
|
||||||
|
'login' => 'OpenXE_1',
|
||||||
|
'password' => 'cjzNEpGXxbbnRwcYLISX3ZTTcQrQrz',
|
||||||
|
'location' => self::PRODUCTION_URL,
|
||||||
|
'trace' => 1,
|
||||||
|
'connection_timeout' => 30,
|
||||||
|
'classmap' => [
|
||||||
|
'CreateShipmentOrderResponse' => CreateShipmentOrderResponse::class,
|
||||||
|
'CreationState' => CreationState::class,
|
||||||
|
'LabelData' => LabelData::class,
|
||||||
|
'Statusinformation' => Statusinformation::class,
|
||||||
|
'Version' => Version::class,
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
|
$authHeader = new SoapHeader(self::NAMESPACE_CIS, 'Authentification', [
|
||||||
|
'user' => $user,
|
||||||
|
'signature' => $signature
|
||||||
|
]);
|
||||||
|
$this->soapClient->__setSoapHeaders($authHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function CreateShipment(Shipment $shipment): CreateShipmentOrderResponse|string
|
||||||
|
{
|
||||||
|
$request = new CreateShipmentOrderRequest();
|
||||||
|
$request->Version = $this->getVersion();
|
||||||
|
$request->ShipmentOrder = new ShipmentOrder();
|
||||||
|
$request->ShipmentOrder->Shipment = $shipment;
|
||||||
|
$request->ShipmentOrder->sequenceNumber = '1';
|
||||||
|
$request->labelResponseType = "B64";
|
||||||
|
try {
|
||||||
|
$response = $this->soapClient->createShipmentOrder($request);
|
||||||
|
return $response;
|
||||||
|
} catch (\SoapFault $e) {
|
||||||
|
return $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getVersion() {
|
||||||
|
$version = new Version();
|
||||||
|
$version->majorRelease = '3';
|
||||||
|
$version->minorRelease = '4';
|
||||||
|
return $version;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,340 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
Version: 3.4.0
|
||||||
|
Date: 2022-08-01T22:00:51Z
|
||||||
|
--><wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
||||||
|
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
|
||||||
|
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||||
|
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
|
||||||
|
xmlns:cis="http://dhl.de/webservice/cisbase"
|
||||||
|
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||||
|
xmlns:bcs="http://dhl.de/webservices/businesscustomershipping/3.0"
|
||||||
|
targetNamespace="http://dhl.de/webservices/businesscustomershipping/3.0">
|
||||||
|
<wsdl:types>
|
||||||
|
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
|
||||||
|
<xs:import namespace="http://dhl.de/webservice/cisbase"
|
||||||
|
schemaLocation="geschaeftskundenversand-api-3.4.0-schema-cis_base.xsd"/>
|
||||||
|
<xs:import namespace="http://dhl.de/webservices/businesscustomershipping/3.0"
|
||||||
|
schemaLocation="geschaeftskundenversand-api-3.4.0-schema-bcs_base.xsd"/>
|
||||||
|
</xs:schema>
|
||||||
|
</wsdl:types>
|
||||||
|
<wsdl:message name="AuthentificationHeaderMessage">
|
||||||
|
<wsdl:documentation>The authentication data.</wsdl:documentation>
|
||||||
|
<wsdl:part name="header" element="cis:Authentification"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="createShipmentOrderMessage">
|
||||||
|
<wsdl:documentation>The shipmentdata for creating a shipment.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:CreateShipmentOrderRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="createShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the createShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:CreateShipmentOrderResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="validateShipmentMessage">
|
||||||
|
<wsdl:documentation>The shipmentdata for validating a shipment.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:ValidateShipmentOrderRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="validateShipmentResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the validateShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:ValidateShipmentResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="deleteShipmentOrderMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment which should be
|
||||||
|
deleted.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:DeleteShipmentOrderRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="deleteShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the deletion operation.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:DeleteShipmentOrderResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="doManifestMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment which should be
|
||||||
|
manifested.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:DoManifestRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="doManifestResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the manifest operation.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:DoManifestResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getLabelMessage">
|
||||||
|
<wsdl:documentation>The identifier for the DD shipment for which the label url is
|
||||||
|
requested.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetLabelRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getLabelResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the label url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetLabelResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getVersionRequestMessage">
|
||||||
|
<wsdl:documentation>The version of webservice implementation.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:Version"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getVersionResponseMessage">
|
||||||
|
<wsdl:documentation>The version of webservice implementation.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetVersionResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getExportDocMessage">
|
||||||
|
<wsdl:documentation>The identifier for the DD shipment for which the label url is
|
||||||
|
requested.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetExportDocRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getExportDocResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the label url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetExportDocResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getManifestRequestMessage">
|
||||||
|
<wsdl:documentation>Request a manifest of the given date / date range.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetManifestRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getManifestResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the manifest url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:GetManifestResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="updateShipmentOrderRequestMessage">
|
||||||
|
<wsdl:documentation>Request a manifest of the given date / date range.</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:UpdateShipmentOrderRequest"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="updateShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the manifest url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:UpdateShipmentOrderResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="readShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the manifest url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
<wsdl:part name="part1" element="bcs:ReadShipmentOrderResponse"> </wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:portType name="GKV3XAPIServicePortType">
|
||||||
|
<wsdl:operation name="createShipmentOrder">
|
||||||
|
<wsdl:documentation>Creates shipments.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:createShipmentOrderMessage">
|
||||||
|
<wsdl:documentation>The shipment data.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:createShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the createShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="validateShipment">
|
||||||
|
<wsdl:documentation>Creates shipments.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:validateShipmentMessage">
|
||||||
|
<wsdl:documentation>The shipment data.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:validateShipmentResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the validateShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="deleteShipmentOrder">
|
||||||
|
<wsdl:documentation>Deletes the requested shipments.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:deleteShipmentOrderMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment which should be
|
||||||
|
deleted.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:deleteShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the deletion operation.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="doManifest">
|
||||||
|
<wsdl:documentation>Manifest the requested DD shipments.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:doManifestMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment which should be
|
||||||
|
manifested.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:doManifestResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the manifest operation.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getLabel">
|
||||||
|
<wsdl:documentation>Returns the request-url for getting a label.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:getLabelMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment for which the label url is
|
||||||
|
requested.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:getLabelResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the label url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getVersion">
|
||||||
|
<wsdl:documentation>Returns the actual version of the implementation of the whole ISService
|
||||||
|
webservice.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:getVersionRequestMessage"/>
|
||||||
|
<wsdl:output message="bcs:getVersionResponseMessage">
|
||||||
|
<wsdl:documentation>The version of webservice implementation.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getExportDoc">
|
||||||
|
<wsdl:documentation>Returns the request-url for getting a export
|
||||||
|
document.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:getExportDocMessage">
|
||||||
|
<wsdl:documentation>The identifier for the shipment for which the export document url is
|
||||||
|
requested.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:getExportDocResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the operation and the export document url (if
|
||||||
|
available).</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getManifest">
|
||||||
|
<wsdl:documentation>Request the manifest.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:getManifestRequestMessage">
|
||||||
|
<wsdl:documentation>The request data.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:getManifestResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the getManifest operation and the manifest
|
||||||
|
url.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="updateShipmentOrder">
|
||||||
|
<wsdl:documentation>Updates a shipment order.</wsdl:documentation>
|
||||||
|
<wsdl:input message="bcs:updateShipmentOrderRequestMessage">
|
||||||
|
<wsdl:documentation>The shipment data.</wsdl:documentation>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="bcs:updateShipmentOrderResponseMessage">
|
||||||
|
<wsdl:documentation>The status of the updateShipment operation and the identifier for the
|
||||||
|
shipment.</wsdl:documentation>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:portType>
|
||||||
|
<wsdl:binding name="GKV3XAPISOAP11Binding" type="bcs:GKV3XAPIServicePortType">
|
||||||
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<wsdl:operation name="createShipmentOrder">
|
||||||
|
<wsdl:documentation>Creates shipments.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:createShipmentOrder" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment data.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="validateShipment">
|
||||||
|
<wsdl:documentation>Validates shipments.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:validateShipment" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment data.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="deleteShipmentOrder">
|
||||||
|
<wsdl:documentation>Deletes the requested shipments.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:deleteShipmentOrder" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="doManifest">
|
||||||
|
<wsdl:documentation>Manifest the requested shipments.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:doManifest" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getLabel">
|
||||||
|
<wsdl:documentation>Returns the request-url for getting a label.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:getLabel" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the url for requesting the
|
||||||
|
label.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getVersion">
|
||||||
|
<wsdl:documentation>Returns the actual version of the implementation of the whole ISService
|
||||||
|
webservice.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:getVersion" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The version of the implementation.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getExportDoc">
|
||||||
|
<wsdl:documentation>Returns the request-url for getting a export
|
||||||
|
document.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:getExportDoc" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment
|
||||||
|
identifier.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the url for requesting the export
|
||||||
|
document.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getManifest">
|
||||||
|
<wsdl:documentation>Requests the manifest.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:getManifest" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment data.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation and the manifest url.</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="updateShipmentOrder">
|
||||||
|
<wsdl:documentation>Updates a shipment order.</wsdl:documentation>
|
||||||
|
<soap:operation soapAction="urn:updateShipmentOrder" style="document"/>
|
||||||
|
<wsdl:input>
|
||||||
|
<wsdl:documentation>The authentication data and the shipment data.</wsdl:documentation>
|
||||||
|
<soap:header message="bcs:AuthentificationHeaderMessage" part="header" use="literal"/>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<wsdl:documentation>The status of the operation</wsdl:documentation>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:binding>
|
||||||
|
<wsdl:service name="GVAPI_2_0_de">
|
||||||
|
<wsdl:port name="GKVAPISOAP11port0" binding="bcs:GKV3XAPISOAP11Binding">
|
||||||
|
<soap:address location="https://cig.dhl.de/services/production/soap"/>
|
||||||
|
</wsdl:port>
|
||||||
|
</wsdl:service>
|
||||||
|
</wsdl:definitions>
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud\Data;
|
||||||
|
|
||||||
|
class Document
|
||||||
|
{
|
||||||
|
public const TYPE_LABEL = 'label';
|
||||||
|
public const TYPE_CP71 = 'cp71';
|
||||||
|
public const TYPE_CN23 = 'cn23';
|
||||||
|
public const TYPE_CN23_DEFAULT = 'cn23-default';
|
||||||
|
public const TYPE_COMMERCIAL_INVOICE = 'commercial-invoice';
|
||||||
|
|
||||||
|
public string $Type;
|
||||||
|
public string $Size;
|
||||||
|
public string $Link;
|
||||||
|
|
||||||
|
public static function fromApiResponse(object $data): Document
|
||||||
|
{
|
||||||
|
$obj = new Document();
|
||||||
|
$obj->Type = $data->type;
|
||||||
|
$obj->Size = $data->size;
|
||||||
|
$obj->Link = $data->link;
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud\Data;
|
||||||
|
|
||||||
|
abstract class ParcelBase
|
||||||
|
{
|
||||||
|
public ?string $Name = null;
|
||||||
|
public ?string $CompanyName = null;
|
||||||
|
public ?string $Address = null;
|
||||||
|
public ?string $Address2 = null;
|
||||||
|
public ?string $HouseNumber = null;
|
||||||
|
public ?string $City = null;
|
||||||
|
public ?string $PostalCode = null;
|
||||||
|
public ?string $Telephone = null;
|
||||||
|
public bool $RequestLabel = true;
|
||||||
|
public ?string $EMail = null;
|
||||||
|
public ?string $Country = null;
|
||||||
|
public ?int $ShippingMethodId = null;
|
||||||
|
/**
|
||||||
|
* @var ?int weight in grams
|
||||||
|
*/
|
||||||
|
public ?int $Weight = null;
|
||||||
|
public ?string $OrderNumber = null;
|
||||||
|
public ?string $TotalOrderValueCurrency = null;
|
||||||
|
public ?float $TotalOrderValue = null;
|
||||||
|
public ?string $CountryState = null;
|
||||||
|
public ?string $CustomsInvoiceNr = null;
|
||||||
|
public ?int $CustomsShipmentType = null;
|
||||||
|
public ?string $ExternalReference = null;
|
||||||
|
public ?int $TotalInsuredValue = null;
|
||||||
|
public ?array $ParcelItems = array();
|
||||||
|
public bool $IsReturn = false;
|
||||||
|
public ?string $Length = null;
|
||||||
|
public ?string $Width = null;
|
||||||
|
public ?string $Height = null;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud\Data;
|
||||||
|
|
||||||
|
class ParcelCreation extends ParcelBase
|
||||||
|
{
|
||||||
|
public ?int $SenderAddressId = null;
|
||||||
|
|
||||||
|
public function toApiRequest(): array
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'name' => $this->Name,
|
||||||
|
'company_name' => $this->CompanyName,
|
||||||
|
'address' => $this->Address,
|
||||||
|
'address_2' => $this->Address2,
|
||||||
|
'house_number' => $this->HouseNumber,
|
||||||
|
'city' => $this->City,
|
||||||
|
'postal_code' => $this->PostalCode,
|
||||||
|
'telephone' => $this->Telephone,
|
||||||
|
'request_label' => $this->RequestLabel,
|
||||||
|
'email' => $this->EMail,
|
||||||
|
'country' => $this->Country,
|
||||||
|
'shipment' => ['id' => $this->ShippingMethodId],
|
||||||
|
'weight' => number_format($this->Weight / 1000, 3, '.', null),
|
||||||
|
'order_number' => $this->OrderNumber,
|
||||||
|
'total_order_value_currency' => $this->TotalOrderValueCurrency,
|
||||||
|
'total_order_value' => number_format($this->TotalOrderValue, 2, '.', null),
|
||||||
|
'country_state' => $this->CountryState,
|
||||||
|
'sender_address' => $this->SenderAddressId,
|
||||||
|
'external_reference' => $this->ExternalReference,
|
||||||
|
'total_insured_value' => $this->TotalInsuredValue ?? 0,
|
||||||
|
'parcel_items' => array_map(fn(ParcelItem $item) => $item->toApiRequest(), $this->ParcelItems),
|
||||||
|
'is_return' => $this->IsReturn,
|
||||||
|
'length' => $this->Length,
|
||||||
|
'width' => $this->Width,
|
||||||
|
'height' => $this->Height,
|
||||||
|
];
|
||||||
|
if ($this->CustomsInvoiceNr !== null)
|
||||||
|
$data['customs_invoice_nr'] = $this->CustomsInvoiceNr;
|
||||||
|
if ($this->CustomsShipmentType !== null)
|
||||||
|
$data['customs_shipment_type'] = $this->CustomsShipmentType;
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud\Data;
|
||||||
|
|
||||||
|
class ParcelCreationError
|
||||||
|
{
|
||||||
|
public int $Code;
|
||||||
|
public string $Message;
|
||||||
|
public string $Request;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud\Data;
|
||||||
|
|
||||||
|
class ParcelItem
|
||||||
|
{
|
||||||
|
public string $HsCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int weight in grams
|
||||||
|
*/
|
||||||
|
public int $Weight;
|
||||||
|
public int $Quantity;
|
||||||
|
public string $Description;
|
||||||
|
public string $OriginCountry;
|
||||||
|
public float $Price;
|
||||||
|
public ?string $Sku = null;
|
||||||
|
public ?string $ProductId = null;
|
||||||
|
|
||||||
|
public function toApiRequest(): array {
|
||||||
|
return [
|
||||||
|
'hs_code' => $this->HsCode,
|
||||||
|
'weight' => number_format($this->Weight / 1000, 3, '.', null),
|
||||||
|
'quantity' => $this->Quantity,
|
||||||
|
'description' => $this->Description,
|
||||||
|
'value' => $this->Price,
|
||||||
|
'origin_country' => $this->OriginCountry,
|
||||||
|
'sku' => $this->Sku ?? '',
|
||||||
|
'product_id' => $this->ProductId ?? '',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function fromApiResponse(object $data): ParcelItem
|
||||||
|
{
|
||||||
|
$obj = new ParcelItem();
|
||||||
|
$obj->HsCode = $data->hs_code;
|
||||||
|
$obj->Weight = intval(floatval($data->weight)*1000);
|
||||||
|
$obj->Quantity = $data->quantity;
|
||||||
|
$obj->Description = $data->description;
|
||||||
|
$obj->Price = $data->value;
|
||||||
|
$obj->OriginCountry = $data->origin_country;
|
||||||
|
$obj->Sku = $data->sku;
|
||||||
|
$obj->ProductId = $data->product_id;
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud\Data;
|
||||||
|
|
||||||
|
use DateTimeImmutable;
|
||||||
|
use Exception;
|
||||||
|
|
||||||
|
class ParcelResponse extends ParcelBase
|
||||||
|
{
|
||||||
|
public int $Id;
|
||||||
|
public string $CarrierCode;
|
||||||
|
public DateTimeImmutable $DateCreated;
|
||||||
|
public DateTimeImmutable $DateUpdated;
|
||||||
|
public DateTimeImmutable $DateAnnounced;
|
||||||
|
public string $ShipmentMethodName;
|
||||||
|
public int $StatusId;
|
||||||
|
public string $StatusMessage;
|
||||||
|
public array $Documents;
|
||||||
|
public ?string $TrackingNumber = null;
|
||||||
|
public ?string $TrackingUrl = null;
|
||||||
|
public ?array $Errors;
|
||||||
|
|
||||||
|
public function GetDocumentByType(string $type): ?Document
|
||||||
|
{
|
||||||
|
/** @var Document $item */
|
||||||
|
foreach ($this->Documents as $item)
|
||||||
|
if ($item->Type == $type)
|
||||||
|
return $item;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static function fromApiResponse(object $data): ParcelResponse
|
||||||
|
{
|
||||||
|
$obj = new ParcelResponse();
|
||||||
|
$obj->Address = $data->address_divided->street;
|
||||||
|
$obj->Address2 = $data->address_2;
|
||||||
|
$obj->HouseNumber = $data->address_divided->house_number;
|
||||||
|
$obj->CarrierCode = $data->carrier->code;
|
||||||
|
$obj->City = $data->city;
|
||||||
|
$obj->CompanyName = $data->company_name;
|
||||||
|
$obj->Country = $data->country->iso_2;
|
||||||
|
$obj->CustomsInvoiceNr = $data->customs_invoice_nr;
|
||||||
|
$obj->CustomsShipmentType = $data->customs_shipment_type;
|
||||||
|
$obj->DateCreated = new DateTimeImmutable($data->date_created);
|
||||||
|
$obj->DateUpdated = new DateTimeImmutable($data->date_updated);
|
||||||
|
$obj->DateAnnounced = new DateTimeImmutable($data->date_announced);
|
||||||
|
$obj->EMail = $data->email;
|
||||||
|
$obj->Id = $data->id;
|
||||||
|
$obj->Name = $data->name;
|
||||||
|
$obj->OrderNumber = $data->order_number;
|
||||||
|
$obj->ParcelItems = array_map(fn($item)=>ParcelItem::fromApiResponse($item), $data->parcel_items);
|
||||||
|
$obj->PostalCode = $data->postal_code;
|
||||||
|
$obj->ExternalReference = $data->external_reference;
|
||||||
|
$obj->ShippingMethodId = $data->shipment->id;
|
||||||
|
$obj->ShipmentMethodName = $data->shipment->name;
|
||||||
|
$obj->StatusId = $data->status->id;
|
||||||
|
$obj->StatusMessage = $data->status->message;
|
||||||
|
$obj->Documents = array_map(fn($item)=>Document::fromApiResponse($item), $data->documents);
|
||||||
|
$obj->Telephone = $data->telephone;
|
||||||
|
$obj->TotalInsuredValue = $data->total_insured_value;
|
||||||
|
$obj->TotalOrderValue = $data->total_order_value;
|
||||||
|
$obj->TotalOrderValueCurrency = $data->total_order_value_currency;
|
||||||
|
$obj->TrackingNumber = $data->tracking_number;
|
||||||
|
$obj->TrackingUrl = $data->tracking_url;
|
||||||
|
$obj->Weight = $data->weight;
|
||||||
|
$obj->Length = $data->length;
|
||||||
|
$obj->Height = $data->height;
|
||||||
|
$obj->Width = $data->width;
|
||||||
|
$obj->IsReturn = $data->is_return;
|
||||||
|
$obj->Errors = $data->errors->non_field_errors;
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud\Data;
|
||||||
|
|
||||||
|
class SenderAddress {
|
||||||
|
public ?string $City;
|
||||||
|
public ?string $CompanyName;
|
||||||
|
public ?string $ContactName;
|
||||||
|
public string $Country;
|
||||||
|
public ?string $CountryState;
|
||||||
|
public ?string $Email;
|
||||||
|
public ?string $HouseNumber;
|
||||||
|
public int $Id;
|
||||||
|
public ?string $PostalBox;
|
||||||
|
public ?string $PostalCode;
|
||||||
|
public ?string $Street;
|
||||||
|
public ?string $Telephone;
|
||||||
|
public ?string $VatNumber;
|
||||||
|
public ?string $EoriNumber;
|
||||||
|
public int $BrandId;
|
||||||
|
public ?string $Label;
|
||||||
|
public ?string $SignatureFullName;
|
||||||
|
public ?string $SignatureInitials;
|
||||||
|
|
||||||
|
public function __toString(): string
|
||||||
|
{
|
||||||
|
return "$this->CompanyName; $this->ContactName; $this->Street $this->HouseNumber; $this->PostalCode; $this->City";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static function fromApiResponse(object $data): SenderAddress {
|
||||||
|
$obj = new SenderAddress();
|
||||||
|
$obj->City = $data->city;
|
||||||
|
$obj->CompanyName = $data->company_name;
|
||||||
|
$obj->ContactName = $data->contact_name;
|
||||||
|
$obj->Country = $data->country;
|
||||||
|
$obj->CountryState = $data->country_state;
|
||||||
|
$obj->Email = $data->email;
|
||||||
|
$obj->HouseNumber = $data->house_number;
|
||||||
|
$obj->Id = $data->id;
|
||||||
|
$obj->PostalBox = $data->postal_box;
|
||||||
|
$obj->PostalCode = $data->postal_code;
|
||||||
|
$obj->Street = $data->street;
|
||||||
|
$obj->Telephone = $data->telephone;
|
||||||
|
$obj->VatNumber = $data->vat_number;
|
||||||
|
$obj->EoriNumber = $data->eori_number;
|
||||||
|
$obj->BrandId = $data->brand_id;
|
||||||
|
$obj->Label = $data->label;
|
||||||
|
$obj->SignatureFullName = $data->signature_full_name;
|
||||||
|
$obj->SignatureInitials = $data->signature_initials;
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud\Data;
|
||||||
|
|
||||||
|
class ShippingMethod {
|
||||||
|
public int $Id;
|
||||||
|
public string $Name;
|
||||||
|
public ?string $Carrier;
|
||||||
|
public int $MinWeight;
|
||||||
|
public int $MaxWeight;
|
||||||
|
public int $MaxLength;
|
||||||
|
public int $MaxWidth;
|
||||||
|
public int $MaxHeight;
|
||||||
|
public string $Unit;
|
||||||
|
|
||||||
|
public static function fromApiResponse(object $data):ShippingMethod {
|
||||||
|
$obj = new ShippingMethod();
|
||||||
|
$obj->Id = $data->id;
|
||||||
|
$obj->Name = $data->name;
|
||||||
|
$obj->Carrier = $data->carrier ?? null;
|
||||||
|
$obj->MinWeight = $data->properties->min_weight;
|
||||||
|
$obj->MaxWeight = $data->properties->max_weight;
|
||||||
|
$obj->MaxLength = $data->properties->max_dimensions->length;
|
||||||
|
$obj->MaxWidth = $data->properties->max_dimensions->width;
|
||||||
|
$obj->MaxHeight = $data->properties->max_dimensions->height;
|
||||||
|
$obj->Unit = $data->properties->max_dimensions->unit;
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud\Data;
|
||||||
|
|
||||||
|
class ShippingProduct {
|
||||||
|
public string $Name;
|
||||||
|
public string $Carrier;
|
||||||
|
public string $ServicePointsCarrier;
|
||||||
|
public string $Code;
|
||||||
|
public int $MinWeight;
|
||||||
|
public int $MaxWeight;
|
||||||
|
public array $ShippingMethods;
|
||||||
|
|
||||||
|
public static function fromApiResponse(object $data): ShippingProduct {
|
||||||
|
$obj = new ShippingProduct();
|
||||||
|
$obj->Name = $data->name;
|
||||||
|
$obj->Carrier = $data->carrier;
|
||||||
|
$obj->ServicePointsCarrier = $data->service_points_carrier;
|
||||||
|
$obj->Code = $data->code;
|
||||||
|
$obj->MinWeight = $data->weight_range->min_weight;
|
||||||
|
$obj->MaxWeight = $data->weight_range->max_weight;
|
||||||
|
foreach ($data->methods as $method) {
|
||||||
|
$child = ShippingMethod::fromApiResponse($method);
|
||||||
|
$child->Carrier = $obj->Carrier;
|
||||||
|
$obj->ShippingMethods[] = $child;
|
||||||
|
}
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,163 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use Xentral\Carrier\SendCloud\Data\Document;
|
||||||
|
use Xentral\Carrier\SendCloud\Data\ParcelCreation;
|
||||||
|
use Xentral\Carrier\SendCloud\Data\ParcelResponse;
|
||||||
|
use Xentral\Carrier\SendCloud\Data\SenderAddress;
|
||||||
|
use Xentral\Carrier\SendCloud\Data\ShippingProduct;
|
||||||
|
|
||||||
|
class SendCloudApi
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var ?string $public_key
|
||||||
|
*/
|
||||||
|
protected ?string $public_key;
|
||||||
|
/**
|
||||||
|
* @var ?string $private_key
|
||||||
|
*/
|
||||||
|
protected ?string $private_key;
|
||||||
|
|
||||||
|
const PROD_BASE_URI = 'https://panel.sendcloud.sc/api/v2';
|
||||||
|
|
||||||
|
public function __construct($public_key, $private_key)
|
||||||
|
{
|
||||||
|
$this->public_key = $public_key;
|
||||||
|
$this->private_key = $private_key;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws SendcloudApiException
|
||||||
|
*/
|
||||||
|
public function GetSenderAddresses(): array
|
||||||
|
{
|
||||||
|
$uri = self::PROD_BASE_URI . '/user/addresses/sender';
|
||||||
|
$response = $this->sendRequest($uri);
|
||||||
|
foreach ($response['body']->sender_addresses as $item)
|
||||||
|
$res[] = SenderAddress::fromApiResponse($item);
|
||||||
|
return $res ?? [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws SendcloudApiException
|
||||||
|
*/
|
||||||
|
public function GetShippingProducts(string $sourceCountry, ?string $targetCountry = null, ?int $weight = null,
|
||||||
|
?int $height = null, ?int $length = null, ?int $width = null): array
|
||||||
|
{
|
||||||
|
$uri = self::PROD_BASE_URI . '/shipping-products';
|
||||||
|
$params = ['from_country' => $sourceCountry];
|
||||||
|
if ($targetCountry !== null)
|
||||||
|
$params['to_country'] = $targetCountry;
|
||||||
|
if ($weight !== null && $weight > 0)
|
||||||
|
$params['weight'] = $weight;
|
||||||
|
if ($height !== null && $height > 0) {
|
||||||
|
$params['height'] = $height;
|
||||||
|
$params['height_unit'] = 'centimeter';
|
||||||
|
}
|
||||||
|
if ($length !== null && $length > 0) {
|
||||||
|
$params['length'] = $length;
|
||||||
|
$params['length_unit'] = 'centimeter';
|
||||||
|
}
|
||||||
|
if ($width !== null && $width > 0) {
|
||||||
|
$params['width'] = $width;
|
||||||
|
$params['width_unit'] = 'centimeter';
|
||||||
|
}
|
||||||
|
$response = $this->sendRequest($uri, $params);
|
||||||
|
return array_map(fn($x) => ShippingProduct::fromApiResponse($x), $response['body'] ?? []);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws SendcloudApiException
|
||||||
|
*/
|
||||||
|
public function CreateParcel(ParcelCreation $parcel): ParcelResponse|string|null
|
||||||
|
{
|
||||||
|
$uri = self::PROD_BASE_URI . '/parcels';
|
||||||
|
$response = $this->sendRequest($uri, null, true, ['parcel' => $parcel->toApiRequest()], [200,400]);
|
||||||
|
switch ($response['code']) {
|
||||||
|
case 200:
|
||||||
|
if (isset($response['body']->parcel))
|
||||||
|
try {
|
||||||
|
return ParcelResponse::fromApiResponse($response['body']->parcel);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
throw new SendcloudApiException(previous: $e);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 400:
|
||||||
|
if (isset($response->error))
|
||||||
|
return $response->error->message;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
throw SendcloudApiException::fromResponse($response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws SendcloudApiException
|
||||||
|
*/
|
||||||
|
public function DownloadDocument(Document $document): string
|
||||||
|
{
|
||||||
|
$curl = curl_init();
|
||||||
|
curl_setopt_array($curl, [
|
||||||
|
CURLOPT_RETURNTRANSFER => 1,
|
||||||
|
CURLOPT_URL => $document->Link,
|
||||||
|
CURLOPT_HTTPHEADER => [
|
||||||
|
"Authorization: Basic " . base64_encode($this->public_key . ':' . $this->private_key)
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
$output = curl_exec($curl);
|
||||||
|
$code = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
|
||||||
|
if ($code != 200)
|
||||||
|
throw SendcloudApiException::fromResponse(['code' => $code, 'body' => $output]);
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws SendcloudApiException
|
||||||
|
*/
|
||||||
|
function sendRequest(string $uri, array $query_params = null, bool $post = false, array $postFields = null,
|
||||||
|
array $allowedResponseCodes = [200]): ?array
|
||||||
|
{
|
||||||
|
if (empty($this->public_key) || empty($this->private_key))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
$curl = curl_init();
|
||||||
|
if (is_array($query_params)) {
|
||||||
|
$uri .= '?' . http_build_query($query_params);
|
||||||
|
}
|
||||||
|
curl_setopt_array($curl, [
|
||||||
|
CURLOPT_RETURNTRANSFER => 1,
|
||||||
|
CURLOPT_URL => $uri,
|
||||||
|
CURLOPT_HTTPHEADER => [
|
||||||
|
"Authorization: Basic " . base64_encode($this->public_key . ':' . $this->private_key),
|
||||||
|
'Content-Type: application/json'
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
if ($post === true) {
|
||||||
|
curl_setopt_array($curl, [
|
||||||
|
CURLOPT_POST => true,
|
||||||
|
CURLOPT_POSTFIELDS => json_encode($postFields)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = json_decode(curl_exec($curl));
|
||||||
|
$code = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
|
||||||
|
curl_close($curl);
|
||||||
|
|
||||||
|
$ret = [
|
||||||
|
'code' => $code,
|
||||||
|
'body' => $output,
|
||||||
|
];
|
||||||
|
|
||||||
|
if (!in_array($code, $allowedResponseCodes))
|
||||||
|
throw SendcloudApiException::fromResponse($ret);
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Carrier\SendCloud;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
|
||||||
|
class SendcloudApiException extends Exception
|
||||||
|
{
|
||||||
|
public static function fromResponse(array $response) : SendcloudApiException {
|
||||||
|
if (!isset($response['body']) || !is_object($response['body']))
|
||||||
|
return new SendcloudApiException(print_r($response,true));
|
||||||
|
|
||||||
|
return new SendcloudApiException(
|
||||||
|
print_r($response['body'],true),
|
||||||
|
$response['code']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -66,7 +66,7 @@ final class DatabaseLogHandler extends AbstractLogHandler
|
||||||
$sql = 'INSERT INTO `log`
|
$sql = 'INSERT INTO `log`
|
||||||
(`log_time`, `level`, `message`, `class`, `method`, `line`, `origin_type`, `origin_detail`, `dump`)
|
(`log_time`, `level`, `message`, `class`, `method`, `line`, `origin_type`, `origin_detail`, `dump`)
|
||||||
VALUES
|
VALUES
|
||||||
(NOW(), :level, :message, :class, :method, :line, :origin_type, :origin_detail, :dump)';
|
(NOW(3), :level, :message, :class, :method, :line, :origin_type, :origin_detail, :dump)';
|
||||||
$this->db->perform($sql, $values);
|
$this->db->perform($sql, $values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ final class ImapMailClient implements MailClientInterface
|
||||||
$message = $this->imap->getMessage($msgNumber);
|
$message = $this->imap->getMessage($msgNumber);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new MessageNotFoundException(
|
throw new MessageNotFoundException(
|
||||||
sprintf('Message number %s not found.', $msgNumber)
|
sprintf("Message number %s could not be fetched.\n\r%s", $msgNumber,print_r($e,true))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,40 +51,95 @@ class MailAttachmentData implements MailAttachmentInterface
|
||||||
$this->cid = $cid;
|
$this->cid = $cid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Check the type of Attachment
|
||||||
|
Possible results: application/octet-stream, attachment, inline
|
||||||
|
*/
|
||||||
|
public static function getAttachmentPartType(MailMessagePartInterface $part): ?string {
|
||||||
|
|
||||||
|
if (!$part->isMultipart()) {
|
||||||
|
$header = $part->getHeader('content-disposition');
|
||||||
|
if ($header !== null) {
|
||||||
|
$split = explode(';', $header->getValue());
|
||||||
|
if ($split[0] === 'attachment') {
|
||||||
|
return ('attachment');
|
||||||
|
} else if ($split[0] === 'inline') {
|
||||||
|
return ('inline');
|
||||||
|
}
|
||||||
|
} else { // Check for application/octet-stream
|
||||||
|
$content_type = $part->getContentType();
|
||||||
|
if ($content_type == 'application/octet-stream') {
|
||||||
|
return('application/octet-stream');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return(null);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param MailMessagePartInterface $part
|
* @param MailMessagePartInterface $part
|
||||||
*
|
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*
|
*
|
||||||
* @return MailAttachmentData
|
* @return MailAttachmentData
|
||||||
*/
|
*/
|
||||||
public static function fromMailMessagePart(MailMessagePartInterface $part): MailAttachmentData
|
public static function fromMailMessagePart(MailMessagePartInterface $part): MailAttachmentData
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$attachmenttype = MailAttachmentData::getAttachmentPartType($part);
|
||||||
|
|
||||||
|
if ($attachmenttype == null) {
|
||||||
|
throw new InvalidArgumentException('object is no attachment');
|
||||||
|
}
|
||||||
|
|
||||||
|
$disposition = $part->getHeaderValue('content-disposition');
|
||||||
|
if ($disposition == null) {
|
||||||
|
$disposition = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$disposition = str_replace(["\n\r", "\n", "\r"], '', $disposition);
|
||||||
|
|
||||||
|
// file_put_contents('debug.txt',date("HH:mm:ss")."\nDispo: ".$disposition); // FILE_APPEND
|
||||||
|
|
||||||
|
// Determine filename
|
||||||
|
/*
|
||||||
|
Content-Disposition: inline
|
||||||
|
Content-Disposition: attachment
|
||||||
|
Content-Disposition: attachment; filename="filename.jpg"
|
||||||
|
|
||||||
|
This is not correctly implemented -> only the first string is evaluated
|
||||||
|
Content-Disposition: attachment; filename*0="filename_that_is_"
|
||||||
|
Content-Disposition: attachment; filename*1="very_long.jpg"
|
||||||
|
*/
|
||||||
|
$filename = 'OpenXE_file.unknown';
|
||||||
|
if (preg_match('/(.+);\s*filename(?:\*[0-9]){0,1}="*([^"]+)"*.*$/m', $disposition, $matches)) { // Filename in disposition
|
||||||
|
$filename = $matches[2];
|
||||||
|
} else {
|
||||||
|
$contenttype = $part->getHeaderValue('content-type');
|
||||||
|
|
||||||
|
$contenttype = str_replace(["\n\r", "\n", "\r"], '', $contenttype);
|
||||||
|
|
||||||
|
// file_put_contents('debug.txt',date("HH:mm:ss")."\nConttype: ".$contenttype,FILE_APPEND); // FILE_APPEND
|
||||||
|
|
||||||
|
if (preg_match('/(.+);\s*name(?:\*[0-9]){0,1}="*([^"]+)"*.*$/m', $contenttype, $matches)) { // Name in content-type
|
||||||
|
$filename = $matches[2];
|
||||||
|
} else if ($contenttype == 'message/rfc822') { // RFC822 message
|
||||||
|
$filename = 'ForwardedMessage.eml';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$encodingHeader = $part->getHeader('content-transfer-encoding');
|
$encodingHeader = $part->getHeader('content-transfer-encoding');
|
||||||
if ($encodingHeader === null) {
|
if ($encodingHeader === null) {
|
||||||
throw new InvalidArgumentException('missing header: "Content-Transfer-Encoding"');
|
$content_transfer_encoding = '';
|
||||||
|
} else {
|
||||||
|
$content_transfer_encoding = $encodingHeader->getValue();
|
||||||
}
|
}
|
||||||
$encoding = $encodingHeader->getValue();
|
|
||||||
$dispositionHeader = $part->getHeader('content-disposition');
|
|
||||||
if ($dispositionHeader === null) {
|
|
||||||
throw new InvalidArgumentException('missing header: "Content-Disposition"');
|
|
||||||
}
|
|
||||||
$disposition = $dispositionHeader->getValue();
|
|
||||||
|
|
||||||
if (!preg_match('/(.+);\s*filename="([^"]+)".*$/m', $disposition, $matches)) {
|
|
||||||
throw new InvalidArgumentException(
|
|
||||||
sprintf('unexpected header value "Content-Disposition" = %s', $disposition)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$isInline = strtolower($matches[1]) === 'inline';
|
|
||||||
$filename = $matches[2];
|
|
||||||
|
|
||||||
// Thunderbird UTF URL-Format
|
// Thunderbird UTF URL-Format
|
||||||
$UTF_pos = strpos($filename,'UTF-8\'\'');
|
$UTF_pos = strpos($filename,'UTF-8\'\'');
|
||||||
if ($UTF_pos !== false) {
|
if ($UTF_pos !== false) {
|
||||||
|
|
||||||
$wasUTF = "JA";
|
$wasUTF = "JA";
|
||||||
|
|
||||||
$filename = substr($filename,$UTF_pos);
|
$filename = substr($filename,$UTF_pos);
|
||||||
$filename = rawurldecode($filename);
|
$filename = rawurldecode($filename);
|
||||||
}
|
}
|
||||||
|
|
@ -97,13 +152,24 @@ class MailAttachmentData implements MailAttachmentInterface
|
||||||
$cid = $cidMatches[1];
|
$cid = $cidMatches[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($attachmenttype == 'inline' && $cid != null) {
|
||||||
|
$filename = "cid:".$cid;
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = $part->getContent();
|
||||||
|
if ($content === null) { // This should not be
|
||||||
|
// file_put_contents('debug.txt',date("HH:mm:ss")."\n".print_r($part,true)); // FILE_APPEND
|
||||||
|
throw new InvalidArgumentException(
|
||||||
|
sprintf('content is null "%s"', substr(print_r($part,true),0,1000))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return new self(
|
return new self(
|
||||||
$filename,
|
$filename,
|
||||||
$part->getContent(),
|
$content,
|
||||||
$part->getContentType(),
|
$part->getContentType(),
|
||||||
$encoding,
|
$content_transfer_encoding,
|
||||||
$isInline,
|
$attachmenttype == 'inline',
|
||||||
$cid
|
$cid
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||||
namespace Xentral\Components\MailClient\Data;
|
namespace Xentral\Components\MailClient\Data;
|
||||||
|
|
||||||
use DateTime;
|
use DateTime;
|
||||||
|
use DateTimeImmutable;
|
||||||
use DateTimeInterface;
|
use DateTimeInterface;
|
||||||
use JsonSerializable;
|
use JsonSerializable;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
@ -147,6 +148,7 @@ final class MailMessageData implements MailMessageInterface, JsonSerializable
|
||||||
$parts = [];
|
$parts = [];
|
||||||
$this->findAttachmentParts($this->contentPart, $parts);
|
$this->findAttachmentParts($this->contentPart, $parts);
|
||||||
$attachments = [];
|
$attachments = [];
|
||||||
|
|
||||||
foreach ($parts as $part) {
|
foreach ($parts as $part) {
|
||||||
$attachments[] = MailAttachmentData::fromMailMessagePart($part);
|
$attachments[] = MailAttachmentData::fromMailMessagePart($part);
|
||||||
}
|
}
|
||||||
|
|
@ -162,18 +164,16 @@ final class MailMessageData implements MailMessageInterface, JsonSerializable
|
||||||
*/
|
*/
|
||||||
private function findAttachmentParts(MailMessagePartInterface $part, array &$resultArray): void
|
private function findAttachmentParts(MailMessagePartInterface $part, array &$resultArray): void
|
||||||
{
|
{
|
||||||
try {
|
|
||||||
$header = $part->getHeader('content-disposition');
|
|
||||||
$split = explode(';', $header->getValue());
|
|
||||||
if ($split[0] === 'attachment' || $split[0] === 'inline') {
|
|
||||||
$resultArray[] = $part;
|
|
||||||
|
|
||||||
return;
|
if ($part->isMultipart()) {
|
||||||
}
|
// Recurse subparts
|
||||||
} catch (Throwable $e) {
|
|
||||||
for ($i = 0; $i < $part->countParts(); $i++) {
|
for ($i = 0; $i < $part->countParts(); $i++) {
|
||||||
$this->findAttachmentParts($part->getPart($i), $resultArray);
|
$this->findAttachmentParts($part->getPart($i), $resultArray);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (MailAttachmentData::getAttachmentPartType($part) != null) {
|
||||||
|
$resultArray[] = $part;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -308,13 +308,13 @@ final class MailMessageData implements MailMessageInterface, JsonSerializable
|
||||||
if ($date === null) {
|
if ($date === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$dateTime = DateTime::createFromFormat(DateTimeInterface::RFC2822, $date->getValue());
|
/* $dateTime = date_create($date->getValue());
|
||||||
if ($dateTime === false) {
|
|
||||||
$dateTime = DateTime::createFromFormat(DateTimeInterface::RFC822, $date->getValue());
|
|
||||||
}
|
|
||||||
if ($dateTime === false) {
|
if ($dateTime === false) {
|
||||||
|
throw new InvalidArgumentException('Invalid date: '.$date->getValue());
|
||||||
return null;
|
return null;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
$dateTime = new DateTimeImmutable($date->getValue());
|
||||||
|
|
||||||
return $dateTime;
|
return $dateTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,18 @@ final class MailMessagePartData implements MailMessagePartInterface, JsonSeriali
|
||||||
return $this->headers[strtolower($name)];
|
return $this->headers[strtolower($name)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getHeaderValue(string $name): ?string
|
||||||
|
{
|
||||||
|
$header = $this->getHeader($name);
|
||||||
|
if ($header == null) {
|
||||||
|
return (null);
|
||||||
|
}
|
||||||
|
return($header->getValue());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|
@ -97,6 +109,33 @@ final class MailMessagePartData implements MailMessagePartInterface, JsonSeriali
|
||||||
return $split[0];
|
return $split[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getCharset(): ?string
|
||||||
|
{
|
||||||
|
$header = $this->getHeader('content-type');
|
||||||
|
if ($header === null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
$pattern = "/([a-zA-Z]*[\/]*[a-zA-Z]*);[a-zA-Z\n\t\r0-9 ]*charset=\"([a-zA-Z-0-9]+)\"/i";
|
||||||
|
$matches = array();
|
||||||
|
if (preg_match(
|
||||||
|
$pattern,
|
||||||
|
$header->getValue(),
|
||||||
|
$matches
|
||||||
|
)) {
|
||||||
|
if (count($matches) >= 3) {
|
||||||
|
return($matches[2]);
|
||||||
|
} else {
|
||||||
|
return(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|
@ -116,17 +155,30 @@ final class MailMessagePartData implements MailMessagePartInterface, JsonSeriali
|
||||||
/**
|
/**
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function getDecodedContent(): ?string
|
public function getDecodedContent(string $to_charset = 'UTF-8'): ?string
|
||||||
{
|
{
|
||||||
|
$result = '';
|
||||||
if ($this->content === null) {
|
if ($this->content === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$encodingHeader = $this->getHeader('content-transfer-encoding');
|
$encodingHeader = $this->getHeader('content-transfer-encoding');
|
||||||
if ($encodingHeader === null ) {
|
if ($encodingHeader === null ) {
|
||||||
return $this->content;
|
$result = $this->content;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$result = $this->decode($this->content, $encodingHeader->getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->decode($this->content, $encodingHeader->getValue());
|
$charset = $this->getCharset();
|
||||||
|
|
||||||
|
// throw new InvalidArgumentException('Charset is '.$charset." Text is: ".$result);
|
||||||
|
|
||||||
|
$converted = mb_convert_encoding(
|
||||||
|
$result,
|
||||||
|
$to_charset,
|
||||||
|
$charset
|
||||||
|
);
|
||||||
|
return($converted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ final class ErrorPageData implements JsonSerializable
|
||||||
public function __construct($exception, $title = null)
|
public function __construct($exception, $title = null)
|
||||||
{
|
{
|
||||||
$this->exception = $exception;
|
$this->exception = $exception;
|
||||||
$this->title = !empty($title) ? (string)$title : 'OpenXE: Es ist ein unerwarteter Fehler aufgetreten!';
|
$this->title = !empty($title) ? (string)$title : 'DBXE: Es ist ein unerwarteter Fehler aufgetreten!';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ final class Psr4ClassNameResolver
|
||||||
{
|
{
|
||||||
// Normalize inputs
|
// Normalize inputs
|
||||||
$prefix = trim($prefix, '\\') . '\\';
|
$prefix = trim($prefix, '\\') . '\\';
|
||||||
$baseDir = rtrim($baseDir, '/') . '/';
|
$baseDir = rtrim($baseDir, '/\\') . DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
$this->prefixes[$prefix] = $baseDir;
|
$this->prefixes[$prefix] = $baseDir;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,11 @@ final class MultiDbArrayHydrator
|
||||||
$description = !empty($item['description']) ? $item['description'] : $defaultConfig->WFdbname;
|
$description = !empty($item['description']) ? $item['description'] : $defaultConfig->WFdbname;
|
||||||
|
|
||||||
// Cronjobs nur aktivieren, wenn Einstellung vorhanden und gesetzt (Default `false`).
|
// Cronjobs nur aktivieren, wenn Einstellung vorhanden und gesetzt (Default `false`).
|
||||||
|
if (array_key_exists('cronjob',$item)) {
|
||||||
$cronjobsActive = (int)$item['cronjob'] === 1;
|
$cronjobsActive = (int)$item['cronjob'] === 1;
|
||||||
|
} else {
|
||||||
|
$cronjobsActive = false;
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($item['dbname']) && $defaultConfig->WFdbname === $item['dbname']) {
|
if(!empty($item['dbname']) && $defaultConfig->WFdbname === $item['dbname']) {
|
||||||
$item = [];
|
$item = [];
|
||||||
|
|
|
||||||
|
|
@ -492,6 +492,8 @@ final class ReportService
|
||||||
$testResult['messagetype'] = 'error';
|
$testResult['messagetype'] = 'error';
|
||||||
$testResult['message'] = sprintf("QUERY FAILED:\n%s", $e->getMessage());
|
$testResult['message'] = sprintf("QUERY FAILED:\n%s", $e->getMessage());
|
||||||
|
|
||||||
|
$testResult['message'] .= "\n\r".$compiled;
|
||||||
|
|
||||||
return $testResult;
|
return $testResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -500,6 +502,9 @@ final class ReportService
|
||||||
if(count($rows) < 101){
|
if(count($rows) < 101){
|
||||||
$message = sprintf('Query successful: %s datasets found', count($rows));
|
$message = sprintf('Query successful: %s datasets found', count($rows));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$message .= "\n\r".print_r($rows[0],true);
|
||||||
|
|
||||||
$testResult = [
|
$testResult = [
|
||||||
'messagetype' => 'success',
|
'messagetype' => 'success',
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Modules\ShippingMethod\Model;
|
||||||
|
|
||||||
|
class CreateShipmentResult
|
||||||
|
{
|
||||||
|
public bool $Success = false;
|
||||||
|
public array $Errors = [];
|
||||||
|
public ?string $Label;
|
||||||
|
public ?string $ExportDocuments;
|
||||||
|
public ?string $TrackingNumber;
|
||||||
|
public ?string $TrackingUrl;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Modules\ShippingMethod\Model;
|
||||||
|
|
||||||
|
class CustomsInfo
|
||||||
|
{
|
||||||
|
const CUSTOMS_TYPE_GIFT = 0;
|
||||||
|
const CUSTOMS_TYPE_DOCUMENTS = 1;
|
||||||
|
const CUSTOMS_TYPE_GOODS = 2;
|
||||||
|
const CUSTOMS_TYPE_SAMPLE = 3;
|
||||||
|
const CUSTOMS_TYPE_RETURN = 4;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Modules\ShippingMethod\Model;
|
||||||
|
|
||||||
|
class Product
|
||||||
|
{
|
||||||
|
const SERVICE_COD = 'cod';
|
||||||
|
const SERVICE_PREMIUM = 'premium';
|
||||||
|
|
||||||
|
public string $Id;
|
||||||
|
public string $Name;
|
||||||
|
public float $LengthMin = 0;
|
||||||
|
public float $LengthMax = 500;
|
||||||
|
public float $WidthMin = 0;
|
||||||
|
public float $WidthMax = 500;
|
||||||
|
public float $HeightMin = 0;
|
||||||
|
public float $HeightMax = 500;
|
||||||
|
public float $WeightMin = 0;
|
||||||
|
public float $WeightMax = 100;
|
||||||
|
public array $AvailableServices = [];
|
||||||
|
|
||||||
|
public static function Create(string $id, string $name):Product {
|
||||||
|
$obj = new Product();
|
||||||
|
$obj->Id = $id;
|
||||||
|
$obj->Name = $name;
|
||||||
|
return $obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function WithLength(float $min, float $max): Product {
|
||||||
|
$this->LengthMin = $min;
|
||||||
|
$this->LengthMax = $max;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function WithWidth(float $min, float $max): Product {
|
||||||
|
$this->WidthMin = $min;
|
||||||
|
$this->WidthMax = $max;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function WithHeight(float $min, float $max): Product {
|
||||||
|
$this->HeightMin = $min;
|
||||||
|
$this->HeightMax = $max;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function WithWeight(float $min, float $max): Product {
|
||||||
|
$this->WeightMin = $min;
|
||||||
|
$this->WeightMax = $max;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function WithServices(array $services): Product {
|
||||||
|
$this->AvailableServices = $services;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,10 @@
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
* SPDX-FileCopyrightText: 2019 Xentral (c) Xentral ERP Software GmbH, Fuggerstrasse 11, D-86150 Augsburg, Germany
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
var ShippingMethodCreate = function ($) {
|
var ShippingMethodCreate = function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
@ -11,35 +18,14 @@ var ShippingMethodCreate = function ($) {
|
||||||
vueElementId: '#shipment-create',
|
vueElementId: '#shipment-create',
|
||||||
},
|
},
|
||||||
search: function (el) {
|
search: function (el) {
|
||||||
$.ajax({
|
let val = $(el).val().toLowerCase();
|
||||||
url: 'index.php?module=versandarten&action=create&cmd=suche',
|
$('.createbutton').each(function() {
|
||||||
type: 'POST',
|
let desc = $(this).find('.tilegrid-tile-title').text();
|
||||||
dataType: 'json',
|
if (desc.toLowerCase().indexOf(val)>=0)
|
||||||
data: {
|
$(this).show();
|
||||||
val: $(el).val()
|
else
|
||||||
}
|
$(this).hide();
|
||||||
})
|
})
|
||||||
.done(function (data) {
|
|
||||||
if (typeof data != 'undefined' && data != null) {
|
|
||||||
if (typeof data.ausblenden != 'undefined' && data.ausblenden != null) {
|
|
||||||
me.storage.hideElements = data.ausblenden.split(';');
|
|
||||||
$.each(me.storage.hideElements, function (k, v) {
|
|
||||||
if (v != '') {
|
|
||||||
$('#' + v).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
if (typeof data.anzeigen != 'undefined' && data.anzeigen != null) {
|
|
||||||
me.storage.showElements = data.anzeigen.split(';');
|
|
||||||
$.each(me.storage.showElements, function (k, v) {
|
|
||||||
if (v != '') {
|
|
||||||
$('#' + v).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
init: function () {
|
init: function () {
|
||||||
if ($(me.selector.vueElementId).length === 0) {
|
if ($(me.selector.vueElementId).length === 0) {
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ final class Shopware6Client
|
||||||
|
|
||||||
$request = new ClientRequest(
|
$request = new ClientRequest(
|
||||||
$method,
|
$method,
|
||||||
$this->url . 'v2/' . $endpoint,
|
$this->url . $endpoint,
|
||||||
$headerInformation,
|
$headerInformation,
|
||||||
empty($body) ? null : json_encode($body)
|
empty($body) ? null : json_encode($body)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,17 @@
|
||||||
<?php
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
* SPDX-FileCopyrightText: 2019 Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Xentral\Modules\SubscriptionCycle;
|
namespace Xentral\Modules\SubscriptionCycle;
|
||||||
|
|
||||||
use Aboabrechnung;
|
use Aboabrechnung;
|
||||||
|
use Sabre\CalDAV\Subscriptions\Subscription;
|
||||||
use Xentral\Components\SchemaCreator\Collection\SchemaCollection;
|
use Xentral\Components\SchemaCreator\Collection\SchemaCollection;
|
||||||
use Xentral\Components\SchemaCreator\Schema\TableSchema;
|
use Xentral\Components\SchemaCreator\Schema\TableSchema;
|
||||||
use Xentral\Components\SchemaCreator\Type;
|
use Xentral\Components\SchemaCreator\Type;
|
||||||
|
|
@ -35,6 +42,7 @@ final class Bootstrap
|
||||||
'SubscriptionCycleJobService' => 'onInitSubscriptionCycleJobService',
|
'SubscriptionCycleJobService' => 'onInitSubscriptionCycleJobService',
|
||||||
'SubscriptionCycleFullTask' => 'onInitSubscriptionCycleFullTask',
|
'SubscriptionCycleFullTask' => 'onInitSubscriptionCycleFullTask',
|
||||||
'TaskMutexService' => 'onInitTaskMutexService',
|
'TaskMutexService' => 'onInitTaskMutexService',
|
||||||
|
'SubscriptionModule' => 'onInitSubscriptionModule'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -60,20 +68,12 @@ final class Bootstrap
|
||||||
*/
|
*/
|
||||||
public static function onInitSubscriptionCycleManualJobTask(ContainerInterface $container
|
public static function onInitSubscriptionCycleManualJobTask(ContainerInterface $container
|
||||||
): SubscriptionCycleManualJobTask {
|
): SubscriptionCycleManualJobTask {
|
||||||
$legacyApp = $container->get('LegacyApplication');
|
|
||||||
|
|
||||||
$subscriptionCycleModule = $legacyApp->loadModule('rechnungslauf');
|
|
||||||
$subscriptionModule = new Aboabrechnung($legacyApp);
|
|
||||||
$subscriptionModule->cronjob = true;
|
|
||||||
|
|
||||||
return new SubscriptionCycleManualJobTask(
|
return new SubscriptionCycleManualJobTask(
|
||||||
$legacyApp,
|
$container->get('LegacyApplication'),
|
||||||
$container->get('Database'),
|
$container->get('Database'),
|
||||||
$container->get('TaskMutexService'),
|
$container->get('TaskMutexService'),
|
||||||
$container->get('SubscriptionCycleJobService'),
|
$container->get('SubscriptionCycleJobService'),
|
||||||
$subscriptionCycleModule,
|
$container->get('SubscriptionModule')
|
||||||
$subscriptionModule,
|
|
||||||
!empty($legacyApp->erp->GetKonfiguration('rechnungslauf_gruppen'))
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -210,22 +210,10 @@ final class Bootstrap
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public static function onInitSubscriptionModule(ContainerInterface $container): SubscriptionModule {
|
||||||
* @param SchemaCollection $collection
|
return new SubscriptionModule(
|
||||||
*
|
$container->get('LegacyApplication'),
|
||||||
* @return void
|
$container->get('Database')
|
||||||
*/
|
);
|
||||||
public static function registerTableSchemas(SchemaCollection $collection): void
|
|
||||||
{
|
|
||||||
$subscriptionCycleJob = new TableSchema('subscription_cycle_job');
|
|
||||||
$subscriptionCycleJob->addColumn(Type\Integer::asAutoIncrement('id'));
|
|
||||||
$subscriptionCycleJob->addColumn(new Type\Integer('address_id'));
|
|
||||||
$subscriptionCycleJob->addColumn(new Type\Varchar('document_type', 32));
|
|
||||||
$subscriptionCycleJob->addColumn(new Type\Varchar('job_type', 32));
|
|
||||||
$subscriptionCycleJob->addColumn(new Type\Integer('printer_id'));
|
|
||||||
$subscriptionCycleJob->addColumn(new Type\Timestamp('created_at', 'CURRENT_TIMESTAMP'));
|
|
||||||
$subscriptionCycleJob->addIndex(new Index\Primary(['id']));
|
|
||||||
$subscriptionCycleJob->addIndex(new Index\Index(['address_id']));
|
|
||||||
$collection->add($subscriptionCycleJob);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
* SPDX-FileCopyrightText: 2019 Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -16,52 +21,33 @@ use Xentral\Modules\SubscriptionCycle\SubscriptionModuleInterface;
|
||||||
|
|
||||||
final class SubscriptionCycleManualJobTask
|
final class SubscriptionCycleManualJobTask
|
||||||
{
|
{
|
||||||
/** @var ApplicationCore $app */
|
private ApplicationCore $app;
|
||||||
private $app;
|
private Database $db;
|
||||||
|
private SubscriptionCycleJobService $cycleJobService;
|
||||||
/** @var Database $db */
|
private TaskMutexServiceInterface $taskMutexService;
|
||||||
private $db;
|
private SubscriptionModuleInterface $subscriptionModule;
|
||||||
|
|
||||||
/** @var SubscriptionCycleJobService $cycleJobService */
|
|
||||||
private $cycleJobService;
|
|
||||||
|
|
||||||
/** @var TaskMutexServiceInterface $taskMutexService */
|
|
||||||
private $taskMutexService;
|
|
||||||
|
|
||||||
/** @var SubscriptionCycleModuleInterface $subscriptionCycleModule */
|
|
||||||
private $subscriptionCycleModule;
|
|
||||||
|
|
||||||
/** @var SubscriptionModuleInterface $subscriptionModule */
|
|
||||||
private $subscriptionModule;
|
|
||||||
|
|
||||||
/** @var bool $useGroups */
|
|
||||||
private $useGroups;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SubscriptionCycleManualJobTask constructor.
|
* SubscriptionCycleManualJobTask constructor.
|
||||||
*
|
*
|
||||||
* @param ApplicationCore $app
|
* @param ApplicationCore $app
|
||||||
* @param Database $db
|
* @param Database $db
|
||||||
|
* @param TaskMutexServiceInterface $taskMutexService
|
||||||
* @param SubscriptionCycleJobService $cycleJobService
|
* @param SubscriptionCycleJobService $cycleJobService
|
||||||
* @param SubscriptionCycleModuleInterface $subscriptionCycleModule
|
* @param SubscriptionModuleInterface $subscriptionModule
|
||||||
* @param bool $useGroups
|
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
ApplicationCore $app,
|
ApplicationCore $app,
|
||||||
Database $db,
|
Database $db,
|
||||||
TaskMutexServiceInterface $taskMutexService,
|
TaskMutexServiceInterface $taskMutexService,
|
||||||
SubscriptionCycleJobService $cycleJobService,
|
SubscriptionCycleJobService $cycleJobService,
|
||||||
SubscriptionCycleModuleInterface $subscriptionCycleModule,
|
SubscriptionModuleInterface $subscriptionModule
|
||||||
SubscriptionModuleInterface $subscriptionModule,
|
|
||||||
bool $useGroups
|
|
||||||
) {
|
) {
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->taskMutexService = $taskMutexService;
|
$this->taskMutexService = $taskMutexService;
|
||||||
$this->cycleJobService = $cycleJobService;
|
$this->cycleJobService = $cycleJobService;
|
||||||
$this->subscriptionCycleModule = $subscriptionCycleModule;
|
|
||||||
$this->subscriptionModule = $subscriptionModule;
|
$this->subscriptionModule = $subscriptionModule;
|
||||||
$this->useGroups = $useGroups;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function execute(): void
|
public function execute(): void
|
||||||
|
|
@ -71,77 +57,16 @@ final class SubscriptionCycleManualJobTask
|
||||||
}
|
}
|
||||||
$this->taskMutexService->setMutex('rechnungslauf_manual');
|
$this->taskMutexService->setMutex('rechnungslauf_manual');
|
||||||
$jobs = $this->cycleJobService->listAll(100);
|
$jobs = $this->cycleJobService->listAll(100);
|
||||||
$simulatedDays = $this->getSimulatedDates($jobs);
|
|
||||||
if (empty($jobs)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
foreach (['auftrag', 'rechnung'] as $doctype) {
|
|
||||||
foreach ($simulatedDays as $simulatedDay) {
|
|
||||||
if ($simulatedDay === '') {
|
|
||||||
$simulatedDay = null;
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
$simulatedDay = new DateTimeImmutable($simulatedDay);
|
|
||||||
} catch (Exception $exception) {
|
|
||||||
$simulatedDay = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$addresses = $this->getAddressesByTypeFromJobs($jobs, $doctype, $simulatedDay);
|
|
||||||
foreach ($jobs as $job) {
|
foreach ($jobs as $job) {
|
||||||
$job = $this->cycleJobService->getJob((int)$job['id']);
|
switch ($job['document_type']) {
|
||||||
if (empty($job)) {
|
case 'rechnung':
|
||||||
continue;
|
$this->subscriptionModule->CreateInvoice((int)$job['address_id']);
|
||||||
}
|
break;
|
||||||
if ($job['document_type'] !== $doctype) {
|
case 'auftrag':
|
||||||
continue;
|
$this->subscriptionModule->CreateOrder((int)$job['address_id']);
|
||||||
}
|
break;
|
||||||
if ($job['simulated_day'] === null && $simulatedDay !== null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
$job['simulated_day'] !== null
|
|
||||||
&& ($simulatedDay === null || $simulatedDay->format('Y-m-d') !== $job['simulated_day'])
|
|
||||||
) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!in_array($job['address_id'], $addresses, false)) {
|
|
||||||
$this->cycleJobService->delete((int)$job['id']);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$simulatedDay = null;
|
|
||||||
if ($job['simulated_day'] !== null) {
|
|
||||||
try {
|
|
||||||
$simulatedDay = new DateTimeImmutable($job['simulated_day']);
|
|
||||||
} catch (Exception $exception) {
|
|
||||||
$simulatedDay = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($this->useGroups) {
|
|
||||||
$this->subscriptionCycleModule->generateAndSendSubscriptionCycleGroups(
|
|
||||||
$this->subscriptionModule,
|
|
||||||
[$job['address_id']],
|
|
||||||
$doctype,
|
|
||||||
$job['job_type'],
|
|
||||||
$job['printer_id'],
|
|
||||||
$simulatedDay
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$this->subscriptionCycleModule->generateAndSendSubscriptionCycle(
|
|
||||||
$this->subscriptionModule,
|
|
||||||
[$job['address_id']],
|
|
||||||
$doctype,
|
|
||||||
$job['printer_id'],
|
|
||||||
$job['job_type'],
|
|
||||||
$simulatedDay
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
$this->cycleJobService->delete((int)$job['id']);
|
$this->cycleJobService->delete((int)$job['id']);
|
||||||
if ($this->taskMutexService->isTaskInstanceRunning('rechnungslauf')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$this->taskMutexService->setMutex('rechnungslauf_manual');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -149,52 +74,4 @@ final class SubscriptionCycleManualJobTask
|
||||||
{
|
{
|
||||||
$this->taskMutexService->setMutex('rechnungslauf_manual', false);
|
$this->taskMutexService->setMutex('rechnungslauf_manual', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $jobs
|
|
||||||
* @param string $documentType
|
|
||||||
* @param DateTimeInterface|null $simulatedDay
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
private function getAddressesByTypeFromJobs(
|
|
||||||
array $jobs,
|
|
||||||
string $documentType,
|
|
||||||
?DateTimeInterface $simulatedDay = null
|
|
||||||
): array {
|
|
||||||
$addresses = [];
|
|
||||||
foreach ($jobs as $job) {
|
|
||||||
if ($job['document_type'] === $documentType) {
|
|
||||||
$addresses[] = (int)$job['address_id'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($addresses)) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
$addressesWithSubscriptions = array_keys(
|
|
||||||
(array)$this->subscriptionModule->GetRechnungsArray($documentType, true)
|
|
||||||
);
|
|
||||||
|
|
||||||
return array_intersect($addresses, $addressesWithSubscriptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get all Dates from Setting "Vergangenes Datum für Abrechnungserstellung" to calc old Subscription cycles
|
|
||||||
*
|
|
||||||
* @param array $jobs
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
private function getSimulatedDates(array $jobs): array
|
|
||||||
{
|
|
||||||
$simulatedDates = [];
|
|
||||||
foreach ($jobs as $job) {
|
|
||||||
$simulatedDates[] = (string)$job['simulated_day'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return array_unique($simulatedDates);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
* SPDX-FileCopyrightText: 2019 Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
@ -11,7 +16,7 @@ use Xentral\Modules\SubscriptionCycle\Exception\InvalidArgumentException;
|
||||||
|
|
||||||
final class SubscriptionCycleJobService
|
final class SubscriptionCycleJobService
|
||||||
{
|
{
|
||||||
private $db;
|
private Database $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SubscriptionCycleJobService constructor.
|
* SubscriptionCycleJobService constructor.
|
||||||
|
|
@ -57,29 +62,27 @@ final class SubscriptionCycleJobService
|
||||||
* @param string $documentType
|
* @param string $documentType
|
||||||
* @param string|null $jobType
|
* @param string|null $jobType
|
||||||
* @param int|null $printerId
|
* @param int|null $printerId
|
||||||
* @param DateTimeInterface|null $simulatedDay
|
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function create(int $addressId, string $documentType, ?string $jobType, ?int $printerId, ?DateTimeInterface $simulatedDay = null): int
|
public function create(int $addressId, string $documentType, ?string $jobType = null, ?int $printerId = null): int
|
||||||
{
|
{
|
||||||
$this->ensureDocumentType($documentType);
|
$this->ensureDocumentType($documentType);
|
||||||
$this->db->perform(
|
$this->db->perform(
|
||||||
'INSERT INTO `subscription_cycle_job`
|
'INSERT INTO `subscription_cycle_job`
|
||||||
(`address_id`, `document_type`, `job_type`, `printer_id`, `created_at`, `simulated_day`)
|
(`address_id`, `document_type`, `job_type`, `printer_id`, `created_at`)
|
||||||
VALUES (:address_id, :document_type, :job_type, :printer_id, NOW(), :simulated_day)',
|
VALUES (:address_id, :document_type, :job_type, :printer_id, NOW())',
|
||||||
[
|
[
|
||||||
'address_id' => $addressId,
|
'address_id' => $addressId,
|
||||||
'document_type' => $documentType,
|
'document_type' => $documentType,
|
||||||
'job_type' => $jobType,
|
'job_type' => $jobType,
|
||||||
'printer_id' => $printerId,
|
'printer_id' => $printerId,
|
||||||
'simulated_day' => $simulatedDay === null ? null : $simulatedDay->format('Y-m-d'),
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (int)$this->db->lastInsertId();
|
return $this->db->lastInsertId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Xentral\Modules\SubscriptionCycle;
|
||||||
|
|
||||||
|
use ApplicationCore;
|
||||||
|
use DateTimeImmutable;
|
||||||
|
use DateTimeInterface;
|
||||||
|
use Xentral\Components\Database\Database;
|
||||||
|
|
||||||
|
class SubscriptionModule implements SubscriptionModuleInterface
|
||||||
|
{
|
||||||
|
private ApplicationCore $app;
|
||||||
|
private Database $db;
|
||||||
|
|
||||||
|
public function __construct(ApplicationCore $app, Database $db)
|
||||||
|
{
|
||||||
|
$this->app = $app;
|
||||||
|
$this->db = $db;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function GetPositions(int $address, string $documentType, DateTimeInterface $calculationDate = null): array
|
||||||
|
{
|
||||||
|
if ($calculationDate === null)
|
||||||
|
$calculationDate = new DateTimeImmutable('today');
|
||||||
|
|
||||||
|
$sql = "SELECT
|
||||||
|
aa.id,
|
||||||
|
@start := GREATEST(aa.startdatum, aa.abgerechnetbis) as start,
|
||||||
|
@end := IF(aa.enddatum = '0000-00-00' OR aa.enddatum > :calcdate, :calcdate, aa.enddatum) as end,
|
||||||
|
@cycles := GREATEST(aa.zahlzyklus, CASE
|
||||||
|
WHEN aa.preisart = 'monat' THEN
|
||||||
|
TIMESTAMPDIFF(MONTH, @start, @end)
|
||||||
|
WHEN aa.preisart = 'jahr' THEN
|
||||||
|
TIMESTAMPDIFF(YEAR, @start, @end)
|
||||||
|
WHEN aa.preisart = '30tage' THEN
|
||||||
|
FLOOR(TIMESTAMPDIFF(DAY, @start, @end) / 30)
|
||||||
|
END+1) as cycles,
|
||||||
|
CASE
|
||||||
|
WHEN aa.preisart = 'monat' THEN
|
||||||
|
DATE_ADD(@start, INTERVAL @cycles MONTH)
|
||||||
|
WHEN aa.preisart = 'jahr' THEN
|
||||||
|
DATE_ADD(@start, INTERVAL @cycles YEAR)
|
||||||
|
WHEN aa.preisart = '30tage' THEN
|
||||||
|
DATE_ADD(@start, INTERVAL @cycles*30 DAY )
|
||||||
|
END as newend,
|
||||||
|
aa.preisart,
|
||||||
|
aa.adresse,
|
||||||
|
aa.preis,
|
||||||
|
aa.rabatt,
|
||||||
|
aa.bezeichnung,
|
||||||
|
aa.beschreibung,
|
||||||
|
aa.artikel,
|
||||||
|
aa.menge,
|
||||||
|
aa.waehrung
|
||||||
|
FROM abrechnungsartikel aa
|
||||||
|
JOIN artikel a on aa.artikel = a.id
|
||||||
|
WHERE aa.dokument = :doctype
|
||||||
|
AND greatest(aa.startdatum, aa.abgerechnetbis) <= :calcdate
|
||||||
|
AND (aa.enddatum = '0000-00-00' OR aa.abgerechnetbis < aa.enddatum)
|
||||||
|
AND aa.adresse = :address";
|
||||||
|
|
||||||
|
return $this->db->fetchAll($sql, [
|
||||||
|
'doctype' => $documentType,
|
||||||
|
'calcdate' => $calculationDate->format('Y-m-d'),
|
||||||
|
'address' => $address]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function CreateInvoice(int $address, DateTimeInterface $calculationDate = null) {
|
||||||
|
$positions = $this->GetPositions($address, 'rechnung', $calculationDate);
|
||||||
|
if(empty($positions))
|
||||||
|
return;
|
||||||
|
|
||||||
|
$invoice = $this->app->erp->CreateRechnung($address);
|
||||||
|
$this->app->erp->LoadRechnungStandardwerte($invoice, $address);
|
||||||
|
foreach ($positions as $pos) {
|
||||||
|
$beschreibung = $pos['beschreibung'];
|
||||||
|
|
||||||
|
$starts = DateTimeImmutable::createFromFormat('Y-m-d', $pos['start'])->format('d.m.Y');
|
||||||
|
$newends = DateTimeImmutable::createFromFormat('Y-m-d', $pos['newend'])->format('d.m.Y');
|
||||||
|
$beschreibung .= "<br>Zeitraum: $starts - $newends";
|
||||||
|
|
||||||
|
$this->app->erp->AddRechnungPositionManuell($invoice, $pos['artikel'], $pos['preis'],
|
||||||
|
$pos['menge']*$pos['cycles'], $pos['bezeichnung'], $beschreibung, $pos['waehrung'], $pos['rabatt']);
|
||||||
|
$this->db->exec("UPDATE abrechnungsartikel SET abgerechnetbis='{$pos['newend']}' WHERE id={$pos['id']}");
|
||||||
|
}
|
||||||
|
$this->app->erp->RechnungNeuberechnen($invoice);
|
||||||
|
//$this->app->erp->BelegFreigabe('rechnung', $invoice);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function CreateOrder(int $address, DateTimeInterface $calculationDate = null) {
|
||||||
|
$positions = $this->GetPositions($address, 'auftrag', $calculationDate);
|
||||||
|
if(empty($positions))
|
||||||
|
return;
|
||||||
|
|
||||||
|
$orderid = $this->app->erp->CreateAuftrag($address);
|
||||||
|
$this->app->erp->LoadAuftragStandardwerte($orderid, $address);
|
||||||
|
foreach ($positions as $pos) {
|
||||||
|
$beschreibung = $pos['beschreibung'];
|
||||||
|
|
||||||
|
$starts = DateTimeImmutable::createFromFormat('Y-m-d', $pos['start'])->format('d.m.Y');
|
||||||
|
$newends = DateTimeImmutable::createFromFormat('Y-m-d', $pos['newend'])->format('d.m.Y');
|
||||||
|
$beschreibung .= "<br>Zeitraum: $starts - $newends";
|
||||||
|
|
||||||
|
$this->app->erp->AddAuftragPositionManuell($orderid, $pos['artikel'], $pos['preis'],
|
||||||
|
$pos['menge']*$pos['cycles'], $pos['bezeichnung'], $beschreibung, $pos['waehrung'], $pos['rabatt']);
|
||||||
|
$this->db->exec("UPDATE abrechnungsartikel SET abgerechnetbis='{$pos['newend']}' WHERE id={$pos['id']}");
|
||||||
|
}
|
||||||
|
$this->app->erp->AuftragNeuberechnen($orderid);
|
||||||
|
//$this->app->erp->BelegFreigabe('auftrag', $orderid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
/*
|
||||||
declare(strict_types=1);
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
namespace Xentral\Modules\SubscriptionCycle;
|
namespace Xentral\Modules\SubscriptionCycle;
|
||||||
|
|
||||||
|
|
@ -8,36 +10,7 @@ use DateTimeInterface;
|
||||||
|
|
||||||
interface SubscriptionModuleInterface
|
interface SubscriptionModuleInterface
|
||||||
{
|
{
|
||||||
/**
|
public function CreateInvoice(int $address, DateTimeInterface $calculationDate = null);
|
||||||
* @param int $customer
|
public function CreateOrder(int $address, DateTimeInterface $calculationDate = null);
|
||||||
* @param string $documentType
|
public function GetPositions(int $address, string $documentType, DateTimeInterface $calculationDate = null): array;
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function RechnungKunde($customer, $documentType);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $customer
|
|
||||||
* @param $invoiceGroupKey
|
|
||||||
* @param $key
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function AuftragImportAbo($customer, $invoiceGroupKey, $key);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $customer
|
|
||||||
* @param $invoiceGroupKey
|
|
||||||
* @param $key
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function RechnungImportAbo($customer, $invoiceGroupKey, $key);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $documentType
|
|
||||||
*
|
|
||||||
* @return array|null
|
|
||||||
*/
|
|
||||||
public function GetRechnungsArray($documentType);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,22 @@ class TicketFormatter
|
||||||
*/
|
*/
|
||||||
public function encodeToUtf8(string $string): string
|
public function encodeToUtf8(string $string): string
|
||||||
{
|
{
|
||||||
$encoding = mb_detect_encoding($string, 'UTF-8, ISO-8859-1, ISO-8859-15', true);
|
|
||||||
|
|
||||||
return mb_convert_encoding(
|
$converted = mb_convert_encoding(
|
||||||
$string,
|
$string,
|
||||||
'UTF-8',
|
'UTF-8',
|
||||||
$encoding
|
'auto'
|
||||||
|
);
|
||||||
|
|
||||||
|
// Fallback
|
||||||
|
if ($converted === false) {
|
||||||
|
$converted = mb_convert_encoding(
|
||||||
|
$string,
|
||||||
|
'UTF-8',
|
||||||
|
'iso-8859-1'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return ($converted);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,7 @@ class TicketImportHelper
|
||||||
return($candidate);
|
return($candidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($loopCounter > 99) {
|
if ($loopCounter > 9999) {
|
||||||
throw new NumberGeneratorException('ticket number generation failed');
|
throw new NumberGeneratorException('ticket number generation failed');
|
||||||
}
|
}
|
||||||
$loopCounter++;
|
$loopCounter++;
|
||||||
|
|
@ -285,14 +285,15 @@ class TicketImportHelper
|
||||||
tr.dsgvo AS `is_gdpr_relevant`,
|
tr.dsgvo AS `is_gdpr_relevant`,
|
||||||
tr.prio AS `priority`,
|
tr.prio AS `priority`,
|
||||||
tr.persoenlich AS `is_private`,
|
tr.persoenlich AS `is_private`,
|
||||||
|
tr.adresse,
|
||||||
tr.warteschlange AS `queue_id`
|
tr.warteschlange AS `queue_id`
|
||||||
FROM `ticket_regeln` AS `tr`
|
FROM `ticket_regeln` AS `tr`
|
||||||
WHERE
|
WHERE
|
||||||
tr.aktiv = 1
|
tr.aktiv = 1
|
||||||
AND ('".$recipientMail."' LIKE tr.empfaenger_email OR tr.empfaenger_email = '')
|
AND ('".$this->db->real_escape_string($recipientMail)."' LIKE tr.empfaenger_email OR tr.empfaenger_email = '')
|
||||||
AND ('".$senderMail."' LIKE tr.sender_email OR tr.sender_email = '')
|
AND ('".$this->db->real_escape_string($senderMail)."' LIKE tr.sender_email OR tr.sender_email = '')
|
||||||
AND ('".$senderMail."' LIKE tr.name OR tr.name = '')
|
AND ('".$this->db->real_escape_string($senderMail)."' LIKE tr.name OR tr.name = '')
|
||||||
AND ('".$subject."' LIKE tr.betreff OR tr.betreff = '')";
|
AND ('".$this->db->real_escape_string($subject)."' LIKE tr.betreff OR tr.betreff = '')";
|
||||||
|
|
||||||
$this->logger->debug('ticket rule',['sql' => $sql]);
|
$this->logger->debug('ticket rule',['sql' => $sql]);
|
||||||
|
|
||||||
|
|
@ -335,7 +336,7 @@ class TicketImportHelper
|
||||||
$queue_id = $this->mailAccount->getTicketQueueId();
|
$queue_id = $this->mailAccount->getTicketQueueId();
|
||||||
|
|
||||||
if (!empty($queue_id)) {
|
if (!empty($queue_id)) {
|
||||||
$queue_label = $this->db->Select("SELECT label FROM warteschlangen WHERE id = ".$queue_id." LIMIT 1");
|
$queue_label = $this->db->Select("SELECT label FROM warteschlangen WHERE label = '".$queue_id."' LIMIT 1");
|
||||||
}
|
}
|
||||||
|
|
||||||
$insertTicket = "INSERT INTO `ticket` (
|
$insertTicket = "INSERT INTO `ticket` (
|
||||||
|
|
@ -347,10 +348,10 @@ class TicketImportHelper
|
||||||
'".$projectId."',
|
'".$projectId."',
|
||||||
'".$this->mailAccount->getEmailAddress()."',
|
'".$this->mailAccount->getEmailAddress()."',
|
||||||
'".$status."',
|
'".$status."',
|
||||||
'".$senderName."',
|
'".$this->db->real_escape_string($senderName)."',
|
||||||
'".$senderAddress."',
|
'".$this->db->real_escape_string($senderAddress)."',
|
||||||
'".'3'."',
|
'".'3'."',
|
||||||
'".$subject."',
|
'".$this->db->real_escape_string($subject)."',
|
||||||
'".$queue_label."',
|
'".$queue_label."',
|
||||||
'".$AddressId."');";
|
'".$AddressId."');";
|
||||||
|
|
||||||
|
|
@ -383,14 +384,14 @@ class TicketImportHelper
|
||||||
) VALUES (
|
) VALUES (
|
||||||
'".$ticketNumber."',
|
'".$ticketNumber."',
|
||||||
'".date('Y-m-d H:i:s', $timestamp)."',
|
'".date('Y-m-d H:i:s', $timestamp)."',
|
||||||
'".$message."',
|
'".$this->db->real_escape_string($message)."',
|
||||||
'".$subject."',
|
'".$this->db->real_escape_string($subject)."',
|
||||||
'".'email'."',
|
'".'email'."',
|
||||||
'".$senderName."',
|
'".$this->db->real_escape_string($senderName)."',
|
||||||
'".$senderAddress."',
|
'".$this->db->real_escape_string($senderAddress)."',
|
||||||
'".$status."',
|
'".$status."',
|
||||||
'".$replyToName."',
|
'".$this->db->real_escape_string($replyToName)."',
|
||||||
'".$replyToAddress."');";
|
'".$this->db->real_escape_string($replyToAddress)."');";
|
||||||
|
|
||||||
$this->logger->debug('database insert',['query' => $sql]);
|
$this->logger->debug('database insert',['query' => $sql]);
|
||||||
$this->db->Insert($sql);
|
$this->db->Insert($sql);
|
||||||
|
|
@ -408,9 +409,6 @@ class TicketImportHelper
|
||||||
$this->logger->error('Failed to insert ticket message into db', ['exception' => $e]);
|
$this->logger->error('Failed to insert ticket message into db', ['exception' => $e]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->applyTicketRules($messageId);
|
|
||||||
|
|
||||||
return($result);
|
return($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -440,7 +438,7 @@ class TicketImportHelper
|
||||||
|
|
||||||
foreach ($ruleArray as $rule) {
|
foreach ($ruleArray as $rule) {
|
||||||
|
|
||||||
$this->logger->debug('ticket rule applies',['rule_id' => $rule['id']]);
|
$this->logger->debug('ticket rule applies',['rule_id' => $rule['id'],'rule' => print_r($rule,true)]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$update = $this->db->update();
|
$update = $this->db->update();
|
||||||
|
|
@ -461,12 +459,16 @@ class TicketImportHelper
|
||||||
$this->db->perform($sql, ['ticket_id' => $ticketId]);
|
$this->db->perform($sql, ['ticket_id' => $ticketId]);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($rule['is_spam'] === 1) {
|
if ($rule['is_spam'] == 1) {
|
||||||
$sql = "UPDATE `ticket_nachricht` SET `status` = \'spam\' WHERE `id` = '".$ticketMessageId."'";
|
$status = 'spam';
|
||||||
$this->db->Update($sql);
|
} else {
|
||||||
|
$status = 'neu';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."', `warteschlange` = '".$rule['queue_id']."' WHERE `id` = '".$ticketId."'";
|
$sql = "UPDATE `ticket` SET `dsgvo` = '".$rule['is_gdpr_relevant']."', `privat` = '".$rule['is_private']."', `prio` = '".$rule['priority']."',`adresse` = '".$rule['adresse']."', `warteschlange` = '".$rule['queue_id']."', `status` = '".$status."' WHERE `id` = '".$ticketId."'";
|
||||||
|
|
||||||
|
$this->logger->debug('ticket rule sql',['sql' => $sql]);
|
||||||
|
|
||||||
$this->db->Update($sql);
|
$this->db->Update($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -483,6 +485,9 @@ class TicketImportHelper
|
||||||
{
|
{
|
||||||
$insertedMailsCount = 0;
|
$insertedMailsCount = 0;
|
||||||
foreach ($inboxMessageIds as $messageNumber) {
|
foreach ($inboxMessageIds as $messageNumber) {
|
||||||
|
|
||||||
|
$this->logger->debug("Fetch $messageNumber", ['']);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$message = $this->mailClient->fetchMessage((int)$messageNumber);
|
$message = $this->mailClient->fetchMessage((int)$messageNumber);
|
||||||
} catch (Throwable $e) {
|
} catch (Throwable $e) {
|
||||||
|
|
@ -491,17 +496,27 @@ class TicketImportHelper
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$this->logger->debug('Start import', ['message' => $message->getSubject()]);
|
// $this->logger->debug('Start import', ['message' => substr(print_r($message,true),1000)]);
|
||||||
|
$this->logger->debug('Start import '.$messageNumber, []);
|
||||||
|
|
||||||
$this->importMessage($message);
|
$result = $this->importMessage($message);
|
||||||
|
|
||||||
|
if ($result === true) {
|
||||||
$insertedMailsCount++;
|
$insertedMailsCount++;
|
||||||
if ($this->mailAccount->isDeleteAfterImportEnabled()) {
|
if ($this->mailAccount->isDeleteAfterImportEnabled()) {
|
||||||
$this->mailClient->deleteMessage((int)$messageNumber);
|
$this->mailClient->deleteMessage((int)$messageNumber);
|
||||||
} else {
|
} else {
|
||||||
$this->mailClient->setFlags((int)$messageNumber, ['\\Seen']);
|
$this->mailClient->setFlags((int)$messageNumber, ['\\Seen']);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$this->logger->error('Error during email import '.$messageNumber, ['message' => substr(print_r($message,true),0,1000)]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
} catch (Throwable $e) {
|
} catch (Throwable $e) {
|
||||||
$this->logger->error('Error during email import', ['exception' => $e]);
|
|
||||||
|
$exception_message = $e->getMessage();
|
||||||
|
|
||||||
|
$this->logger->error('Error during email import '.$messageNumber, ['exc-message' => $exception_message ,'message2' => substr(print_r($message,true),0,1000)]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -517,12 +532,10 @@ class TicketImportHelper
|
||||||
/**
|
/**
|
||||||
* @param MailMessageInterface $message
|
* @param MailMessageInterface $message
|
||||||
*
|
*
|
||||||
* @return void
|
* @return true on success
|
||||||
*/
|
*/
|
||||||
public function importMessage(MailMessageInterface $message): void
|
public function importMessage(MailMessageInterface $message): bool
|
||||||
{
|
{
|
||||||
$DEBUG = 0;
|
|
||||||
|
|
||||||
// extract email data
|
// extract email data
|
||||||
$subject = $this->formatter->encodeToUtf8($message->getSubject());
|
$subject = $this->formatter->encodeToUtf8($message->getSubject());
|
||||||
$from = $this->formatter->encodeToUtf8($message->getSender()->getEmail());
|
$from = $this->formatter->encodeToUtf8($message->getSender()->getEmail());
|
||||||
|
|
@ -543,41 +556,67 @@ class TicketImportHelper
|
||||||
if ($htmlBody === null) {
|
if ($htmlBody === null) {
|
||||||
$htmlBody = '';
|
$htmlBody = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($plainTextBody == '' && $htmlBody == '') {
|
||||||
|
$simple_content = $message->getContent();
|
||||||
|
if (empty($simple_content)) {
|
||||||
|
$this->logger->debug('Empty mail',[]);
|
||||||
|
} else {
|
||||||
|
$plainTextBody = $simple_content;
|
||||||
|
$htmlBody = nl2br(htmlentities($simple_content));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->logger->debug('Text',['plain' => $plainTextBody, 'html' => $htmlBody, 'simple_content' => $simple_content]);
|
||||||
|
|
||||||
$action = $this->formatter->encodeToUtf8($plainTextBody);
|
$action = $this->formatter->encodeToUtf8($plainTextBody);
|
||||||
$action_html = $this->formatter->encodeToUtf8($htmlBody);
|
$action_html = $this->formatter->encodeToUtf8($htmlBody);
|
||||||
if (strlen($action_html) < strlen($action)) {
|
if (strlen($action_html) < strlen($action)) {
|
||||||
$action_html = nl2br($action);
|
$action_html = nl2br($action);
|
||||||
}
|
}
|
||||||
|
|
||||||
//check if email exists in database
|
$this->logger->debug('Text (converted)',['plain' => $action, 'html' => $action_html]);
|
||||||
|
|
||||||
|
// Import database emailbackup
|
||||||
|
try {
|
||||||
$date = $message->getDate();
|
$date = $message->getDate();
|
||||||
if (is_null($date)) { // This should not be happening -> Todo check getDate function
|
}
|
||||||
$this->logger->debug('Null date',['subject' => $message->getSubject()]);
|
catch (exception $e) {
|
||||||
$frommd5 = md5($from . $subject);
|
$this->logger->debug('Invalid date',['exc-message' => $e->getMessage(),'subject' => $message->getSubject(), $message->getHeader('date')->getValue()]);
|
||||||
} else {
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
$timestamp = $date->getTimestamp();
|
$timestamp = $date->getTimestamp();
|
||||||
$frommd5 = md5($from . $subject . $timestamp);
|
$frommd5 = md5($from . $subject . $timestamp);
|
||||||
}
|
|
||||||
$empfang = $date->format('Y-m-d H:i:s');
|
$empfang = $date->format('Y-m-d H:i:s');
|
||||||
$sql = "SELECT COUNT(id)
|
$sql = "SELECT COUNT(id)
|
||||||
FROM `emailbackup_mails`
|
FROM `emailbackup_mails`
|
||||||
WHERE `checksum`='$frommd5'
|
WHERE `checksum`='$frommd5'
|
||||||
AND `empfang`='$empfang'
|
AND `empfang`='$empfang'
|
||||||
|
AND `ticketnachricht` != 0
|
||||||
AND `webmail`='" . $this->mailAccount->getId() . "'";
|
AND `webmail`='" . $this->mailAccount->getId() . "'";
|
||||||
|
|
||||||
|
|
||||||
$this->logger->debug('Importing message '.$from.' '.$fromname);
|
$this->logger->debug('Importing message '.$from.' '.$fromname);
|
||||||
|
|
||||||
if ($this->db->Select($sql) == 0) {
|
$result = $this->db->Select($sql);
|
||||||
|
$emailbackup_mails_id = null;
|
||||||
|
|
||||||
$this->logger->debug('Importing message',['']);
|
if ($result == 0) {
|
||||||
|
|
||||||
|
// $this->logger->debug('Importing message',['message' => substr(print_r($message,true),1000)]);
|
||||||
|
$this->logger->debug('Importing message attachments',[]);
|
||||||
|
|
||||||
|
try {
|
||||||
$attachments = $message->getAttachments();
|
$attachments = $message->getAttachments();
|
||||||
|
}
|
||||||
|
catch (Throwable $e) {
|
||||||
|
$this->logger->error('Error while getting attachments',['exception' => $e]);
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
$anhang = count($attachments) > 0 ? 1 : 0;
|
$anhang = count($attachments) > 0 ? 1 : 0;
|
||||||
$mailacc = $this->mailAccount->getEmailAddress();
|
$mailacc = $this->mailAccount->getEmailAddress();
|
||||||
if (empty($mailacc) && count($message->getRecipients()) > 0) {
|
|
||||||
$mailacc = array_values($message->getRecipients())[0]->getEmail();
|
|
||||||
}
|
|
||||||
$mailaccid = $this->mailAccount->getId();
|
$mailaccid = $this->mailAccount->getId();
|
||||||
|
|
||||||
if (!$this->erpApi->isMailAdr($from)) {
|
if (!$this->erpApi->isMailAdr($from)) {
|
||||||
|
|
@ -604,23 +643,24 @@ class TicketImportHelper
|
||||||
'$empfang','$anhang','$frommd5'
|
'$empfang','$anhang','$frommd5'
|
||||||
)";
|
)";
|
||||||
|
|
||||||
$id = null;
|
|
||||||
if ($DEBUG) {
|
|
||||||
echo $sql;
|
|
||||||
} else {
|
|
||||||
$this->db->InsertWithoutLog($sql);
|
$this->db->InsertWithoutLog($sql);
|
||||||
$id = $this->db->GetInsertID();
|
$emailbackup_mails_id = $this->db->GetInsertID();
|
||||||
}
|
} else {
|
||||||
|
$this->logger->debug('Message already imported.',['']);
|
||||||
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($DEBUG) {
|
$this->logger->debug('Message emailbackup_mails imported.',['id' => $emailbackup_mails_id]);
|
||||||
echo "ticket suchen oder anlegen\n";
|
// END database import emailbackup
|
||||||
}
|
|
||||||
|
|
||||||
|
// Find ticket and add or create new ticket
|
||||||
$ticketNumber = null;
|
$ticketNumber = null;
|
||||||
$ticketexists = null;
|
$ticketexists = null;
|
||||||
if (preg_match("/Ticket #[0-9]{12}/i", $subject, $matches)) {
|
if (preg_match("/Ticket #[0-9]{12}/i", $subject, $matches)) {
|
||||||
$ticketNumber = str_replace('Ticket #', '', $matches[0]);
|
$ticketNumber = str_replace('Ticket #', '', $matches[0]);
|
||||||
|
|
||||||
|
$this->logger->debug('Check for number',['ticketnummer' => $ticketNumber]);
|
||||||
|
|
||||||
$ticketexists = $this->db->Select(
|
$ticketexists = $this->db->Select(
|
||||||
"SELECT schluessel
|
"SELECT schluessel
|
||||||
FROM ticket
|
FROM ticket
|
||||||
|
|
@ -648,7 +688,7 @@ class TicketImportHelper
|
||||||
$this->logger->debug('Add message to existing ticket',['ticketnummer' => $ticketNumber]);
|
$this->logger->debug('Add message to existing ticket',['ticketnummer' => $ticketNumber]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add message to new or existing ticket
|
// Database import ticket: Add message to new or existing ticket
|
||||||
$ticketnachricht = $this->addTicketMessage(
|
$ticketnachricht = $this->addTicketMessage(
|
||||||
(string) $ticketNumber,
|
(string) $ticketNumber,
|
||||||
$timestamp,
|
$timestamp,
|
||||||
|
|
@ -661,11 +701,17 @@ class TicketImportHelper
|
||||||
$from
|
$from
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($ticketnachricht > 0 && $id > 0) {
|
// Only for new tickets: apply filter rules
|
||||||
|
if (!$ticketexists) {
|
||||||
|
$this->applyTicketRules($ticketnachricht);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($ticketnachricht > 0 && $emailbackup_mails_id > 0) {
|
||||||
$this->db->Update(
|
$this->db->Update(
|
||||||
"UPDATE `emailbackup_mails`
|
"UPDATE `emailbackup_mails`
|
||||||
SET ticketnachricht='$ticketnachricht'
|
SET ticketnachricht='$ticketnachricht'
|
||||||
WHERE id='$id' LIMIT 1"
|
WHERE id='$emailbackup_mails_id' LIMIT 1"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -711,56 +757,58 @@ class TicketImportHelper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$this->logger->error("Message not imported!", ['Time' => $timestamp, 'Subject' => $subject, 'From' => $from]);
|
||||||
|
$this->db->Delete("DELETE FROM emailbackup_mails WHERE id = ".$emailbackup_mails_id);
|
||||||
|
return(false);
|
||||||
}
|
}
|
||||||
|
// END database import ticket
|
||||||
|
|
||||||
// Prüfen ob Ordner vorhanden ansonsten anlegen
|
// File management folder with raw text
|
||||||
$ordner = $this->config->WFuserdata . '/emailbackup/' . $this->config->WFdbname . "/$id";
|
$ordner = $this->config->WFuserdata . '/emailbackup/' . $this->config->WFdbname . "/$emailbackup_mails_id";
|
||||||
if (!is_dir($ordner) && $id > 0) {
|
if (!is_dir($ordner) && $emailbackup_mails_id > 0) {
|
||||||
if (!mkdir($ordner, 0777, true) && !is_dir($ordner)) {
|
if (!mkdir($ordner, 0777, true) && !is_dir($ordner)) {
|
||||||
|
$this->logger->error("Folder \"{folder}\" was not created", ['folder' => $ordner]);
|
||||||
|
$this->db->Delete("DELETE FROM emailbackup_mails WHERE id = ".$emailbackup_mails_id);
|
||||||
|
return(false);
|
||||||
}
|
}
|
||||||
$raw_full_email = $message->getRawContent();
|
$raw_full_email = $message->getRawContent();
|
||||||
file_put_contents($ordner . '/mail.txt', $raw_full_email);
|
file_put_contents($ordner . '/mail.txt', $raw_full_email);
|
||||||
}
|
}
|
||||||
|
|
||||||
//speichere anhang als datei
|
// File management attachments
|
||||||
if ($anhang == 1 && $id > 0) {
|
if ($anhang == 1 && $emailbackup_mails_id > 0) {
|
||||||
$ordner = $this->config->WFuserdata . '/emailbackup/' . $this->config->WFdbname;
|
$ordner = $this->config->WFuserdata . '/emailbackup/' . $this->config->WFdbname;
|
||||||
if (!is_dir($ordner)) {
|
if (!is_dir($ordner)) {
|
||||||
if (!mkdir($ordner, 0777, true) && !is_dir($ordner)) {
|
if (!mkdir($ordner, 0777, true) && !is_dir($ordner)) {
|
||||||
$this->logger->error("Folder \"{folder}\" was not created", ['folder' => $ordner]);
|
$this->logger->error("Folder \"{folder}\" was not created", ['folder' => $ordner]);
|
||||||
|
$this->db->Delete("DELETE FROM emailbackup_mails WHERE id = ".$emailbackup_mails_id);
|
||||||
|
return(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Prüfen ob Ordner vorhanden ansonsten anlegen
|
// Prüfen ob Ordner vorhanden ansonsten anlegen
|
||||||
$ordner = $this->config->WFuserdata . '/emailbackup/' . $this->config->WFdbname . "/$id";
|
$ordner = $this->config->WFuserdata . '/emailbackup/' . $this->config->WFdbname . "/$emailbackup_mails_id";
|
||||||
if (!is_dir($ordner)) {
|
if (!is_dir($ordner)) {
|
||||||
if ($DEBUG) {
|
|
||||||
echo "mkdir $ordner\n";
|
|
||||||
} else {
|
|
||||||
if (!mkdir($ordner, 0777, true) && !is_dir($ordner)) {
|
if (!mkdir($ordner, 0777, true) && !is_dir($ordner)) {
|
||||||
$this->logger->error("Folder \"{folder}\" was not created", ['folder' => $ordner]);
|
$this->logger->error("Folder \"{folder}\" was not created", ['folder' => $ordner]);
|
||||||
}
|
$this->db->Delete("DELETE FROM emailbackup_mails WHERE id = ".$emailbackup_mails_id);
|
||||||
|
return(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger->debug('Add attachments',['ticketnummer' => $ticketNumber, 'nachricht' => $ticketnachricht, 'count' => count($attachments)]);
|
$this->logger->debug('Add '.count($attachments).' attachments',['']);
|
||||||
|
|
||||||
|
|
||||||
foreach ($attachments as $attachment) {
|
foreach ($attachments as $attachment) {
|
||||||
if ($attachment->getFileName() !== '') {
|
if ($attachment->getFileName() !== '') {
|
||||||
if ($DEBUG) {
|
|
||||||
} else {
|
|
||||||
$handle = fopen($ordner . '/' . $attachment->getFileName(), 'wb');
|
$handle = fopen($ordner . '/' . $attachment->getFileName(), 'wb');
|
||||||
if ($handle) {
|
if ($handle) {
|
||||||
fwrite($handle, $attachment->getContent());
|
fwrite($handle, $attachment->getContent());
|
||||||
fclose($handle);
|
fclose($handle);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//Schreibe Anhänge in Datei-Tabelle
|
//Schreibe Anhänge in Datei-Tabelle
|
||||||
$datei = $ordner . '/' . $attachment->getFileName();
|
$datei = $ordner . '/' . $attachment->getFileName();
|
||||||
$dateiname = $attachment->getFileName();
|
$dateiname = $attachment->getFileName();
|
||||||
|
|
||||||
$this->logger->debug("Attachment", ['filename' => $dateiname]);
|
|
||||||
|
|
||||||
if (stripos(strtoupper($dateiname), '=?UTF-8') !== false) {
|
if (stripos(strtoupper($dateiname), '=?UTF-8') !== false) {
|
||||||
$dateiname = $this->formatter->encodeToUtf8($dateiname);
|
$dateiname = $this->formatter->encodeToUtf8($dateiname);
|
||||||
$dateiname = htmlspecialchars_decode($dateiname);
|
$dateiname = htmlspecialchars_decode($dateiname);
|
||||||
|
|
@ -774,12 +822,6 @@ class TicketImportHelper
|
||||||
$dateiname = htmlspecialchars_decode($dateiname);
|
$dateiname = htmlspecialchars_decode($dateiname);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger->debug("Attachment cleaned", ['filename' => $dateiname]);
|
|
||||||
|
|
||||||
if ($DEBUG) {
|
|
||||||
echo "CreateDatei($dateiname,{$dateiname},\"\",\"\",\"datei\",\"Support Mail\",true,"
|
|
||||||
. $this->config->WFuserdata . "/dms/" . $this->config->WFdbname . ")\n";
|
|
||||||
} else {
|
|
||||||
$tmpid = $this->erpApi->CreateDatei(
|
$tmpid = $this->erpApi->CreateDatei(
|
||||||
$dateiname,
|
$dateiname,
|
||||||
$dateiname,
|
$dateiname,
|
||||||
|
|
@ -790,13 +832,8 @@ class TicketImportHelper
|
||||||
true,
|
true,
|
||||||
$this->config->WFuserdata . '/dms/' . $this->config->WFdbname
|
$this->config->WFuserdata . '/dms/' . $this->config->WFdbname
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
if ($DEBUG) {
|
$this->logger->debug('Add attachment',['filename' => $dateiname, 'ticketnummer' => $ticketNumber,'id' => $tmpid, 'nachricht' => $ticketnachricht]);
|
||||||
echo "AddDateiStichwort $tmpid,'Anhang','Ticket',$ticketnachricht,true)\n";
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$this->logger->debug('Add attachment',['ticketnummer' => $ticketNumber,'id' => $tmpid, 'nachricht' => $ticketnachricht]);
|
|
||||||
|
|
||||||
$this->erpApi->AddDateiStichwort(
|
$this->erpApi->AddDateiStichwort(
|
||||||
$tmpid,
|
$tmpid,
|
||||||
|
|
@ -807,15 +844,15 @@ class TicketImportHelper
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // END File management
|
||||||
}
|
|
||||||
|
|
||||||
|
// Autoresponder
|
||||||
if (
|
if (
|
||||||
$this->mailAccount->isAutoresponseEnabled()
|
$this->mailAccount->isAutoresponseEnabled()
|
||||||
&& $this->mailAccount->getAutoresponseText() !== ''
|
&& $this->mailAccount->getAutoresponseText() !== ''
|
||||||
&& (
|
&& (
|
||||||
$this->erpApi->AutoresponderBlacklist($from) !== 1
|
// $this->erpApi->AutoresponderBlacklist($from) !== 1 ||
|
||||||
|| $this->mailAccount->isAutoresponseLimitEnabled() === false
|
$this->mailAccount->isAutoresponseLimitEnabled() === false
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
@ -843,5 +880,7 @@ class TicketImportHelper
|
||||||
$text
|
$text
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,10 @@ $factoryServiceMap = @include $serviceCacheFile;
|
||||||
|
|
||||||
if (!is_file($serviceCacheFile)) {
|
if (!is_file($serviceCacheFile)) {
|
||||||
|
|
||||||
// Installer ausführen wenn ServiceMap nicht vorhanden ist
|
// Installer ausführen, wenn ServiceMap nicht vorhanden ist
|
||||||
$resolver = new Psr4ClassNameResolver();
|
$resolver = new Psr4ClassNameResolver();
|
||||||
$resolver->addNamespace('Xentral\\', __DIR__);
|
$resolver->addNamespace('Xentral\\', __DIR__);
|
||||||
$resolver->excludeFile(__DIR__ . '/bootstrap.php');
|
$resolver->excludeFile(__DIR__ . DIRECTORY_SEPARATOR . 'bootstrap.php');
|
||||||
|
|
||||||
$generator = new ClassMapGenerator($resolver, __DIR__);
|
$generator = new ClassMapGenerator($resolver, __DIR__);
|
||||||
$installer = new Installer($generator, $resolver);
|
$installer = new Installer($generator, $resolver);
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ if ($task) {
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$app->erp->LogFile(
|
$app->erp->LogFile(
|
||||||
$app->DB->real_escape_string(
|
$app->DB->real_escape_string(
|
||||||
'Prozessstarter Fehler bei Aufruf des Moduls ' . $task[$task_index]['parameter'] . ': ' . $e->getMessage()
|
'Prozessstarter Fehler bei Aufruf des Moduls ' . $task[$task_index]['parameter'] . ': ' . $e->getMessage()." Trace: ".$e->GetTraceAsString()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<?php
|
|
||||||
/* Copyright (c) 2022 OpenXE-org */
|
|
||||||
/*
|
|
||||||
Refresh the githash number in githash.txt
|
|
||||||
*/
|
|
||||||
$path = '../.git/';
|
|
||||||
if (!is_dir($path)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$head = trim(substr(file_get_contents($path . 'HEAD'), 4));
|
|
||||||
$hash = trim(file_get_contents(sprintf($path . $head)));
|
|
||||||
|
|
||||||
if (!empty($hash)) {
|
|
||||||
file_put_contents("../githash.txt", $hash);
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
@ -34,7 +34,7 @@ if(empty($app->remote)) {
|
||||||
$app->remote = new Remote($app);
|
$app->remote = new Remote($app);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$app->erp->LogFile("Starte Synchronisation");
|
$app->erp->LogFile("Lagerzahlen-Synchronisation Start");
|
||||||
|
|
||||||
//$app->DB->Update("UPDATE artikel SET cache_lagerplatzinhaltmenge='999'");
|
//$app->DB->Update("UPDATE artikel SET cache_lagerplatzinhaltmenge='999'");
|
||||||
|
|
||||||
|
|
@ -53,6 +53,9 @@ $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1");
|
||||||
|
|
||||||
$shops = $app->DB->SelectArr('SELECT * FROM `shopexport` WHERE `aktiv` = 1');
|
$shops = $app->DB->SelectArr('SELECT * FROM `shopexport` WHERE `aktiv` = 1');
|
||||||
if(empty($shops)) {
|
if(empty($shops)) {
|
||||||
|
|
||||||
|
$app->erp->LogFile("Lagerzahlen-Synchronisation Ende: Keine aktiven Shops");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$shopByIds = [];
|
$shopByIds = [];
|
||||||
|
|
@ -97,6 +100,9 @@ $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1");
|
||||||
);
|
);
|
||||||
|
|
||||||
if(empty($lagerartikel)) {
|
if(empty($lagerartikel)) {
|
||||||
|
|
||||||
|
$app->erp->LogFile("Lagerzahlen-Synchronisation Ende: Keine fälligen Artikel");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -110,7 +116,7 @@ $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1");
|
||||||
}
|
}
|
||||||
|
|
||||||
$clagerartikel = $lagerartikel?count($lagerartikel):0;
|
$clagerartikel = $lagerartikel?count($lagerartikel):0;
|
||||||
$app->erp->LogFile('Artikel Gesamt fuer Synchronisation: '.$clagerartikel);
|
$app->erp->LogFile('Lagerzahlen-Synchronisation, Artikel gesamt: '.$clagerartikel);
|
||||||
foreach($lagerartikel as $ij => $articleId) {
|
foreach($lagerartikel as $ij => $articleId) {
|
||||||
$app->DB->Update(
|
$app->DB->Update(
|
||||||
"UPDATE `prozessstarter`
|
"UPDATE `prozessstarter`
|
||||||
|
|
@ -119,9 +125,9 @@ $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1");
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
if($anzargs > 2){
|
if($anzargs > 2){
|
||||||
$message .= $app->erp->LagerSync($articleId, true, $shopByIds);
|
$message .= $app->erp->LagerSync($articleId, false, $shopByIds); // 2nd parameter is print_echo -> prints via echo to logfile (big print_r)
|
||||||
}else{
|
}else{
|
||||||
$message .= $app->erp->LagerSync($articleId, true);
|
$message .= $app->erp->LagerSync($articleId, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $exception) {
|
catch (Exception $exception) {
|
||||||
|
|
@ -172,9 +178,10 @@ $firmendatenid = $app->DB->Select("SELECT MAX(id) FROM firmendaten LIMIT 1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $exception) {
|
catch (Exception $exception) {
|
||||||
$app->erp->LogFile($app->DB->real_escape_string($exception->getMessage()));
|
$app->erp->LogFile("Lagerzahlen-Synchronisation Exception:".$app->DB->real_escape_string($exception->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$app->erp->LogFile('Ende Synchronisation');
|
$app->erp->LogFile("Lagerzahlen-Synchronisation Ende");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16728,7 +16728,11 @@ INSERT INTO `firmendaten_werte` (`id`, `name`, `typ`, `typ1`, `typ2`, `wert`, `d
|
||||||
(385, 'cleaner_shopimport', 'tinyint', '1', '', '1', '1', 0, 0),
|
(385, 'cleaner_shopimport', 'tinyint', '1', '', '1', '1', 0, 0),
|
||||||
(386, 'cleaner_shopimport_tage', 'int', '11', '', '90', '90', 0, 0),
|
(386, 'cleaner_shopimport_tage', 'int', '11', '', '90', '90', 0, 0),
|
||||||
(387, 'cleaner_adapterbox', 'tinyint', '1', '', '1', '1', 0, 0),
|
(387, 'cleaner_adapterbox', 'tinyint', '1', '', '1', '1', 0, 0),
|
||||||
(388, 'cleaner_adapterbox_tage', 'int', '11', '', '90', '90', 0, 0);
|
(388, 'cleaner_adapterbox_tage', 'int', '11', '', '90', '90', 0, 0),
|
||||||
|
(389, 'bcc3', 'varchar', '128', '', '', '', 0, 0),
|
||||||
|
(390, 'rechnungersatz_standard', 'int', '1', '', '0', '0', 0, 0)
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
INSERT INTO `geschaeftsbrief_vorlagen` (`id`, `sprache`, `betreff`, `text`, `subjekt`, `projekt`, `firma`) VALUES
|
INSERT INTO `geschaeftsbrief_vorlagen` (`id`, `sprache`, `betreff`, `text`, `subjekt`, `projekt`, `firma`) VALUES
|
||||||
(1, 'deutsch', 'Bestellung {BELEGNR} von {FIRMA}', '{ANSCHREIBEN},<br><br>anbei übersenden wir Ihnen unsere Bestellung zu. Bitte senden Sie uns als Bestätigung für den Empfang eine Auftragsbestätigung zu.', 'Bestellung', 1, 1),
|
(1, 'deutsch', 'Bestellung {BELEGNR} von {FIRMA}', '{ANSCHREIBEN},<br><br>anbei übersenden wir Ihnen unsere Bestellung zu. Bitte senden Sie uns als Bestätigung für den Empfang eine Auftragsbestätigung zu.', 'Bestellung', 1, 1),
|
||||||
|
|
@ -16747,6 +16751,44 @@ INSERT INTO `geschaeftsbrief_vorlagen` (`id`, `sprache`, `betreff`, `text`, `sub
|
||||||
(16, 'deutsch', 'Zusammenstellung Ihrer Bestellung', '{ANSCHREIBEN},<br><br>soeben wurde Ihr Bestellung zusammengestellt. Sie können Ihre Ware jetzt abholen. Sind Sie bereits bei uns gewesen, so sehen Sie diese E-Mail bitte als gegenstandslos an.<br><br>{VERSAND}<br><br>Ihr {FIRMA} Team<br>', 'Selbstabholer', 0, 1),
|
(16, 'deutsch', 'Zusammenstellung Ihrer Bestellung', '{ANSCHREIBEN},<br><br>soeben wurde Ihr Bestellung zusammengestellt. Sie können Ihre Ware jetzt abholen. Sind Sie bereits bei uns gewesen, so sehen Sie diese E-Mail bitte als gegenstandslos an.<br><br>{VERSAND}<br><br>Ihr {FIRMA} Team<br>', 'Selbstabholer', 0, 1),
|
||||||
(17, 'deutsch', 'Ihre Gutschrift {BELEGNR} von {FIRMA}', '{ANSCHREIBEN},<br><br>anbei finden Sie Ihre Gutschrift. Gerne stehen wir Ihnen weiterhin zur Verfügung.<br><br>Ihre Gutschrift ist im PDF-Format erstellt worden. Um sich die Gutschrift ansehen zu können, klicken Sie auf den Anhang und es öffnet sich automatisch der Acrobat Reader. Sollten Sie keinen Acrobat Reader besitzen, haben wir für Sie den Link zum kostenlosen Download von Adobe Acrobat Reader mit angegeben. Er führt Sie automatisch auf die Downloadseite von Adobe. So können Sie sich Ihre Gutschrift auch für Ihre Unterlagen ausdrucken.<br><br>http://www.adobe.com/products/acrobat/readstep2.html<br><br>{IF}{INTERNET}{THEN}Internet-Bestellnr.: {INTERNET}{ELSE}{ENDIF}', 'Gutschrift', 1, 1);
|
(17, 'deutsch', 'Ihre Gutschrift {BELEGNR} von {FIRMA}', '{ANSCHREIBEN},<br><br>anbei finden Sie Ihre Gutschrift. Gerne stehen wir Ihnen weiterhin zur Verfügung.<br><br>Ihre Gutschrift ist im PDF-Format erstellt worden. Um sich die Gutschrift ansehen zu können, klicken Sie auf den Anhang und es öffnet sich automatisch der Acrobat Reader. Sollten Sie keinen Acrobat Reader besitzen, haben wir für Sie den Link zum kostenlosen Download von Adobe Acrobat Reader mit angegeben. Er führt Sie automatisch auf die Downloadseite von Adobe. So können Sie sich Ihre Gutschrift auch für Ihre Unterlagen ausdrucken.<br><br>http://www.adobe.com/products/acrobat/readstep2.html<br><br>{IF}{INTERNET}{THEN}Internet-Bestellnr.: {INTERNET}{ELSE}{ENDIF}', 'Gutschrift', 1, 1);
|
||||||
|
|
||||||
|
|
||||||
|
/* DBXE 2024-01-24 für datatablelabel */
|
||||||
|
INSERT INTO `hook` (`name`, `aktiv`, `parametercount`, `alias`, `description`) VALUES
|
||||||
|
('eproosystem_ende', 1, 0, '', ''),
|
||||||
|
('parseuservars', 1, 0, '', ''),
|
||||||
|
('dokumentsend_ende', 1, 0, '', ''),
|
||||||
|
('auftrag_versand_ende', 1, 0, '', ''),
|
||||||
|
('transfer_document_incoming', 1, 0, '', '')
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO `hook_register` (`hook_action`, `function`, `aktiv`, `position`, `hook`, `module`, `module_parameter`) VALUES
|
||||||
|
(0, 'DataTableLabelsInclude', 1, 3, (SELECT id FROM hook WHERE name = 'eproosystem_ende'), 'Datatablelabels', 0),
|
||||||
|
(0, 'DatatablelabelsParseUserVars', 1, 2, (SELECT id FROM hook WHERE name = 'parseuservars'), 'Datatablelabels', 0),
|
||||||
|
(0, 'DataTableLabelsDokumentSendHook', 1, 1, (SELECT id FROM hook WHERE name = 'dokumentsend_ende'), 'Datatablelabels', 0),
|
||||||
|
(0, 'DatatablelabelsOrderSent', 1, 1, (SELECT id FROM hook WHERE name = 'auftrag_versand_ende'), 'Datatablelabels', 0),
|
||||||
|
(0, 'DatatablelabelsTransferDocumentIncomming', 1, 1, (SELECT id FROM hook WHERE name = 'transfer_document_incoming'), 'Datatablelabels', 0);
|
||||||
|
/* DBXE 2024-01-24 für datatablelabel */
|
||||||
|
|
||||||
|
/* OpenXE 2024-02-03 für belegvorlagen */
|
||||||
|
INSERT INTO `hook` (`name`, `aktiv`, `parametercount`, `alias`, `description`) VALUES
|
||||||
|
('BelegPositionenButtons', 1, 3, '', ''),
|
||||||
|
('AARLGPositionen_cmds_end', 1, 1, '', ''),
|
||||||
|
('ajax_filter_hook1', 1, 1, '', '');
|
||||||
|
|
||||||
|
INSERT INTO `hook_register` (`hook_action`, `function`, `aktiv`, `position`, `hook`, `module`, `module_parameter`) VALUES
|
||||||
|
(0, 'BelegevorlagenAARLGPositionen_cmds_end', 1, 2, (SELECT id FROM hook WHERE name = 'AARLGPositionen_cmds_end' LIMIT 1), 'belegevorlagen', 0),
|
||||||
|
(0, 'Belegevorlagenajax_filter_hook1', 1, 2, (SELECT id FROM hook WHERE name = 'ajax_filter_hook1' LIMIT 1), 'belegevorlagen', 0),
|
||||||
|
(0, 'BelegevorlagenBelegPositionenButtons', 1, 2, (SELECT id FROM hook WHERE name = 'BelegPositionenButtons' LIMIT 1), 'belegevorlagen', 0)
|
||||||
|
;
|
||||||
|
/* DBXE 2024-02-03 für belegvorlagen */
|
||||||
|
|
||||||
|
/*
|
||||||
|
BelegPositionenButtons
|
||||||
|
|
||||||
|
Id,Hook_action,Function,Aktiv,Position,Hook,Module,Module_parameter
|
||||||
|
20,0,BelegevorlagenBelegPositionenButtons,1,2,16,belegevorlagen,0
|
||||||
|
*/
|
||||||
|
|
||||||
INSERT INTO `hook_menu` (`id`, `module`, `aktiv`) VALUES
|
INSERT INTO `hook_menu` (`id`, `module`, `aktiv`) VALUES
|
||||||
(1, 'artikel', 1),
|
(1, 'artikel', 1),
|
||||||
(2, 'provisionenartikel', 1),
|
(2, 'provisionenartikel', 1),
|
||||||
|
|
@ -16798,8 +16840,8 @@ INSERT INTO `prozessstarter` (`id`, `bezeichnung`, `bedingung`, `art`, `startzei
|
||||||
(6, 'Überzahlte Rechnungen', '', 'uhrzeit', '2015-10-25 23:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'ueberzahlterechnungen', 0, 0, 0, 1, ''),
|
(6, 'Überzahlte Rechnungen', '', 'uhrzeit', '2015-10-25 23:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'ueberzahlterechnungen', 0, 0, 0, 1, ''),
|
||||||
(7, 'Umsatzstatistik', '', 'uhrzeit', '2015-10-25 23:30:00', '0000-00-00 00:00:00', '', 'cronjob', 'umsatzstatistik', 0, 0, 0, 1, ''),
|
(7, 'Umsatzstatistik', '', 'uhrzeit', '2015-10-25 23:30:00', '0000-00-00 00:00:00', '', 'cronjob', 'umsatzstatistik', 0, 0, 0, 1, ''),
|
||||||
(8, 'Paketmarken Tracking Download', '', 'uhrzeit', '2015-10-25 14:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'wgettracking', 0, 0, 0, 1, ''),
|
(8, 'Paketmarken Tracking Download', '', 'uhrzeit', '2015-10-25 14:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'wgettracking', 0, 0, 0, 1, ''),
|
||||||
(9, 'Chat-Benachrichtigung', '', 'periodisch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '60', 'cronjob', 'chat', 0, 0, 0, 1, ''),
|
(9, 'Lagerhistorie', '', 'uhrzeit', '2015-10-25 00:00:00', '0000-00-00 00:00:00', '', 'cronjob', 'lagerwert', 0, 0, 0, 1, ''),
|
||||||
(10, 'Git Revision einlesen', '', 'periodisch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '120', 'cronjob', 'githash', 1, 0, 0, 1, '');
|
(10, 'Chat-Benachrichtigung', '', 'periodisch', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '60', 'cronjob', 'chat', 0, 0, 0, 1, '');
|
||||||
|
|
||||||
INSERT INTO `user` (`id`, `username`, `password`, `repassword`, `description`, `settings`, `parentuser`, `activ`, `type`, `adresse`, `fehllogins`, `standarddrucker`, `firma`, `logdatei`, `startseite`, `hwtoken`, `hwkey`, `hwcounter`, `motppin`, `motpsecret`, `passwordmd5`, `externlogin`, `projekt_bevorzugen`, `email_bevorzugen`, `projekt`, `rfidtag`, `vorlage`, `kalender_passwort`, `kalender_ausblenden`, `kalender_aktiv`, `gpsstechuhr`, `standardetikett`, `standardfax`, `internebezeichnung`, `hwdatablock`, `standardversanddrucker`, `passwordsha512`, `salt`) VALUES
|
INSERT INTO `user` (`id`, `username`, `password`, `repassword`, `description`, `settings`, `parentuser`, `activ`, `type`, `adresse`, `fehllogins`, `standarddrucker`, `firma`, `logdatei`, `startseite`, `hwtoken`, `hwkey`, `hwcounter`, `motppin`, `motpsecret`, `passwordmd5`, `externlogin`, `projekt_bevorzugen`, `email_bevorzugen`, `projekt`, `rfidtag`, `vorlage`, `kalender_passwort`, `kalender_ausblenden`, `kalender_aktiv`, `gpsstechuhr`, `standardetikett`, `standardfax`, `internebezeichnung`, `hwdatablock`, `standardversanddrucker`, `passwordsha512`, `salt`) VALUES
|
||||||
(1, 'admin', 'qnvEQ1sFWNdIg', 0, 'Administrator', 'firstinstall', 0, 1, 'admin', 1, 0, 0, 1, '2016-08-05 08:34:59', NULL, NULL, NULL, NULL, NULL, NULL, '21232f297a57a5a743894a0e4a801fc3', 1, 0, 1, 0, '', NULL, NULL, 0, NULL, NULL, 0, 0, NULL, NULL, 0, '', '');
|
(1, 'admin', 'qnvEQ1sFWNdIg', 0, 'Administrator', 'firstinstall', 0, 1, 'admin', 1, 0, 0, 1, '2016-08-05 08:34:59', NULL, NULL, NULL, NULL, NULL, NULL, '21232f297a57a5a743894a0e4a801fc3', 1, 0, 1, 0, '', NULL, NULL, 0, NULL, NULL, 0, 0, NULL, NULL, 0, '', '');
|
||||||
|
|
@ -18168,7 +18210,7 @@ INSERT INTO `wiedervorlage_stages` (`id`, `kurzbezeichnung`, `name`, `hexcolor`,
|
||||||
(12, 'Stay', 'Stay (Erhalt)', '#A2D624', 0, 1, 4, 4, NULL),
|
(12, 'Stay', 'Stay (Erhalt)', '#A2D624', 0, 1, 4, 4, NULL),
|
||||||
(13, 'Okay', 'Okay (Befürwortung)', '#A2D624', 0, 1, 5, 4, NULL);
|
(13, 'Okay', 'Okay (Befürwortung)', '#A2D624', 0, 1, 5, 4, NULL);
|
||||||
INSERT INTO `wiki` (`id`, `name`, `content`, `lastcontent`) VALUES
|
INSERT INTO `wiki` (`id`, `name`, `content`, `lastcontent`) VALUES
|
||||||
(1, 'StartseiteWiki', '\n<p>Herzlich Willkommen in Ihrem OpenXE, dem freien ERP.<br><br>Wir freuen uns Sie als Benutzer begrüßen zu dürfen. Mit OpenXE organisieren Sie Ihre Firma schnell und einfach. Sie haben alle wichtigen Zahlen und Vorgänge im Überblick.<br><br>Für Einsteiger sind die folgenden Themen wichtig:<br><br></p>\n<ul>\n<li> <a href="index.php?module=firmendaten&action=edit" target="_blank"> Firmendaten</a> (dort richten Sie Ihr Briefpapier ein)</li>\n<li> <a href="index.php?module=adresse&action=list" target="_blank"> Stammdaten / Adressen</a> (Kunden und Lieferanten anlegen)</li>\n<li> <a href="index.php?module=artikel&action=list" target="_blank"> Artikel anlegen</a> (Ihr Artikelstamm)</li>\n<li> <a href="index.php?module=angebot&action=list" target="_blank"> Angebot</a> / <a href="index.php?module=auftrag&action=list" target="_blank"> Auftrag</a> (Alle Dokumente für Ihr Geschäft)</li>\n<li> <a href="index.php?module=rechnung&action=list" target="_blank"> Rechnung</a> / <a href="index.php?module=gutschrift&action=list" target="_blank"> Gutschrift</a></li>\n<li> <a href="index.php?module=lieferschein&action=list" target="_blank"> Lieferschein</a></li>\n</ul>\n<p><br><br>Kennen Sie unsere Zusatzmodule die Struktur und Organisation in das tägliche Geschäft bringen?<br><br></p>\n<ul>\n<li> <a href="index.php?module=kalender&action=list" target="_blank"> Kalender</a></li>\n<li> <a href="index.php?module=wiki&action=list" target="_blank"> Wiki</a></li>\n</ul>', NULL);
|
(1, 'StartseiteWiki', '\n<p>Herzlich Willkommen in Ihrem DBXE, dem freien ERP.<br><br>Wir freuen uns Sie als Benutzer begrüßen zu dürfen. Mit DBXE organisieren Sie Ihre Firma schnell und einfach. Sie haben alle wichtigen Zahlen und Vorgänge im Überblick.<br><br>Für Einsteiger sind die folgenden Themen wichtig:<br><br></p>\n<ul>\n<li> <a href="index.php?module=firmendaten&action=edit" target="_blank"> Firmendaten</a> (dort richten Sie Ihr Briefpapier ein)</li>\n<li> <a href="index.php?module=adresse&action=list" target="_blank"> Stammdaten / Adressen</a> (Kunden und Lieferanten anlegen)</li>\n<li> <a href="index.php?module=artikel&action=list" target="_blank"> Artikel anlegen</a> (Ihr Artikelstamm)</li>\n<li> <a href="index.php?module=angebot&action=list" target="_blank"> Angebot</a> / <a href="index.php?module=auftrag&action=list" target="_blank"> Auftrag</a> (Alle Dokumente für Ihr Geschäft)</li>\n<li> <a href="index.php?module=rechnung&action=list" target="_blank"> Rechnung</a> / <a href="index.php?module=gutschrift&action=list" target="_blank"> Gutschrift</a></li>\n<li> <a href="index.php?module=lieferschein&action=list" target="_blank"> Lieferschein</a></li>\n</ul>\n<p><br><br>Kennen Sie unsere Zusatzmodule die Struktur und Organisation in das tägliche Geschäft bringen?<br><br></p>\n<ul>\n<li> <a href="index.php?module=kalender&action=list" target="_blank"> Kalender</a></li>\n<li> <a href="index.php?module=wiki&action=list" target="_blank"> Wiki</a></li>\n</ul>', NULL);
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `konten` (`id`, `bezeichnung`, `kurzbezeichnung`, `type`, `erstezeile`, `datevkonto`, `blz`, `konto`, `swift`, `iban`, `lastschrift`, `hbci`, `hbcikennung`, `inhaber`, `aktiv`, `keineemail`, `firma`, `schreibbar`, `importletztenzeilenignorieren`, `liveimport`, `liveimport_passwort`, `liveimport_online`, `importtrennzeichen`, `codierung`, `importerstezeilenummer`, `importdatenmaskierung`, `importnullbytes`, `glaeubiger`, `geloescht`, `projekt`, `saldo_summieren`, `saldo_betrag`, `saldo_datum`, `importfelddatum`, `importfelddatumformat`, `importfelddatumformatausgabe`, `importfeldbetrag`, `importfeldbetragformat`, `importfeldbuchungstext`, `importfeldbuchungstextformat`, `importfeldwaehrung`, `importfeldwaehrungformat`, `importfeldhabensollkennung`, `importfeldkennunghaben`, `importfeldkennungsoll`, `importextrahabensoll`, `importfeldhaben`, `importfeldsoll`, `cronjobaktiv`, `cronjobverbuchen`) VALUES
|
INSERT INTO `konten` (`id`, `bezeichnung`, `kurzbezeichnung`, `type`, `erstezeile`, `datevkonto`, `blz`, `konto`, `swift`, `iban`, `lastschrift`, `hbci`, `hbcikennung`, `inhaber`, `aktiv`, `keineemail`, `firma`, `schreibbar`, `importletztenzeilenignorieren`, `liveimport`, `liveimport_passwort`, `liveimport_online`, `importtrennzeichen`, `codierung`, `importerstezeilenummer`, `importdatenmaskierung`, `importnullbytes`, `glaeubiger`, `geloescht`, `projekt`, `saldo_summieren`, `saldo_betrag`, `saldo_datum`, `importfelddatum`, `importfelddatumformat`, `importfelddatumformatausgabe`, `importfeldbetrag`, `importfeldbetragformat`, `importfeldbuchungstext`, `importfeldbuchungstextformat`, `importfeldwaehrung`, `importfeldwaehrungformat`, `importfeldhabensollkennung`, `importfeldkennunghaben`, `importfeldkennungsoll`, `importextrahabensoll`, `importfeldhaben`, `importfeldsoll`, `cronjobaktiv`, `cronjobverbuchen`) VALUES
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
f64f6f64cbe6499f4060a487603626a6d712a484
|
|
||||||
|
|
@ -765,6 +765,7 @@ $tooltip['firmendaten']['edit']['bezeichnungangebotersatz']="Im Angebot gibt es
|
||||||
$tooltip['firmendaten']['edit']['angebotersatz_standard']="Mit dieser Option setzen Sie die alternative Bezeichnung im Angebot (Option drüber) als Standard. Dadurch ist der Haken beim Erstellen eines neuen Angebots immer gesetzt.";
|
$tooltip['firmendaten']['edit']['angebotersatz_standard']="Mit dieser Option setzen Sie die alternative Bezeichnung im Angebot (Option drüber) als Standard. Dadurch ist der Haken beim Erstellen eines neuen Angebots immer gesetzt.";
|
||||||
$tooltip['firmendaten']['edit']['bezeichnungauftragersatz']="Im Auftrag gibt es einen Haken um den Betreff des Augtrag-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
$tooltip['firmendaten']['edit']['bezeichnungauftragersatz']="Im Auftrag gibt es einen Haken um den Betreff des Augtrag-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
||||||
$tooltip['firmendaten']['edit']['bezeichnungrechnungersatz']="In der Rechnung gibt es einen Haken um den Betreff des Rechnung-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
$tooltip['firmendaten']['edit']['bezeichnungrechnungersatz']="In der Rechnung gibt es einen Haken um den Betreff des Rechnung-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
||||||
|
$tooltip['firmendaten']['edit']['rechnungersatz_standard']="Mit dieser Option setzen Sie die alternative Bezeichnung in der Rechnung (Option drüber) als Standard. Dadurch ist der Haken beim Erstellen einer neuen Rechnung immer gesetzt.";
|
||||||
$tooltip['firmendaten']['edit']['bezeichnunglieferscheinersatz']="Im Lieferschein gibt es einen Haken um den Betreff des Lieferschein-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
$tooltip['firmendaten']['edit']['bezeichnunglieferscheinersatz']="Im Lieferschein gibt es einen Haken um den Betreff des Lieferschein-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
||||||
$tooltip['firmendaten']['edit']['bezeichnungbestellungersatz']="In der Bestellung gibt es einen Haken um den Betreff des Bestell-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
$tooltip['firmendaten']['edit']['bezeichnungbestellungersatz']="In der Bestellung gibt es einen Haken um den Betreff des Bestell-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
||||||
$tooltip['firmendaten']['edit']['bezeichnungproformarechnungersatz']="In der Proformarechnung gibt es einen Haken um den Betreff der Proformarechnung-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
$tooltip['firmendaten']['edit']['bezeichnungproformarechnungersatz']="In der Proformarechnung gibt es einen Haken um den Betreff der Proformarechnung-Belegs umzubenennen.<br>Mit der Option hier legen Sie den Namen des alternativen Betreffs fest.";
|
||||||
|
|
@ -1083,9 +1084,9 @@ $tooltip['produktionszentrum']['abschluss']['#auftragmengenanpassen']="Die Menge
|
||||||
|
|
||||||
$tooltip['produktion']['abschluss']['#mengeerfolgreich'] = 'Höhere Mengen als die geplante Menge können nur mit der deaktivierten (kein Haken setzen) Systemeinstellung "Produktionskorrektur nicht verwenden" verbucht werden. ';
|
$tooltip['produktion']['abschluss']['#mengeerfolgreich'] = 'Höhere Mengen als die geplante Menge können nur mit der deaktivierten (kein Haken setzen) Systemeinstellung "Produktionskorrektur nicht verwenden" verbucht werden. ';
|
||||||
$tooltip['produktion']['edit']['#mengeerfolgreich'] = $tooltip['produktion']['abschluss']['#mengeerfolgreich'];
|
$tooltip['produktion']['edit']['#mengeerfolgreich'] = $tooltip['produktion']['abschluss']['#mengeerfolgreich'];
|
||||||
$tooltip['produktion']['create']['#standardlager'] = "Lager, aus dem die Artikel für die Produktion ausgelagert werden sollen.Hier können alle Lager ausgewählt werden, in denen sich mindestens ein Lagerplatz befindet, aus dem Produktionen ausgelagert werden dürfen (Einstellung auf Regalebene unter Lager => Lagerverwaltung).";
|
$tooltip['produktion']['create']['#standardlager'] = "Lager, aus dem die Artikel für die Produktion ausgelagert werden sollen. Hier können alle Lager ausgewählt werden, in denen sich mindestens ein Lagerplatz befindet, aus dem Produktionen ausgelagert werden dürfen (Einstellung auf Regalebene unter Lager => Lagerverwaltung).";
|
||||||
$tooltip['produktion']['edit']['#standardlager'] = $tooltip['produktion']['create']['#standardlager'];
|
$tooltip['produktion']['edit']['#standardlager'] = $tooltip['produktion']['create']['#standardlager'];
|
||||||
|
$tooltip['produktion']['edit']['#ziellager'] = "Wenn kein Ziellager angegenen ist, wird in das Standard-Lager des Artikels gebucht, wenn es das nicht gibt, in das Materiallager der Produktion.";
|
||||||
|
|
||||||
/* PROJEKT */
|
/* PROJEKT */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ class Acl
|
||||||
break;
|
break;
|
||||||
case 'dateien':
|
case 'dateien':
|
||||||
|
|
||||||
$sql = "SELECT objekt FROM datei_stichwoerter WHERE datei = %s";
|
$sql = "SELECT objekt FROM datei_stichwoerter WHERE datei = %s LIMIT 1";
|
||||||
$dateiModul = strtolower($this->app->DB->Select(sprintf($sql,$id)));
|
$dateiModul = strtolower($this->app->DB->Select(sprintf($sql,$id)));
|
||||||
|
|
||||||
//TODO datei_stichwoerter.objekt ist nicht zuverlässig für alle Datentypen. Deswegen nur zur Absicherung der bekannten Fälle #604706
|
//TODO datei_stichwoerter.objekt ist nicht zuverlässig für alle Datentypen. Deswegen nur zur Absicherung der bekannten Fälle #604706
|
||||||
|
|
@ -570,10 +570,23 @@ class Acl
|
||||||
|
|
||||||
public function Login()
|
public function Login()
|
||||||
{
|
{
|
||||||
$this->app->Tpl->Set('LOGINWARNING', 'display:none;visibility:hidden;');
|
|
||||||
if($this->IsInLoginLockMode() === true){
|
$this->refresh_githash();
|
||||||
$this->app->Tpl->Set('LOGINWARNING', '');
|
include dirname(__DIR__).'/../version.php';
|
||||||
return;
|
$this->app->Tpl->Set('XENTRALVERSION',"V.".$version_revision);
|
||||||
|
|
||||||
|
$this->app->Tpl->Set('LOGINWARNING_VISIBLE', 'hidden');
|
||||||
|
|
||||||
|
$result = $this->CheckHtaccess();
|
||||||
|
if ($result !== true) {
|
||||||
|
$this->app->Tpl->Set('LOGINWARNING_VISIBLE', '');
|
||||||
|
$this->app->Tpl->Set('LOGINWARNING_TEXT', "Achtung: Zugriffskonfiguration (htaccess) fehlerhaft. Bitte wenden Sie sich an Ihren an Ihren Administrator. <br>($result)");
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->IsInLoginLockMode() === true)
|
||||||
|
{
|
||||||
|
$this->app->Tpl->Set('LOGINWARNING_VISIBLE', '');
|
||||||
|
$this->app->Tpl->Set('LOGINWARNING_TEXT', 'Achtung: Es werden gerade Wartungsarbeiten in Ihrem System (z.B. Update oder Backup) durch Ihre IT-Abteilung durchgeführt. Das System sollte in wenigen Minuten wieder erreichbar sein. Für Rückfragen wenden Sie sich bitte an Ihren Administrator.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$multidbs = $this->app->getDbs();
|
$multidbs = $this->app->getDbs();
|
||||||
|
|
@ -1206,4 +1219,114 @@ class Acl
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HTACCESS SECURITY
|
||||||
|
// Check for correct .htaccess settings
|
||||||
|
// true if ok, else error text
|
||||||
|
protected function CheckHtaccess() {
|
||||||
|
|
||||||
|
$nominal = array('
|
||||||
|
# Generated file from class.acl.php
|
||||||
|
# For detection of htaccess functionality
|
||||||
|
SetEnv OPENXE_HTACCESS on
|
||||||
|
# Disable directory browsing
|
||||||
|
Options -Indexes
|
||||||
|
# Set default page to index.php
|
||||||
|
DirectoryIndex "index.php"
|
||||||
|
# Deny general access
|
||||||
|
Order deny,allow
|
||||||
|
<FilesMatch ".">
|
||||||
|
Order Allow,Deny
|
||||||
|
Deny from all
|
||||||
|
</FilesMatch>
|
||||||
|
# Allow index.php
|
||||||
|
<Files "index.php">
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</Files>
|
||||||
|
# end
|
||||||
|
',
|
||||||
|
'
|
||||||
|
# Generated file from class.acl.php
|
||||||
|
# Disable directory browsing
|
||||||
|
Options -Indexes
|
||||||
|
# Deny access to all *.php
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
<FilesMatch "\.(css|jpg|jpeg|gif|png|svg|js|ico|css.map|js.map)$">
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</FilesMatch>
|
||||||
|
# Allow access to index.php
|
||||||
|
<Files index.php>
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</Files>
|
||||||
|
# Allow access to setup.php
|
||||||
|
<Files setup.php>
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</Files>
|
||||||
|
# Allow access to inline PDF viewer
|
||||||
|
<Files viewer.html>
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</Files>
|
||||||
|
<Files robots.txt>
|
||||||
|
Order Allow,Deny
|
||||||
|
Allow from all
|
||||||
|
</Files>
|
||||||
|
# end
|
||||||
|
');
|
||||||
|
|
||||||
|
$script_file_name = $_SERVER['SCRIPT_FILENAME'];
|
||||||
|
$htaccess_path = array(
|
||||||
|
dirname(dirname($script_file_name))."/.htaccess", // root
|
||||||
|
dirname($script_file_name)."/.htaccess"); // www
|
||||||
|
|
||||||
|
for ($count = 0;$count < 2;$count++) {
|
||||||
|
$htaccess = file_get_contents($htaccess_path[$count]);
|
||||||
|
|
||||||
|
if ($htaccess === false) {
|
||||||
|
$missing = true;
|
||||||
|
} else {
|
||||||
|
$htaccess = trim($htaccess);
|
||||||
|
}
|
||||||
|
$htaccess_nominal = trim($nominal[$count]);
|
||||||
|
$result = strcmp($htaccess,$htaccess_nominal);
|
||||||
|
|
||||||
|
if ($htaccess === false) {
|
||||||
|
return($htaccess_path[$count]." nicht vorhanden.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($result !== 0) {
|
||||||
|
return($htaccess_path[$count]." fehlerhaft.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($_SERVER['OPENXE_HTACCESS'])) {
|
||||||
|
return("htaccess nicht aktiv.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return(true);
|
||||||
|
// HTACCESS SECURITY END
|
||||||
|
}
|
||||||
|
|
||||||
|
function refresh_githash() {
|
||||||
|
$path = '../.git/';
|
||||||
|
if (!is_dir($path)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$head = trim(file_get_contents($path . 'HEAD'));
|
||||||
|
$refs = trim(substr($head,0,4));
|
||||||
|
if ($refs == 'ref:') {
|
||||||
|
$ref = substr($head,5);
|
||||||
|
$hash = trim(file_get_contents($path . $ref));
|
||||||
|
} else {
|
||||||
|
$hash = $head;
|
||||||
|
}
|
||||||
|
if (!empty($hash)) {
|
||||||
|
file_put_contents("../githash.txt", $hash);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,726 +0,0 @@
|
||||||
<?php
|
|
||||||
/*
|
|
||||||
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
|
|
||||||
*
|
|
||||||
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
|
|
||||||
*
|
|
||||||
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
|
|
||||||
*
|
|
||||||
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
|
|
||||||
* to obtain the text of the corresponding license version.
|
|
||||||
*
|
|
||||||
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
final class DatabaseUpgrade
|
|
||||||
{
|
|
||||||
/** @var Application $app */
|
|
||||||
private $app;
|
|
||||||
|
|
||||||
/** @var array $CheckColumnTableCache */
|
|
||||||
private $CheckColumnTableCache;
|
|
||||||
|
|
||||||
/** @var bool $check_column_missing_run */
|
|
||||||
private $check_column_missing_run=false;
|
|
||||||
|
|
||||||
/** @var array $check_column_missing */
|
|
||||||
private $check_column_missing=array();
|
|
||||||
|
|
||||||
/** @var array $check_index_missing */
|
|
||||||
private $check_index_missing=array();
|
|
||||||
|
|
||||||
/** @var array */
|
|
||||||
private $allTables = [];
|
|
||||||
|
|
||||||
/** @var array */
|
|
||||||
private $indexe = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Application $app
|
|
||||||
*/
|
|
||||||
public function __construct($app)
|
|
||||||
{
|
|
||||||
$this->app = $app;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function emptyTableCache(){
|
|
||||||
$this->CheckColumnTableCache = [];
|
|
||||||
$this->allTables = [];
|
|
||||||
$this->indexe = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool $force
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getAllTables($force = false)
|
|
||||||
{
|
|
||||||
if($force || empty($this->allTables)) {
|
|
||||||
$this->allTables = $this->app->DB->SelectFirstCols('SHOW TABLES');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->allTables;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
* @param string $pk
|
|
||||||
*/
|
|
||||||
public function createTable($table, $pk = 'id')
|
|
||||||
{
|
|
||||||
$sql = "CREATE TABLE `$table` (`".$pk."` INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`".$pk."`)) ENGINE = InnoDB DEFAULT CHARSET=utf8";
|
|
||||||
$this->app->DB->Query($sql);
|
|
||||||
$this->addPrimary($table, $pk);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
* @param string $pk
|
|
||||||
*/
|
|
||||||
public function addPrimary($table, $pk = 'id')
|
|
||||||
{
|
|
||||||
$this->CheckAlterTable(
|
|
||||||
"ALTER TABLE `$table`
|
|
||||||
ADD PRIMARY KEY (`".$pk."`)",
|
|
||||||
true
|
|
||||||
);
|
|
||||||
$this->CheckAlterTable(
|
|
||||||
"ALTER TABLE `$table`
|
|
||||||
MODIFY `".$pk."` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1",
|
|
||||||
true
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
* @param bool $force
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getIndexeCached($table, $force = false)
|
|
||||||
{
|
|
||||||
if($force || !isset($this->indexe[$table])){
|
|
||||||
$this->indexe[$table] = $this->app->DB->SelectArr(sprintf('SHOW INDEX FROM `%s`', $table));
|
|
||||||
if($this->indexe[$table] === null) {
|
|
||||||
$this->indexe[$table] = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->indexe[$table];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
*/
|
|
||||||
public function clearIndexCached($table)
|
|
||||||
{
|
|
||||||
if(!isset($this->indexe[$table])) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
unset($this->indexe[$table]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
* @param string $pk
|
|
||||||
*/
|
|
||||||
public function hasPrimaryKey($table, $pk = 'id')
|
|
||||||
{
|
|
||||||
$indexe = $this->getIndexeCached($table);
|
|
||||||
if(empty($indexe)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
foreach($indexe as $index) {
|
|
||||||
if($index['Column_name'] === $pk
|
|
||||||
&& $index['Key_name'] === 'PRIMARY'
|
|
||||||
&& (int)$index['Non_unique'] === 0
|
|
||||||
) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
* @param string $pk
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function CheckTable($table, $pk = 'id')
|
|
||||||
{
|
|
||||||
if($pk === 'id') {
|
|
||||||
$tables = $this->getAllTables();
|
|
||||||
if(!empty($tables)){
|
|
||||||
if(!in_array($table, $tables)){
|
|
||||||
$this->createTable($table, $pk);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(!$this->hasPrimaryKey($table, $pk)) {
|
|
||||||
$this->addPrimary($table, $pk);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$found = false;
|
|
||||||
$tables = $this->getAllTables(true);
|
|
||||||
if($tables) {
|
|
||||||
$found = in_array($table, $tables);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$check = $this->app->DB->Select("SELECT $pk FROM `$table` LIMIT 1");
|
|
||||||
if($check) {
|
|
||||||
$found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if($found==false)
|
|
||||||
{
|
|
||||||
$sql = "CREATE TABLE `$table` (`".$pk."` INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`".$pk."`)) ENGINE = InnoDB DEFAULT CHARSET=utf8";
|
|
||||||
$this->app->DB->Update($sql);
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table`
|
|
||||||
ADD PRIMARY KEY (`".$pk."`)");
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table`
|
|
||||||
MODIFY `".$pk."` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1");
|
|
||||||
}
|
|
||||||
if($pk !== 'id') {
|
|
||||||
$this->CheckColumn('created_at','timestamp',$table,"DEFAULT CURRENT_TIMESTAMP NOT NULL");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $column
|
|
||||||
* @param string $type
|
|
||||||
* @param string $table
|
|
||||||
* @param string $default
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function UpdateColumn($column,$type,$table,$default="NOT NULL")
|
|
||||||
{
|
|
||||||
$fields = $this->app->DB->SelectArr("show columns from `".$table."`");
|
|
||||||
if($fields)
|
|
||||||
{
|
|
||||||
foreach($fields as $val)
|
|
||||||
{
|
|
||||||
$field_array[] = $val['Field'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (in_array($column, $field_array))
|
|
||||||
{
|
|
||||||
$this->app->DB->Query('ALTER TABLE `'.$table.'` CHANGE `'.$column.'` `'.$column.'` '.$type.' '.$default.';');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $column
|
|
||||||
* @param string $table
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function DeleteColumn($column,$table)
|
|
||||||
{
|
|
||||||
$this->app->DB->Query('ALTER TABLE `'.$table.'` DROP `'.$column.'`;');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $column
|
|
||||||
* @param string $type
|
|
||||||
* @param string $table
|
|
||||||
* @param string $default
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function CheckColumn($column,$type,$table,$default="")
|
|
||||||
{
|
|
||||||
if($table === 'firmendaten')
|
|
||||||
{
|
|
||||||
if($this->app->DB->Select("SELECT `id` FROM `firmendaten_werte` WHERE `name` = '$column' LIMIT 1"))return;
|
|
||||||
}
|
|
||||||
if(!isset($this->CheckColumnTableCache[$table]))
|
|
||||||
{
|
|
||||||
$tmp=$this->app->DB->SelectArr("show columns from `".$table."`");
|
|
||||||
if($tmp)
|
|
||||||
{
|
|
||||||
foreach($tmp as $val)
|
|
||||||
{
|
|
||||||
$this->CheckColumnTableCache[$table][] = $val['Field'];
|
|
||||||
//$types[$val['Field']] = strtolower($val['Type']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isset($this->CheckColumnTableCache[$table]) && !in_array($column, $this->CheckColumnTableCache[$table]))
|
|
||||||
{
|
|
||||||
if($this->check_column_missing_run)
|
|
||||||
{
|
|
||||||
//$result = mysqli_query($this->app->DB->connection,'ALTER TABLE `'.$table.'` ADD `'.$column.'` '.$type.' '.$default.';');
|
|
||||||
$this->check_column_missing[$table][]=$column;
|
|
||||||
} else {
|
|
||||||
$result = $this->app->DB->Query('ALTER TABLE `'.$table.'` ADD `'.$column.'` '.$type.' '.$default.';');
|
|
||||||
if($table === 'firmendaten' && $this->app->DB->error())
|
|
||||||
{
|
|
||||||
if((method_exists($this->app->DB, 'errno2') && $this->app->DB->errno() == '1118')
|
|
||||||
|| strpos($this->app->DB->error(),'Row size too large') !== false
|
|
||||||
)
|
|
||||||
{
|
|
||||||
$this->ChangeFirmendatenToMyIsam();
|
|
||||||
$this->app->DB->Query('ALTER TABLE `'.$table.'` ADD `'.$column.'` '.$type.' '.$default.';');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $indexe
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
protected function getGroupedIndexe($indexe)
|
|
||||||
{
|
|
||||||
if(empty($indexe)) {
|
|
||||||
return $indexe;
|
|
||||||
}
|
|
||||||
$return = [];
|
|
||||||
foreach($indexe as $index) {
|
|
||||||
$keyName = $index['Key_name'];
|
|
||||||
$isUnique = $index['Non_unique'] == '0';
|
|
||||||
$seq = $index['Seq_in_index'];
|
|
||||||
$columnName = $index['Column_name'];
|
|
||||||
$return[$isUnique?'unique':'index'][$keyName][(int)$seq - 1] = $columnName;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $indexe
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
protected function getDoubleIndexeFromGroupedIndexe($indexe)
|
|
||||||
{
|
|
||||||
if(empty($indexe)) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
$ret = [];
|
|
||||||
foreach($indexe as $type => $indexArrs) {
|
|
||||||
$columnStrings = [];
|
|
||||||
foreach($indexArrs as $indexKey => $columns) {
|
|
||||||
$columnString = implode('|', $columns);
|
|
||||||
if(in_array($columnString, $columnStrings)) {
|
|
||||||
$ret[$type][] = $indexKey;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$columnStrings[] = $columnString;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
* @param array $indexe
|
|
||||||
* @param bool $noCache
|
|
||||||
*
|
|
||||||
* @return array|null
|
|
||||||
*/
|
|
||||||
public function CheckDoubleIndex($table, $indexe, $noCache = false)
|
|
||||||
{
|
|
||||||
$query = $noCache?null:$this->CheckAlterTable("SHOW INDEX FROM `$table`");
|
|
||||||
if(!$query) {
|
|
||||||
$indexeGrouped = $this->getGroupedIndexe($indexe);
|
|
||||||
$doubleIndexe = $this->getDoubleIndexeFromGroupedIndexe($indexeGrouped);
|
|
||||||
if(!empty($doubleIndexe)) {
|
|
||||||
$indexe = $this->getIndexeCached($table, true);
|
|
||||||
$indexeGrouped = $this->getGroupedIndexe($indexe);
|
|
||||||
$doubleIndexe = $this->getDoubleIndexeFromGroupedIndexe($indexeGrouped);
|
|
||||||
if(empty($doubleIndexe)) {
|
|
||||||
return $indexe;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach($doubleIndexe as $type => $doubleIndex) {
|
|
||||||
foreach($doubleIndex as $indexName) {
|
|
||||||
$this->app->DB->Query("ALTER TABLE `".$table."` DROP INDEX `".$indexName."`");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif($noCache) {
|
|
||||||
return $indexe;
|
|
||||||
}
|
|
||||||
$this->CheckAlterTable("SHOW INDEX FROM `$table`", true);
|
|
||||||
|
|
||||||
return $this->getIndexeCached($table, true);
|
|
||||||
}
|
|
||||||
if(empty($indexe) || count($indexe) == 1){
|
|
||||||
return $indexe;
|
|
||||||
}
|
|
||||||
$uniquearr = array();
|
|
||||||
$indexarr = array();
|
|
||||||
foreach($indexe as $index)
|
|
||||||
{
|
|
||||||
if($index['Key_name'] !== 'PRIMARY' && !empty($index['Column_name']))
|
|
||||||
{
|
|
||||||
if($index['Non_unique'])
|
|
||||||
{
|
|
||||||
$indexarr[$index['Key_name']][] = $index['Column_name'];
|
|
||||||
}else{
|
|
||||||
$uniquearr[$index['Key_name']][] = $index['Column_name'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$cindex = count($indexarr);
|
|
||||||
$cuniqe = count($uniquearr);
|
|
||||||
$changed = false;
|
|
||||||
if($cindex > 1)
|
|
||||||
{
|
|
||||||
$check = array();
|
|
||||||
foreach($indexarr as $key => $value)
|
|
||||||
{
|
|
||||||
if(empty($value))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if(count($value) > 1){
|
|
||||||
sort($value);
|
|
||||||
}
|
|
||||||
$vstr = implode(',', $value);
|
|
||||||
if(in_array($vstr, $check))
|
|
||||||
{
|
|
||||||
$this->app->DB->Query("DROP INDEX `".$key."` ON `".$table."`");
|
|
||||||
$changed = true;
|
|
||||||
}else{
|
|
||||||
$check[] = $vstr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if($cuniqe > 1)
|
|
||||||
{
|
|
||||||
$check = array();
|
|
||||||
foreach($uniquearr as $key => $value)
|
|
||||||
{
|
|
||||||
if(empty($value))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if(count($value) > 1){
|
|
||||||
sort($value);
|
|
||||||
}
|
|
||||||
$vstr = implode(',', $value);
|
|
||||||
if(in_array($vstr, $check))
|
|
||||||
{
|
|
||||||
$this->app->DB->Query("DROP UNIQUE `".$key."` ON `".$table."`");
|
|
||||||
$changed = true;
|
|
||||||
}else{
|
|
||||||
$check[] = $vstr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if($changed) {
|
|
||||||
return $this->getIndexeCached($table, true);
|
|
||||||
}
|
|
||||||
return $indexe;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
* @param string|array $column
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function CheckFulltextIndex($table,$column)
|
|
||||||
{
|
|
||||||
if(empty($table) || empty($column))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(!is_array($column))
|
|
||||||
{
|
|
||||||
$column = [$column];
|
|
||||||
}
|
|
||||||
$columnmasked = [];
|
|
||||||
foreach($column as $keyColumn => $valueColumn)
|
|
||||||
{
|
|
||||||
if(!empty($valueColumn))
|
|
||||||
{
|
|
||||||
$columnmasked[] = "`$valueColumn`";
|
|
||||||
}else{
|
|
||||||
unset($column[$keyColumn]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(empty($column))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
$columnsFound = [];
|
|
||||||
$indexe = $this->getIndexeCached($table, true);
|
|
||||||
$indexeFound = [];
|
|
||||||
if(!empty($indexe))
|
|
||||||
{
|
|
||||||
foreach($indexe as $index)
|
|
||||||
{
|
|
||||||
if($index['Index_type'] === 'FULLTEXT')
|
|
||||||
{
|
|
||||||
$indexeFound[] = $index['Column_name'];
|
|
||||||
if(!in_array($index['Column_name'], $columnsFound))
|
|
||||||
{
|
|
||||||
$columnsFound[] = $index['Column_name'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$cindexeFound = count($indexeFound);
|
|
||||||
$column = count($column);
|
|
||||||
if(($column === $cindexeFound) && (count($columnsFound) === $column))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if($cindexeFound > 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
$this->app->DB->Query(
|
|
||||||
"ALTER TABLE `$table`
|
|
||||||
ADD FULLTEXT INDEX `FullText`
|
|
||||||
(".implode(',',$columnmasked).");"
|
|
||||||
);
|
|
||||||
$error = $this->app->DB->error();
|
|
||||||
|
|
||||||
return empty($error);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
* @param string $column
|
|
||||||
* @param bool $unique
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function CheckIndex($table, $column, $unique = false)
|
|
||||||
{
|
|
||||||
$indexex = null;
|
|
||||||
$indexexother = null;
|
|
||||||
$indexe = $this->getIndexeCached($table);
|
|
||||||
if($indexe)
|
|
||||||
{
|
|
||||||
$indexe = $this->CheckDoubleIndex($table, $indexe, true);
|
|
||||||
foreach($indexe as $index)
|
|
||||||
{
|
|
||||||
if(is_array($column) && $index['Key_name'] !== 'PRIMARY')
|
|
||||||
{
|
|
||||||
if($unique && !$index['Non_unique'])
|
|
||||||
{
|
|
||||||
if(in_array($index['Column_name'], $column))
|
|
||||||
{
|
|
||||||
$indexex[$index['Key_name']][$index['Column_name']] = true;
|
|
||||||
}else{
|
|
||||||
$indexexother[$index['Key_name']][$index['Column_name']] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif(!$unique){
|
|
||||||
if(in_array($index['Column_name'], $column)) {
|
|
||||||
$indexex[$index['Key_name']][$index['Column_name']] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif(!is_array($column)){
|
|
||||||
if($index['Column_name'] == $column)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if($this->check_column_missing_run)
|
|
||||||
{
|
|
||||||
$this->check_index_missing[$table][] = $column;
|
|
||||||
}
|
|
||||||
if(!$unique)
|
|
||||||
{
|
|
||||||
if(is_array($column))
|
|
||||||
{
|
|
||||||
if($indexex)
|
|
||||||
{
|
|
||||||
foreach($indexex as $k => $v) {
|
|
||||||
if(count($v) === 1 && count($column) > 1) {
|
|
||||||
$this->app->DB->Query("DROP INDEX `".$k."` ON `".$table."`");
|
|
||||||
$this->clearIndexCached($table);
|
|
||||||
unset($indexex[$k]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach($indexex as $k => $v)
|
|
||||||
{
|
|
||||||
if(count($v) == count($column)){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach($indexex as $k => $v)
|
|
||||||
{
|
|
||||||
if(!isset($indexexother[$k]))
|
|
||||||
{
|
|
||||||
$this->app->DB->Query("DROP INDEX `".$k."` ON `".$table."`");
|
|
||||||
$cols = null;
|
|
||||||
foreach($column as $c) {
|
|
||||||
$cols[] = "`$c`";
|
|
||||||
}
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table` ADD INDEX(".implode(', ',$cols)."); ",true);
|
|
||||||
$this->clearIndexCached($table);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$cols = null;
|
|
||||||
foreach($column as $c) {
|
|
||||||
$cols[] = "`$c`";
|
|
||||||
}
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table` ADD INDEX(".implode(', ',$cols)."); ", true);
|
|
||||||
$this->clearIndexCached($table);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table` ADD INDEX(`$column`); ", true);
|
|
||||||
$this->clearIndexCached($table);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(is_array($column))
|
|
||||||
{
|
|
||||||
if($indexex)
|
|
||||||
{
|
|
||||||
foreach($indexex as $k => $v)
|
|
||||||
{
|
|
||||||
if(count($v) == count($column))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach($indexex as $k => $v)
|
|
||||||
{
|
|
||||||
if(!isset($indexexother[$k]))
|
|
||||||
{
|
|
||||||
$this->app->DB->Query("DROP INDEX `".$k."` ON `".$table."`");
|
|
||||||
$cols = null;
|
|
||||||
foreach($column as $c) {
|
|
||||||
$cols[] = "`$c`";
|
|
||||||
}
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table` ADD UNIQUE(".implode(', ',$cols)."); ", true);
|
|
||||||
$this->clearIndexCached($table);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$cols = null;
|
|
||||||
foreach($column as $c) {
|
|
||||||
$cols[] = "`$c`";
|
|
||||||
}
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table` ADD UNIQUE(".implode(', ',$cols)."); ", true);
|
|
||||||
$this->clearIndexCached($table);
|
|
||||||
}else{
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table` ADD UNIQUE(`$column`); ", true);
|
|
||||||
$this->clearIndexCached($table);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif(!is_array($column))
|
|
||||||
{
|
|
||||||
if(!$unique)
|
|
||||||
{
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table` ADD INDEX(`$column`); ");
|
|
||||||
}else{
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table` ADD UNIQUE(`$column`); ");
|
|
||||||
}
|
|
||||||
$this->clearIndexCached($table);
|
|
||||||
}
|
|
||||||
elseif(is_array($column))
|
|
||||||
{
|
|
||||||
$cols = null;
|
|
||||||
foreach($column as $c) {
|
|
||||||
$cols[] = "`$c`";
|
|
||||||
}
|
|
||||||
$this->CheckAlterTable("ALTER TABLE `$table` ADD UNIQUE(".implode(', ',$cols)."); ");
|
|
||||||
$this->clearIndexCached($table);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $sql
|
|
||||||
* @param bool $force
|
|
||||||
*
|
|
||||||
* @return mysqli_result|bool
|
|
||||||
*/
|
|
||||||
function CheckAlterTable($sql, $force = false)
|
|
||||||
{
|
|
||||||
$sqlmd5 = md5($sql);
|
|
||||||
$check = $this->app->DB->Select("SELECT id FROM checkaltertable WHERE checksum='$sqlmd5' LIMIT 1");
|
|
||||||
if($check > 0 && !$force) return;
|
|
||||||
$query = $this->app->DB->Query($sql);
|
|
||||||
if($query && empty($check) && !$this->app->DB->error()){
|
|
||||||
$this->app->DB->Insert("INSERT INTO checkaltertable (id,checksum) VALUES ('','$sqlmd5')");
|
|
||||||
}
|
|
||||||
return $query;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function ChangeFirmendatenToMyIsam()
|
|
||||||
{
|
|
||||||
$this->app->DB->Query("ALTER TABLE firmendaten ENGINE = MyISAM;");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $table
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getSortedIndexColumnsByIndexName($table): array
|
|
||||||
{
|
|
||||||
$indexesByName = [];
|
|
||||||
$indexes = $this->app->DB->SelectArr(sprintf('SHOW INDEX FROM `%s`', $table));
|
|
||||||
if(empty($indexes)) {
|
|
||||||
return $indexesByName;
|
|
||||||
}
|
|
||||||
foreach($indexes as $index) {
|
|
||||||
$indexesByName[$index['Key_name']][] = $index['Column_name'];
|
|
||||||
}
|
|
||||||
foreach($indexesByName as $indexName => $columns) {
|
|
||||||
$columns = array_unique($columns);
|
|
||||||
sort($columns);
|
|
||||||
$indexesByName[$indexName] = $columns;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $indexesByName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated will be removed in 21.4
|
|
||||||
*
|
|
||||||
* @param string $table
|
|
||||||
* @param array $columns
|
|
||||||
*/
|
|
||||||
public function dropIndex($table, $columns): void
|
|
||||||
{
|
|
||||||
if(empty($table) || empty($columns)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$columns = array_unique($columns);
|
|
||||||
sort($columns);
|
|
||||||
$countColumns = count($columns);
|
|
||||||
$indexes = $this->getSortedIndexColumnsByIndexName($table);
|
|
||||||
if(empty($indexes)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
foreach($indexes as $indexName => $indexColumns) {
|
|
||||||
if(count($indexColumns) !== $countColumns) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if(count(array_intersect($indexColumns, $columns)) === $countColumns) {
|
|
||||||
$this->app->DB->Query(sprintf('ALTER TABLE `%s` DROP INDEX `%s`', $table, $indexName));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1230,7 +1230,7 @@ class DB{
|
||||||
$sql = "UPDATE `$tablename` SET ";
|
$sql = "UPDATE `$tablename` SET ";
|
||||||
foreach($ArrCols as $key=>$value) {
|
foreach($ArrCols as $key=>$value) {
|
||||||
if($key!=$pkname && (isset($ziel[$key]) || !$zielspalten)) {
|
if($key!=$pkname && (isset($ziel[$key]) || !$zielspalten)) {
|
||||||
$sqla[] = $key." = '".($escape?$this->real_escape_string($value):$value)."' ";
|
$sqla[] = "`".$key."` = '".($escape?$this->real_escape_string($value):$value)."' ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($sqla)) {
|
if(!empty($sqla)) {
|
||||||
|
|
@ -1424,7 +1424,7 @@ class DB{
|
||||||
if(empty($TableName) || empty($IDFieldName) || empty($IDToDuplicate)) {
|
if(empty($TableName) || empty($IDFieldName) || empty($IDToDuplicate)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
$sql = "SELECT * FROM $TableName WHERE $IDFieldName = $IDToDuplicate";
|
$sql = "SELECT * FROM $TableName WHERE $IDFieldName = $IDToDuplicate";
|
||||||
$result = @mysqli_query($this->connection,$sql);
|
$result = @mysqli_query($this->connection,$sql);
|
||||||
if(empty($result)) {
|
if(empty($result)) {
|
||||||
|
|
@ -1442,6 +1442,23 @@ class DB{
|
||||||
}
|
}
|
||||||
$sql .= $RowKeys[$i] . " = '" . $this->real_escape_string($RowValues[$i]) . "'";
|
$sql .= $RowKeys[$i] . " = '" . $this->real_escape_string($RowValues[$i]) . "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mysqli_query($this->connection,$sql);
|
||||||
|
*/
|
||||||
|
|
||||||
|
$sql = "INSERT INTO ".$TableName." SELECT ";
|
||||||
|
$fields = $this->GetColAssocArray($TableName);
|
||||||
|
$comma = "";
|
||||||
|
foreach ($fields as $field => $value) {
|
||||||
|
if ($field != $IDFieldName) {
|
||||||
|
$sql .= $comma."`".$field."`";
|
||||||
|
} else {
|
||||||
|
$sql .= "NULL";
|
||||||
|
}
|
||||||
|
$comma = ", ";
|
||||||
|
}
|
||||||
|
$sql .= " FROM ".$TableName." WHERE id = ".$IDToDuplicate;
|
||||||
|
|
||||||
@mysqli_query($this->connection,$sql);
|
@mysqli_query($this->connection,$sql);
|
||||||
|
|
||||||
$id = $this->GetInsertID();
|
$id = $this->GetInsertID();
|
||||||
|
|
|
||||||
|
|
@ -135,8 +135,10 @@ class Secure
|
||||||
{
|
{
|
||||||
foreach($this->POST as $key=>$value)
|
foreach($this->POST as $key=>$value)
|
||||||
{
|
{
|
||||||
$key = $this->GetPOST($key,"alpha+digit+specialchars",20);
|
$value = $this->GetPOST($key);
|
||||||
$ret[$key]=$this->GetPOST($value);
|
if ($value !== null) {
|
||||||
|
$ret[$key] = $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($ret))
|
if(!empty($ret))
|
||||||
|
|
@ -153,8 +155,10 @@ class Secure
|
||||||
{
|
{
|
||||||
foreach($this->GET as $key=>$value)
|
foreach($this->GET as $key=>$value)
|
||||||
{
|
{
|
||||||
$key = $this->GetGET($key,"alpha+digit+specialchars",20);
|
$value = $this->GetGET($key);
|
||||||
$ret[$key]=$this->GetGET($value);
|
if ($value !== null) {
|
||||||
|
$ret[$key] = $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($ret))
|
if(!empty($ret))
|
||||||
|
|
|
||||||
|
|
@ -426,10 +426,12 @@
|
||||||
}
|
}
|
||||||
}elseif(is_object($xml))
|
}elseif(is_object($xml))
|
||||||
{
|
{
|
||||||
|
$xml = (array) $xml;
|
||||||
if(count($xml) > 0)
|
if(count($xml) > 0)
|
||||||
{
|
{
|
||||||
foreach($xml as $k => $v)
|
foreach($xml as $k => $v)
|
||||||
{
|
{
|
||||||
|
$v = (array) $v;
|
||||||
if(count($v) > 0)
|
if(count($v) > 0)
|
||||||
{
|
{
|
||||||
if($lvl < 10)
|
if($lvl < 10)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: 2022 Andreas Palm
|
||||||
|
* SPDX-FileCopyrightText: 2019 Xentral (c) Xentral ERP Software GmbH, Fuggerstrasse 11, D-86150 Augsburg, Germany
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
|
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
|
||||||
*
|
*
|
||||||
|
|
@ -163,28 +170,17 @@ class TemplateParser {
|
||||||
|
|
||||||
public function addMessage($class, $text, $html = false, $_var = 'MESSAGE')
|
public function addMessage($class, $text, $html = false, $_var = 'MESSAGE')
|
||||||
{
|
{
|
||||||
$ret = '';
|
if(!in_array($class, ['error', 'warning', 'info', 'success']))
|
||||||
switch($class)
|
|
||||||
{
|
|
||||||
case 'error':
|
|
||||||
case 'warning':
|
|
||||||
case 'info':
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$class = 'info';
|
$class = 'info';
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(!$html)
|
if(!$html)
|
||||||
{
|
{
|
||||||
$text = $this->htmlspecialchars($text);
|
$text = $this->htmlspecialchars($text);
|
||||||
}
|
}
|
||||||
$ret .= '<div class="'.$class.'">'.$text.'</div>';
|
$ret = sprintf('<div class="%s">%s</div>', $class, $text);
|
||||||
if($_var === 'return')
|
if($_var === 'return')
|
||||||
{
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
|
||||||
return $this->app->Tpl->Add($_var, $ret);
|
$this->app->Tpl->Add($_var, $ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addSelect($_var, $id, $name, $options, $selected = '', $class = '')
|
public function addSelect($_var, $id, $name, $options, $selected = '', $class = '')
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -388,7 +388,7 @@ class EasyTable {
|
||||||
{
|
{
|
||||||
$editcols = array(4,5,6,7);
|
$editcols = array(4,5,6,7);
|
||||||
}else{
|
}else{
|
||||||
$einkaufspreiseerlaubt = false;
|
$einkaufspreiseerlaubt = true;
|
||||||
if($einkaufspreiseerlaubt)
|
if($einkaufspreiseerlaubt)
|
||||||
{
|
{
|
||||||
$editcols =array(4,5,6,7,8,9);
|
$editcols =array(4,5,6,7,8,9);
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@
|
||||||
* PLACEHOLDER_GET_INPUT
|
* PLACEHOLDER_GET_INPUT
|
||||||
* PLACEHOLDER_SET_INPUT
|
* PLACEHOLDER_SET_INPUT
|
||||||
* PLACEHOLDER_COLUMNS
|
* PLACEHOLDER_COLUMNS
|
||||||
|
* PLACEHOLDER_ID_COLUMN
|
||||||
|
* PLACEHOLDER_HEADERS
|
||||||
* PLACEHOLDER_SET_TPL
|
* PLACEHOLDER_SET_TPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -109,6 +111,7 @@ if ($argc >= 2) {
|
||||||
$columns = array();
|
$columns = array();
|
||||||
$sql_columns = array();
|
$sql_columns = array();
|
||||||
$edit_form = "";
|
$edit_form = "";
|
||||||
|
$tab_pos = " "; // Tab position
|
||||||
|
|
||||||
/* Iterate through the result set */
|
/* Iterate through the result set */
|
||||||
echo "FIELD\t\t\t\tType\t\tNull\tKey\tDefault\tExtra\n";
|
echo "FIELD\t\t\t\tType\t\tNull\tKey\tDefault\tExtra\n";
|
||||||
|
|
@ -150,7 +153,16 @@ if ($argc >= 2) {
|
||||||
// <tr><td>{|Bezeichnung|}:*</td><td><input type="text" id="bezeichnung" name="bezeichnung" value="[BEZEICHNUNG]" size="40"></td></tr>
|
// <tr><td>{|Bezeichnung|}:*</td><td><input type="text" id="bezeichnung" name="bezeichnung" value="[BEZEICHNUNG]" size="40"></td></tr>
|
||||||
|
|
||||||
if ($row['Field'] != 'id') {
|
if ($row['Field'] != 'id') {
|
||||||
$edit_form = $edit_form . '<tr><td>{|' . ucfirst($row['Field']) . '|}:</td><td><input type="text" name="' . $row['Field'].'" id="'.$row['Field'].'" value="[' . strtoupper($row['Field']) . ']" size="20"></td></tr>' . "\n";
|
$edit_form = $edit_form.
|
||||||
|
'<tr>
|
||||||
|
<td>
|
||||||
|
{|' . ucfirst($row['Field']) . '|}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="' . $row['Field'].'" id="'.$row['Field'].'" value="[' . strtoupper($row['Field']) . ']" size="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
';
|
||||||
}
|
}
|
||||||
echo("\n");
|
echo("\n");
|
||||||
}
|
}
|
||||||
|
|
@ -164,6 +176,7 @@ if ($argc >= 2) {
|
||||||
// Create php file
|
// Create php file
|
||||||
|
|
||||||
$list_of_columns = implode(', ', $columns);
|
$list_of_columns = implode(', ', $columns);
|
||||||
|
$list_of_columns_headers_in_quotes = "'" . implode('\', \'', array_map('ucfirst',$columns)) . "'";
|
||||||
$list_of_columns_in_quotes = "'" . implode('\', \'', $columns) . "'";
|
$list_of_columns_in_quotes = "'" . implode('\', \'', $columns) . "'";
|
||||||
$sql_list_of_columns = implode(', ', $sql_columns);
|
$sql_list_of_columns = implode(', ', $sql_columns);
|
||||||
$sql_list_of_columns_in_quotes = "'" . implode('\', \'', $sql_columns) . "'";
|
$sql_list_of_columns_in_quotes = "'" . implode('\', \'', $sql_columns) . "'";
|
||||||
|
|
@ -194,6 +207,8 @@ if ($argc >= 2) {
|
||||||
$php_file_contents = str_replace('PLACEHOLDER_GET_INPUT', $get_input, $php_file_contents);
|
$php_file_contents = str_replace('PLACEHOLDER_GET_INPUT', $get_input, $php_file_contents);
|
||||||
$php_file_contents = str_replace('PLACEHOLDER_SET_INPUT', $set_input, $php_file_contents);
|
$php_file_contents = str_replace('PLACEHOLDER_SET_INPUT', $set_input, $php_file_contents);
|
||||||
$php_file_contents = str_replace('PLACEHOLDER_COLUMNS', $list_of_columns_in_quotes, $php_file_contents);
|
$php_file_contents = str_replace('PLACEHOLDER_COLUMNS', $list_of_columns_in_quotes, $php_file_contents);
|
||||||
|
$php_file_contents = str_replace('PLACEHOLDER_ID_COLUMN', $table_short_name.".id", $php_file_contents);
|
||||||
|
$php_file_contents = str_replace('PLACEHOLDER_HEADERS', $list_of_columns_headers_in_quotes, $php_file_contents);
|
||||||
$php_file_contents = str_replace('PLACEHOLDER_SQL_COLUMNS', $sql_list_of_columns_in_quotes, $php_file_contents);
|
$php_file_contents = str_replace('PLACEHOLDER_SQL_COLUMNS', $sql_list_of_columns_in_quotes, $php_file_contents);
|
||||||
|
|
||||||
$php_file = fopen($target_php_folder . $php_file_name, "w");
|
$php_file = fopen($target_php_folder . $php_file_name, "w");
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
<div id="tabs-1">
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tabs-1">[TABTEXT1]</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tabs-1">
|
||||||
[MESSAGE]
|
[MESSAGE]
|
||||||
[TAB1]
|
[TAB1]
|
||||||
[TAB1NEXT]
|
[TAB1NEXT]
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -30,20 +30,28 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||||
switch ($name) {
|
switch ($name) {
|
||||||
case "PLACEHOLDER_LIST":
|
case "PLACEHOLDER_LIST":
|
||||||
$allowed['PLACEHOLDER_LIST'] = array('list');
|
$allowed['PLACEHOLDER_LIST'] = array('list');
|
||||||
$heading = array('','',PLACEHOLDER_COLUMNS, 'Menü');
|
$heading = array('','',PLACEHOLDER_HEADERS, 'Menü');
|
||||||
$width = array('1%','1%','10%'); // Fill out manually later
|
$width = array('1%','1%','10%'); // Fill out manually later
|
||||||
|
|
||||||
// columns that are aligned right (numbers etc)
|
// columns that are aligned right (numbers etc)
|
||||||
// $alignright = array(4,5,6,7,8);
|
// $alignright = array(4,5,6,7,8);
|
||||||
|
|
||||||
$findcols = array(PLACEHOLDER_SQL_COLUMNS);
|
$findcols = array('PLACEHOLDER_ID_COLUMN','PLACEHOLDER_ID_COLUMN',PLACEHOLDER_SQL_COLUMNS);
|
||||||
$searchsql = array(PLACEHOLDER_SQL_COLUMNS);
|
$searchsql = array(PLACEHOLDER_SQL_COLUMNS);
|
||||||
|
|
||||||
$defaultorder = 1;
|
$defaultorder = 1;
|
||||||
$defaultorderdesc = 0;
|
$defaultorderdesc = 0;
|
||||||
|
$aligncenter = array();
|
||||||
|
$alignright = array();
|
||||||
|
$numbercols = array();
|
||||||
|
$sumcol = array();
|
||||||
|
|
||||||
$dropnbox = "PLACEHOLDER_DROPNBOX";
|
$dropnbox = "PLACEHOLDER_DROPNBOX";
|
||||||
|
|
||||||
|
// $moreinfo = true; // Allow drop down details
|
||||||
|
// $moreinfoaction = "lieferschein"; // specify suffix for minidetail-URL to allow different minidetails
|
||||||
|
// $menucol = 11; // Set id col for moredata/menu
|
||||||
|
|
||||||
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=PLACEHOLDER_MODULENAME&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=PLACEHOLDER_MODULENAME&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
|
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=PLACEHOLDER_MODULENAME&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=PLACEHOLDER_MODULENAME&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
|
||||||
|
|
||||||
$sql = "PLACEHOLDER_SQL_LIST";
|
$sql = "PLACEHOLDER_SQL_LIST";
|
||||||
|
|
@ -93,7 +101,7 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
// Check if other users are editing this id
|
// Check if other users are editing this id
|
||||||
if($this->app->erp->DisableModul('artikel',$id))
|
if($this->app->erp->DisableModul('PLACEHOLDER_MODULENAME',$id))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -118,6 +126,8 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||||
|
|
||||||
// Add checks here
|
// Add checks here
|
||||||
|
|
||||||
|
// $input['projekt'] = $this->app->erp->ReplaceProjekt(true,$input['projekt'],true); // Parameters: Target db?, value, from form?
|
||||||
|
|
||||||
$columns = "id, ";
|
$columns = "id, ";
|
||||||
$values = "$id, ";
|
$values = "$id, ";
|
||||||
$update = "";
|
$update = "";
|
||||||
|
|
@ -159,6 +169,12 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||||
$this->app->Tpl->Set(strtoupper($key), $value);
|
$this->app->Tpl->Set(strtoupper($key), $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($result)) {
|
||||||
|
$PLACEHOLDER_MODULENAME_from_db = $result[0];
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add displayed items later
|
* Add displayed items later
|
||||||
*
|
*
|
||||||
|
|
@ -166,9 +182,11 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||||
$this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email);
|
$this->app->Tpl->Add('KURZUEBERSCHRIFT2', $email);
|
||||||
$this->app->Tpl->Add('EMAIL', $email);
|
$this->app->Tpl->Add('EMAIL', $email);
|
||||||
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
$this->app->Tpl->Add('ANGEZEIGTERNAME', $angezeigtername);
|
||||||
|
|
||||||
|
$this->app->YUI->AutoComplete("artikel", "artikelnummer");
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// $this->SetInput($input);
|
|
||||||
$this->app->Tpl->Parse('PAGE', "PLACEHOLDER_MODULENAME_edit.tpl");
|
$this->app->Tpl->Parse('PAGE', "PLACEHOLDER_MODULENAME_edit.tpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -183,14 +201,4 @@ class PLACEHOLDER_MODULECLASSNAME {
|
||||||
|
|
||||||
return $input;
|
return $input;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Set all fields in the page corresponding to $input
|
|
||||||
*/
|
|
||||||
function SetInput($input) {
|
|
||||||
// $this->app->Tpl->Set('EMAIL', $input['email']);
|
|
||||||
|
|
||||||
PLACEHOLDER_SET_INPUT
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
<?php
|
|
||||||
header('Location: ./www/update.php?rand=' . sha1(mt_rand()));
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<?php
|
|
||||||
include("upgradesystemclient2.php");
|
|
||||||
include("upgradedbonly.php");
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
OpenXE upgrade system
|
||||||
|
|
||||||
|
NOTE:
|
||||||
|
The upgrade system is for use in LINUX only and needs to have git installed.
|
||||||
|
|
||||||
|
The following steps are executed:
|
||||||
|
1. get files from git
|
||||||
|
2. run database upgrade
|
||||||
|
|
||||||
|
Files in this directory:
|
||||||
|
UPGRADE.md -> This file
|
||||||
|
upgrade.sh -> The upgrade starter, execute with "./upgrade.sh". Execute without parameters to view possible options.
|
||||||
|
|
||||||
|
Files in the data subdirectory:
|
||||||
|
upgrade.php -> The upgrade program
|
||||||
|
db_schema.json -> Contains the nominal database structure
|
||||||
|
exported_db_schema.json -> Contains the exported database structure (optional)
|
||||||
|
remote.json -> Contains the git remote & branch which should be used for upgrade
|
||||||
|
upgrade.log -> Contains the output from the last run that was started from within OpenXE
|
||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue