Compare commits
1490 Commits
0.9.3
...
0.9.30-rc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2d873fe31 | ||
|
|
e0a4c9b8d1 | ||
|
|
207f5c69d4 | ||
|
|
1a99a272b1 | ||
|
|
e1fa5f6f0a | ||
|
|
8c8cb5a0d7 | ||
|
|
ff19d7209d | ||
|
|
92243991bc | ||
|
|
4b5b2db6db | ||
|
|
26885b0f35 | ||
|
|
4785c19b62 | ||
|
|
b744447714 | ||
|
|
e0184e2b40 | ||
|
|
82b109d170 | ||
|
|
d055c1ca72 | ||
|
|
b480a0be57 | ||
|
|
2ba1c1eb42 | ||
|
|
e7871cb5b4 | ||
|
|
72fcad5007 | ||
|
|
0b0126ed68 | ||
|
|
0651238e41 | ||
|
|
6a76e8a53f | ||
|
|
da0ae9040a | ||
|
|
b779a67e60 | ||
|
|
e670065a0f | ||
|
|
d74d61826f | ||
|
|
ed08303ec6 | ||
|
|
af136cf1f0 | ||
|
|
cbe7792929 | ||
|
|
b8960149ff | ||
|
|
553eca9b29 | ||
|
|
16917505af | ||
|
|
e078d39f2d | ||
|
|
56ef9e1992 | ||
|
|
455aa33d14 | ||
|
|
475e2bf735 | ||
|
|
4584afe5fd | ||
|
|
6af5608f0f | ||
|
|
718c19f230 | ||
|
|
11380a9819 | ||
|
|
933a47cf7f | ||
|
|
521acfbe5c | ||
|
|
08e9f3ebd0 | ||
|
|
fc0a069a74 | ||
|
|
1acf7d852d | ||
|
|
015e688a0e | ||
|
|
939c1950ea | ||
|
|
57e0d84d69 | ||
|
|
9e633d6e11 | ||
|
|
6d12ad9986 | ||
|
|
205f80ff8d | ||
|
|
30e664e8ea | ||
|
|
21020fecc4 | ||
|
|
c649970f4d | ||
|
|
c5dc953071 | ||
|
|
6ca09a3ca0 | ||
|
|
0c3aa5c0be | ||
|
|
ee38a99b19 | ||
|
|
ce403a855a | ||
|
|
c2b35d81c6 | ||
|
|
0ca935b553 | ||
|
|
b985e6c0f2 | ||
|
|
fda66945b5 | ||
|
|
8c2276da64 | ||
|
|
5684cd8a9f | ||
|
|
b43a55b9b8 | ||
|
|
47d595edda | ||
|
|
10dc017dd1 | ||
|
|
91ed3cb128 | ||
|
|
83743eef8c | ||
|
|
e5304d1cc1 | ||
|
|
f44395a001 | ||
|
|
b56149f3f3 | ||
|
|
d55cccda39 | ||
|
|
63bfea75a5 | ||
|
|
413b34bf34 | ||
|
|
bc83e65a50 | ||
|
|
2e503302a8 | ||
|
|
993814edd5 | ||
|
|
b19e226609 | ||
|
|
c2831007e7 | ||
|
|
12bf2b779f | ||
|
|
c4713f3ebf | ||
|
|
180d711d9c | ||
|
|
34814e37ea | ||
|
|
d179831033 | ||
|
|
8032e6f0d5 | ||
|
|
81ada4c9a4 | ||
|
|
2ca9420bd4 | ||
|
|
d76e52cfde | ||
|
|
a2fb15db68 | ||
|
|
38a53e49fd | ||
|
|
ecdb9ddbdc | ||
|
|
a59fee305a | ||
|
|
09b408c375 | ||
|
|
c109f9098c | ||
|
|
bde5ef5c90 | ||
|
|
0ca34daf76 | ||
|
|
8c50c21657 | ||
|
|
2b8d42b418 | ||
|
|
2e52b95d37 | ||
|
|
5be9861bad | ||
|
|
de16c9c4a0 | ||
|
|
f9459e92e7 | ||
|
|
5e4cb880f7 | ||
|
|
573ada496a | ||
|
|
7b918ec982 | ||
|
|
9d43e64610 | ||
|
|
0b0a515124 | ||
|
|
b3280e2264 | ||
|
|
879302623b | ||
|
|
94478d7ebc | ||
|
|
7015ded73a | ||
|
|
5ff3b04679 | ||
|
|
243e30365f | ||
|
|
c90eecba49 | ||
|
|
eca2df275c | ||
|
|
93ba24374b | ||
|
|
d2c142c07e | ||
|
|
fd3852da68 | ||
|
|
86d3cf794c | ||
|
|
f7c014e14f | ||
|
|
0727a6bf7b | ||
|
|
5b419cb7df | ||
|
|
a3eeb21ae2 | ||
|
|
5d4b7e3856 | ||
|
|
7cdfdda45c | ||
|
|
a993295356 | ||
|
|
bacf60df59 | ||
|
|
1edb3c7874 | ||
|
|
2a396ffb31 | ||
|
|
f9f4773616 | ||
|
|
74b48dace2 | ||
|
|
6b3a54995c | ||
|
|
bdd2ca2300 | ||
|
|
bbab7d7298 | ||
|
|
8a5c9dd03b | ||
|
|
6a9de311c7 | ||
|
|
fea16cd108 | ||
|
|
b894e273c7 | ||
|
|
30122d8bf1 | ||
|
|
fc802f8087 | ||
|
|
5ceaede1a9 | ||
|
|
2dfdd6a5f9 | ||
|
|
fc8bd2b7af | ||
|
|
98f1bc49fd | ||
|
|
0475751cee | ||
|
|
9e405dafce | ||
|
|
46e260fc91 | ||
|
|
005dfac926 | ||
|
|
a62eff0819 | ||
|
|
1d49bfe80e | ||
|
|
23361e64bb | ||
|
|
b5a999ae6b | ||
|
|
2432b7c466 | ||
|
|
075e18def3 | ||
|
|
cce4bd36ef | ||
|
|
d61fe9e0c0 | ||
|
|
daf94c6ec9 | ||
|
|
77143c7de0 | ||
|
|
ed2949bd21 | ||
|
|
427f862dac | ||
|
|
c97b3f3e0c | ||
|
|
e50e9cbd8d | ||
|
|
d90af956de | ||
|
|
ef688bd0c0 | ||
|
|
022b83d881 | ||
|
|
14bd4c927b | ||
|
|
6bfec9dc40 | ||
|
|
60ddcc221c | ||
|
|
c11460cfcc | ||
|
|
a181954864 | ||
|
|
dc57eb1394 | ||
|
|
a33b3b3fd9 | ||
|
|
e4a4755ed0 | ||
|
|
ab8975ccc3 | ||
|
|
d4d02bfa7d | ||
|
|
fbb4c81e53 | ||
|
|
6d06187df4 | ||
|
|
1870a88f6b | ||
|
|
d02c739640 | ||
|
|
26326937b1 | ||
|
|
3267cdfda7 | ||
|
|
b7a4b69ee0 | ||
|
|
69e2c7dee1 | ||
|
|
7589e7a21b | ||
|
|
272de00af2 | ||
|
|
ff66f62831 | ||
|
|
68fb822160 | ||
|
|
c00edd399e | ||
|
|
a75dad35dd | ||
|
|
d4e79911cb | ||
|
|
44cfa99c5c | ||
|
|
9b60dc09ea | ||
|
|
04e1ade0d2 | ||
|
|
05399ce53e | ||
|
|
3ef481763c | ||
|
|
f842e69d81 | ||
|
|
de09d3dd5f | ||
|
|
1793873bbb | ||
|
|
fb04e99dcb | ||
|
|
817966f4ea | ||
|
|
d9e7cd349b | ||
|
|
95061ecf77 | ||
|
|
188f189d74 | ||
|
|
15ff558d5f | ||
|
|
6bde0820c6 | ||
|
|
21aabb154d | ||
|
|
a3ee1430ac | ||
|
|
fc4a93ff6e | ||
|
|
d595aea7a6 | ||
|
|
9ec659be5b | ||
|
|
cf515ef8be | ||
|
|
7d49a76c32 | ||
|
|
8e20d5214b | ||
|
|
537bad3926 | ||
|
|
dee238d6bd | ||
|
|
fedb513c29 | ||
|
|
435f4a189a | ||
|
|
ff218168b9 | ||
|
|
043422b101 | ||
|
|
a1ff131fd6 | ||
|
|
fb9ed8b7da | ||
|
|
42b201c54d | ||
|
|
14e9b81995 | ||
|
|
b5fc0ad532 | ||
|
|
2d54fb8187 | ||
|
|
d234abc19c | ||
|
|
db8f2a767d | ||
|
|
90ea8cfc1b | ||
|
|
55312a6df4 | ||
|
|
e0db240a3f | ||
|
|
4825c77e2e | ||
|
|
9691a39102 | ||
|
|
257444558f | ||
|
|
8aa74a9b90 | ||
|
|
80f19c7dfb | ||
|
|
0d3daace49 | ||
|
|
af899c290f | ||
|
|
a5048007de | ||
|
|
0ba04fbe42 | ||
|
|
fe638b5f52 | ||
|
|
e8096b1cb6 | ||
|
|
54fc4758d9 | ||
|
|
2d6d3349cf | ||
|
|
ee45bd9f14 | ||
|
|
9665fe8c1f | ||
|
|
10d1b8063d | ||
|
|
1f0a2ca358 | ||
|
|
a7687659cc | ||
|
|
016ae12884 | ||
|
|
f6a729df87 | ||
|
|
413461364d | ||
|
|
c14b18ab39 | ||
|
|
febb8e37bc | ||
|
|
84d87adb9b | ||
|
|
ed151d5fd8 | ||
|
|
b93bb806f6 | ||
|
|
fb4c809ba4 | ||
|
|
fe1ad85d29 | ||
|
|
7a69cf73ba | ||
|
|
f2d10046b6 | ||
|
|
ce9c8a766f | ||
|
|
82973267f3 | ||
|
|
7adc2dd35c | ||
|
|
1ae7876e44 | ||
|
|
e97a7c611c | ||
|
|
0001c30a5d | ||
|
|
d51977af65 | ||
|
|
e29068f0d8 | ||
|
|
8f127e4769 | ||
|
|
802d59670c | ||
|
|
3d246d7926 | ||
|
|
25b4826395 | ||
|
|
65b3d536b6 | ||
|
|
5e91e98450 | ||
|
|
39d30644db | ||
|
|
df56cc45fe | ||
|
|
fb045c3fe1 | ||
|
|
271e4a660b | ||
|
|
1c0937f29b | ||
|
|
79b2adea16 | ||
|
|
6da6915cac | ||
|
|
e9f3e617c7 | ||
|
|
9af43854d9 | ||
|
|
8211a73c15 | ||
|
|
eb843c5f31 | ||
|
|
9cac851ab6 | ||
|
|
090d4a6835 | ||
|
|
3f738f6ecd | ||
|
|
fbaafafdca | ||
|
|
900df7127c | ||
|
|
350e1b2d2d | ||
|
|
b0449165f9 | ||
|
|
95efc2f3a7 | ||
|
|
faa8169964 | ||
|
|
e96461bd4c | ||
|
|
67ec8861d7 | ||
|
|
551c1616f5 | ||
|
|
3d79564fd2 | ||
|
|
8c8cbc74cf | ||
|
|
da516ed615 | ||
|
|
ab410cc91e | ||
|
|
93f320ed6d | ||
|
|
8016bd4ed0 | ||
|
|
c4879519fb | ||
|
|
66e7e8323b | ||
|
|
4e41fd84fe | ||
|
|
a8681b1e7b | ||
|
|
a903455ee0 | ||
|
|
c986c08cfb | ||
|
|
a9941fe0a4 | ||
|
|
1fa04c668d | ||
|
|
cce3c0fde3 | ||
|
|
d5997d5772 | ||
|
|
f2ecf74d41 | ||
|
|
6a16940aa0 | ||
|
|
4675bfe2b9 | ||
|
|
3587f6d119 | ||
|
|
ed3fc0208c | ||
|
|
acfe8a40b7 | ||
|
|
d5fd89beb7 | ||
|
|
faada48e38 | ||
|
|
236ba6abfb | ||
|
|
2912d0ec4c | ||
|
|
50327e2df6 | ||
|
|
d3e902ac63 | ||
|
|
71544ccc40 | ||
|
|
74c5d0718c | ||
|
|
cbc745ff72 | ||
|
|
eaba3c783a | ||
|
|
8db5e40661 | ||
|
|
3895c30ffa | ||
|
|
1a9c5f162f | ||
|
|
a071811dd0 | ||
|
|
c0322b39f1 | ||
|
|
ca7a91d4cf | ||
|
|
4d0dfb1c88 | ||
|
|
c6477f345f | ||
|
|
c7eccd6086 | ||
|
|
877add851b | ||
|
|
b5fb0da98f | ||
|
|
3ed063dd5c | ||
|
|
7733b1e625 | ||
|
|
66e6a21f77 | ||
|
|
e8c833e16d | ||
|
|
8d7c858931 | ||
|
|
deee18a7a1 | ||
|
|
69e785b5fe | ||
|
|
2897b0374c | ||
|
|
9b56b0c29d | ||
|
|
47481aab56 | ||
|
|
4b872399ac | ||
|
|
a76b064a56 | ||
|
|
db81594404 | ||
|
|
56cc714c2a | ||
|
|
e1e11061c6 | ||
|
|
2a48c2b598 | ||
|
|
b84bd2017c | ||
|
|
be11f81af4 | ||
|
|
d9ebd7a3f9 | ||
|
|
e6816c12ef | ||
|
|
a048cd96b1 | ||
|
|
f1e7c09d96 | ||
|
|
caf60c6f85 | ||
|
|
bd3661d1d4 | ||
|
|
011c27101c | ||
|
|
3b1be99814 | ||
|
|
12e57c5f10 | ||
|
|
cb6db7385a | ||
|
|
debdbf5d41 | ||
|
|
2c41ea48c1 | ||
|
|
e7a0508989 | ||
|
|
f88c93a301 | ||
|
|
92aea9d27e | ||
|
|
447f61ba78 | ||
|
|
747b01d141 | ||
|
|
de89a07970 | ||
|
|
95faab4a82 | ||
|
|
bbb44bc857 | ||
|
|
59e65b445f | ||
|
|
6b1a4ce84d | ||
|
|
09e765ba13 | ||
|
|
afd16138e4 | ||
|
|
d9ac3b535e | ||
|
|
cebd5ccf56 | ||
|
|
7289ec1459 | ||
|
|
204d539041 | ||
|
|
0aa6b8ceb8 | ||
|
|
8b9bc44279 | ||
|
|
0c471639b1 | ||
|
|
9061bfd9a3 | ||
|
|
177e8cf064 | ||
|
|
bfcd824799 | ||
|
|
d7eef7a8b2 | ||
|
|
519db12a85 | ||
|
|
bb3716c03e | ||
|
|
5612fb1c8d | ||
|
|
4155fdfd4b | ||
|
|
648f52a262 | ||
|
|
e530e53dcb | ||
|
|
123cc1336e | ||
|
|
f8e9bf9424 | ||
|
|
3657cf7cc6 | ||
|
|
6b9e6bd842 | ||
|
|
39508ca717 | ||
|
|
59c65db070 | ||
|
|
48f2c7833d | ||
|
|
3f41b6d716 | ||
|
|
ede92f3065 | ||
|
|
2e1f282a94 | ||
|
|
06db6dad72 | ||
|
|
0622eca98e | ||
|
|
0c383eac50 | ||
|
|
08bd5f7041 | ||
|
|
9ea0839426 | ||
|
|
ec537625a5 | ||
|
|
30b185825c | ||
|
|
10cda9f5a9 | ||
|
|
bd890e8ebe | ||
|
|
24fb46b3d7 | ||
|
|
8994029b3e | ||
|
|
fc91683f5f | ||
|
|
76355f5617 | ||
|
|
188e80ab2e | ||
|
|
ec032c7a15 | ||
|
|
79ae6da6b5 | ||
|
|
977b887e6b | ||
|
|
2f1bbf7055 | ||
|
|
86457e7a93 | ||
|
|
e6a30edd0b | ||
|
|
e2700ce91d | ||
|
|
251a2ebd96 | ||
|
|
11e33d855b | ||
|
|
dcfe3493a2 | ||
|
|
65cdb2def0 | ||
|
|
7d0ae7ebd2 | ||
|
|
2bb7ac9e06 | ||
|
|
7ba4e6e066 | ||
|
|
19095cb3ae | ||
|
|
d196b0b5c8 | ||
|
|
5a276dbf8d | ||
|
|
733cb43f1c | ||
|
|
78f286cbda | ||
|
|
3655055030 | ||
|
|
26d93f6308 | ||
|
|
f6d47fe96c | ||
|
|
a91e7009db | ||
|
|
c9a93e95aa | ||
|
|
084069aaf4 | ||
|
|
d006c7ecac | ||
|
|
63057fe0ac | ||
|
|
9a406e8cec | ||
|
|
36f8e50453 | ||
|
|
a7689f5a28 | ||
|
|
92e4e2d826 | ||
|
|
8ce991a249 | ||
|
|
8ab8bc0b42 | ||
|
|
861376b2a2 | ||
|
|
a45b231a7f | ||
|
|
d9a28d197e | ||
|
|
e1a0cca5cc | ||
|
|
7ac1240640 | ||
|
|
b8f1118bbc | ||
|
|
022d21054c | ||
|
|
68308c4fca | ||
|
|
f575e94ddb | ||
|
|
26849f89d1 | ||
|
|
efacd85fdd | ||
|
|
e4c1bacb6e | ||
|
|
823a09da85 | ||
|
|
a9dfdb7432 | ||
|
|
1943747594 | ||
|
|
31e24050bf | ||
|
|
b1df344390 | ||
|
|
601bf68d09 | ||
|
|
6d0d1ae015 | ||
|
|
dc558f096a | ||
|
|
38b7d46596 | ||
|
|
607cbded7d | ||
|
|
e160ff58ba | ||
|
|
5b15de8e9a | ||
|
|
b8fefe6020 | ||
|
|
cac5f7a204 | ||
|
|
da186c0505 | ||
|
|
437a92d0b5 | ||
|
|
7f7bf62d95 | ||
|
|
68d4264d84 | ||
|
|
46e788f875 | ||
|
|
f0ba09dd93 | ||
|
|
9a5b52f609 | ||
|
|
288d29de7a | ||
|
|
35a59e9f31 | ||
|
|
1c3690a882 | ||
|
|
72cefb38db | ||
|
|
432e898318 | ||
|
|
f7754e2845 | ||
|
|
0a79ef4e30 | ||
|
|
30d06584c5 | ||
|
|
bb315b783f | ||
|
|
e7c11bfe5f | ||
|
|
7a4ce63b75 | ||
|
|
07e879a9f8 | ||
|
|
80c4fdeb79 | ||
|
|
1f281a2a9a | ||
|
|
a6c5592541 | ||
|
|
938b6ebf52 | ||
|
|
f5bc81faca | ||
|
|
d89856fac0 | ||
|
|
40d68df86b | ||
|
|
a2c49c3071 | ||
|
|
42b9964e9c | ||
|
|
f4738818e6 | ||
|
|
12d137aac4 | ||
|
|
f957a0a04e | ||
|
|
4f5186f97c | ||
|
|
8f4f0b106b | ||
|
|
06e672ca2a | ||
|
|
3119cb01bc | ||
|
|
3577fa6d5d | ||
|
|
b5556d4f93 | ||
|
|
cc6b05840f | ||
|
|
0d392d64b2 | ||
|
|
173e40b0e4 | ||
|
|
1e68766b54 | ||
|
|
5181f1d801 | ||
|
|
7ca68a3490 | ||
|
|
6d79b81a89 | ||
|
|
89fdbbc436 | ||
|
|
35c2ba4a76 | ||
|
|
157cca0a2c | ||
|
|
30e889f93e | ||
|
|
dabae34261 | ||
|
|
912940f8c8 | ||
|
|
6ab5c07036 | ||
|
|
fcfb4af3a0 | ||
|
|
4abd0bbee0 | ||
|
|
4f75355983 | ||
|
|
c07322de0f | ||
|
|
604b1dc912 | ||
|
|
78dce129ff | ||
|
|
06f4f7593a | ||
|
|
1b22447d1c | ||
|
|
8ce0da0681 | ||
|
|
ba6cde89ef | ||
|
|
e6248cd5a9 | ||
|
|
c0889171a5 | ||
|
|
ac3387ded7 | ||
|
|
ea844ee07c | ||
|
|
7b2dae9d2f | ||
|
|
3d9bd124b1 | ||
|
|
401f5dad8b | ||
|
|
6b986375e7 | ||
|
|
aa22d5c594 | ||
|
|
45a3e85829 | ||
|
|
77615e71c4 | ||
|
|
c24b0ab8c3 | ||
|
|
832c5d3c89 | ||
|
|
3e615f0b68 | ||
|
|
d51551989d | ||
|
|
454b48f9a8 | ||
|
|
8f9a323e0b | ||
|
|
c1252fe495 | ||
|
|
86e73e268c | ||
|
|
511d2699e6 | ||
|
|
3352ccffc1 | ||
|
|
aa7cf38f7e | ||
|
|
4297ed3607 | ||
|
|
5d60b25900 | ||
|
|
7ace2a8a4b | ||
|
|
0038552955 | ||
|
|
b83be49980 | ||
|
|
ec06768303 | ||
|
|
7d6d683e52 | ||
|
|
95b641060d | ||
|
|
d589b77ae0 | ||
|
|
ac74e7e6a7 | ||
|
|
2ea9a6bffa | ||
|
|
62dcf6e1a5 | ||
|
|
c0d2d2dddd | ||
|
|
84a84e4907 | ||
|
|
11f3ddf54a | ||
|
|
346351ef98 | ||
|
|
4ab80e6144 | ||
|
|
83ee756ae7 | ||
|
|
062cc20877 | ||
|
|
fdb633d786 | ||
|
|
02cf6285ec | ||
|
|
ee5b81bcbf | ||
|
|
67d623cd21 | ||
|
|
cbe8653f5d | ||
|
|
f83625655c | ||
|
|
3912ea1911 | ||
|
|
c947370ddc | ||
|
|
8dfd27a0dc | ||
|
|
a76cbbcb55 | ||
|
|
23313282ce | ||
|
|
1c9023cdaf | ||
|
|
92c54703c5 | ||
|
|
b647f71f74 | ||
|
|
b1cb9ba221 | ||
|
|
4eee1d0b52 | ||
|
|
e162a1c893 | ||
|
|
3c1d63cbcb | ||
|
|
def4bd9861 | ||
|
|
1d05f66fd4 | ||
|
|
f04bf559a0 | ||
|
|
3fbe96dc1b | ||
|
|
a177c0558e | ||
|
|
6e4121d9bb | ||
|
|
bb7874e68f | ||
|
|
c10320ff9c | ||
|
|
6c4ecad7f8 | ||
|
|
0deb4404d2 | ||
|
|
2b0cfea888 | ||
|
|
65a5df507c | ||
|
|
af6a80ab76 | ||
|
|
3d0b0cdbdd | ||
|
|
6408251c14 | ||
|
|
f90b83cb34 | ||
|
|
491dfccc8e | ||
|
|
89d04a83a0 | ||
|
|
3d2ac9af17 | ||
|
|
0e9044b7ba | ||
|
|
64ddddd3d5 | ||
|
|
bfd1b6bbef | ||
|
|
ddb179f340 | ||
|
|
893274c89c | ||
|
|
4fbdb80faf | ||
|
|
b23ea6bbcc | ||
|
|
450fff57ff | ||
|
|
57693f804f | ||
|
|
d342300c47 | ||
|
|
b3d01fd6d2 | ||
|
|
6d25edab60 | ||
|
|
36faeb3f09 | ||
|
|
e460b7cce9 | ||
|
|
c1e083c8b2 | ||
|
|
70a077da48 | ||
|
|
c5fb8bee6b | ||
|
|
418990e271 | ||
|
|
93ab8964f1 | ||
|
|
fd599da07e | ||
|
|
369df7af62 | ||
|
|
bb01dd0d93 | ||
|
|
84f00a2519 | ||
|
|
8e07768996 | ||
|
|
9b12025c9f | ||
|
|
14f9344c50 | ||
|
|
af430f9946 | ||
|
|
992702870c | ||
|
|
642cd3da9d | ||
|
|
5d2d1ffa1a | ||
|
|
19bbecb535 | ||
|
|
e636e6eb39 | ||
|
|
86ac4708f0 | ||
|
|
f49ac9e193 | ||
|
|
f0d9db420a | ||
|
|
526dbbd68e | ||
|
|
9a05a71f6b | ||
|
|
e4f3af5d4b | ||
|
|
3a7b7c1300 | ||
|
|
cdea6cecfb | ||
|
|
c36a7bf22b | ||
|
|
ca2a8c9907 | ||
|
|
4914fc640a | ||
|
|
f0b073a6f1 | ||
|
|
79f5ff4d35 | ||
|
|
8609b2394b | ||
|
|
5bb3c16312 | ||
|
|
df5d3ef66f | ||
|
|
a207f2f936 | ||
|
|
b0bd0836cd | ||
|
|
475377dd85 | ||
|
|
16776ce750 | ||
|
|
3861917dbc | ||
|
|
65891eff1c | ||
|
|
bf9306c641 | ||
|
|
666d0db550 | ||
|
|
6a41b30e70 | ||
|
|
0808bacb39 | ||
|
|
026f8503ab | ||
|
|
19a7e78ebe | ||
|
|
76fb0d2a20 | ||
|
|
a418e60556 | ||
|
|
8f760e87bc | ||
|
|
0aff176cdc | ||
|
|
cdcab6e1f8 | ||
|
|
37d03bdf6a | ||
|
|
4a40870576 | ||
|
|
35958168a2 | ||
|
|
6badc2ad77 | ||
|
|
5184dc9ce7 | ||
|
|
b446575bf0 | ||
|
|
b7114c670a | ||
|
|
536e66da7c | ||
|
|
9114a98e4c | ||
|
|
9955bed2c1 | ||
|
|
f6af38a2c3 | ||
|
|
76e886e610 | ||
|
|
6daec3c975 | ||
|
|
e9000a7e99 | ||
|
|
44a53492e6 | ||
|
|
7cf0fa7284 | ||
|
|
9aa86e1dee | ||
|
|
961aad43d1 | ||
|
|
6e84ca4ae4 | ||
|
|
f79e351b72 | ||
|
|
a24d809428 | ||
|
|
0fa64ea943 | ||
|
|
fe0b71b628 | ||
|
|
a23260fb7f | ||
|
|
eb984c2f4c | ||
|
|
1836132c28 | ||
|
|
aae635bf5d | ||
|
|
8599ff775b | ||
|
|
8bfdd0bc14 | ||
|
|
30344b0dce | ||
|
|
8019629a28 | ||
|
|
7a28108475 | ||
|
|
cfa94c5837 | ||
|
|
c9c0530461 | ||
|
|
093ebfa457 | ||
|
|
3800f31823 | ||
|
|
cc26584f01 | ||
|
|
8131e9e92c | ||
|
|
38e472a623 | ||
|
|
3e21cb0298 | ||
|
|
b9bb1a1286 | ||
|
|
25609a7068 | ||
|
|
35d8b3f8a1 | ||
|
|
d593a217a4 | ||
|
|
960fa58799 | ||
|
|
76b716d41d | ||
|
|
0b3e788b86 | ||
|
|
b88246b112 | ||
|
|
4d10c72ae9 | ||
|
|
0a21ede3d2 | ||
|
|
3669822064 | ||
|
|
b68f9fe395 | ||
|
|
e101d01e11 | ||
|
|
bdce761af0 | ||
|
|
784d1a62f7 | ||
|
|
c84602d560 | ||
|
|
3bcba9fa40 | ||
|
|
7246dc124e | ||
|
|
fcdcd4d6cb | ||
|
|
07d981ac25 | ||
|
|
1bf764c5c3 | ||
|
|
79b886994c | ||
|
|
62f8c7d1b6 | ||
|
|
6fe0b7f6a4 | ||
|
|
a55df73281 | ||
|
|
ce6176ffe4 | ||
|
|
570ceb8160 | ||
|
|
163228ff75 | ||
|
|
68b9c22938 | ||
|
|
7936f72bc1 | ||
|
|
81df4f5444 | ||
|
|
54093a0a9a | ||
|
|
c5e8786670 | ||
|
|
6ebd6db87f | ||
|
|
68e31962bc | ||
|
|
9d24648607 | ||
|
|
c26223a887 | ||
|
|
444f4b5d1e | ||
|
|
c72b07f690 | ||
|
|
c318d9e9df | ||
|
|
5b6acce822 | ||
|
|
9a4b45838a | ||
|
|
48df1bac4b | ||
|
|
63aed1e8f4 | ||
|
|
426e87a337 | ||
|
|
cd141ce381 | ||
|
|
ece63b8a36 | ||
|
|
af423248da | ||
|
|
5ca7e173b0 | ||
|
|
f845f7771a | ||
|
|
500a829161 | ||
|
|
96c34b9b29 | ||
|
|
ec7c19cceb | ||
|
|
7a4501e581 | ||
|
|
75c5fae6b2 | ||
|
|
7a5bf65184 | ||
|
|
103626e82a | ||
|
|
ca1a77d883 | ||
|
|
ac68a5d35f | ||
|
|
f63f1d947b | ||
|
|
5b6aa1aa8d | ||
|
|
12177fd21d | ||
|
|
aa4254ad47 | ||
|
|
e2076603dd | ||
|
|
2ea90c1b45 | ||
|
|
cf66dcf38d | ||
|
|
51a83d8b09 | ||
|
|
e467409cbb | ||
|
|
05b59621a6 | ||
|
|
e148e7d584 | ||
|
|
3fb6d4eac9 | ||
|
|
4aa78b07be | ||
|
|
88048bf4c8 | ||
|
|
0bfc3393a0 | ||
|
|
018bc0b329 | ||
|
|
f9543806a1 | ||
|
|
b9d65390c5 | ||
|
|
8740393b8c | ||
|
|
1ddad9295f | ||
|
|
d14493c9be | ||
|
|
329c3f03c7 | ||
|
|
16144944ca | ||
|
|
6d0e44e103 | ||
|
|
7db2fc6aeb | ||
|
|
9aecf4ca8a | ||
|
|
1b05b64fea | ||
|
|
ed52821a11 | ||
|
|
20141ec173 | ||
|
|
194e4cfd20 | ||
|
|
5a5653d594 | ||
|
|
a810a49a74 | ||
|
|
654af4fbc6 | ||
|
|
35ffb12950 | ||
|
|
7890730afa | ||
|
|
a97e7d3697 | ||
|
|
b34c0e268e | ||
|
|
63fe3e7019 | ||
|
|
886e8632a7 | ||
|
|
b18a3cabc2 | ||
|
|
f3f7127f82 | ||
|
|
8a8082b579 | ||
|
|
7a27095e7b | ||
|
|
a08a34283d | ||
|
|
76db59a1b1 | ||
|
|
a86fb44e61 | ||
|
|
b6b294b682 | ||
|
|
96e7ede031 | ||
|
|
e87c16b598 | ||
|
|
d02daee582 | ||
|
|
77b515751e | ||
|
|
0ade48117c | ||
|
|
7491442a25 | ||
|
|
6ba2d99b67 | ||
|
|
5c980946a9 | ||
|
|
213e959568 | ||
|
|
f36643851f | ||
|
|
dea3601549 | ||
|
|
29665ff3c8 | ||
|
|
fc72d7ec32 | ||
|
|
b0f3d09cb9 | ||
|
|
a9ab3825f5 | ||
|
|
630e2966e2 | ||
|
|
df6441ef80 | ||
|
|
1730088ab1 | ||
|
|
7d97544f05 | ||
|
|
c4195909e1 | ||
|
|
8b3841e2d5 | ||
|
|
9ff1d1cce5 | ||
|
|
6b99f650ca | ||
|
|
3282736600 | ||
|
|
f25d1cbb9e | ||
|
|
3775892bc2 | ||
|
|
6b27a00007 | ||
|
|
3fc3174788 | ||
|
|
38999a4f5e | ||
|
|
ef8c3d3cf7 | ||
|
|
3a6779570f | ||
|
|
e3ff9d8f5d | ||
|
|
5fc5bdfaeb | ||
|
|
adcffe3912 | ||
|
|
5e0c641a02 | ||
|
|
0f4695a43f | ||
|
|
6258b53a04 | ||
|
|
0776afc09e | ||
|
|
0ab8d177b2 | ||
|
|
9e6c405bcd | ||
|
|
94cd1a2f01 | ||
|
|
954e507160 | ||
|
|
d195a9622d | ||
|
|
0883580199 | ||
|
|
8c2e94b2cd | ||
|
|
d9dbd1917f | ||
|
|
240025a183 | ||
|
|
24838ec2cf | ||
|
|
eaee62db4d | ||
|
|
2f0a717241 | ||
|
|
07d82fb063 | ||
|
|
fae7fd0ccc | ||
|
|
20b2b1c399 | ||
|
|
ee8115cbe9 | ||
|
|
465f5b406e | ||
|
|
9428c794c0 | ||
|
|
2754e0ae5a | ||
|
|
b6be7f6975 | ||
|
|
f02a8d73c7 | ||
|
|
f30d7aecc8 | ||
|
|
4b1eee49a8 | ||
|
|
b5124b8274 | ||
|
|
00f8707703 | ||
|
|
10996c5bed | ||
|
|
fc712bde90 | ||
|
|
4e1433d861 | ||
|
|
4fc02e6c93 | ||
|
|
57c72d68a4 | ||
|
|
0230c6ac2b | ||
|
|
865f7036fd | ||
|
|
6825c5e0dc | ||
|
|
3e63b1aabb | ||
|
|
d6d19e7cb2 | ||
|
|
adeac9cce1 | ||
|
|
5a743b2005 | ||
|
|
dc1f33f494 | ||
|
|
e04ae041ab | ||
|
|
236377c28e | ||
|
|
687b28016e | ||
|
|
00edba1d0d | ||
|
|
207e9e1b43 | ||
|
|
0afbad5ff1 | ||
|
|
357e60c054 | ||
|
|
9d45759613 | ||
|
|
9503ae0ac5 | ||
|
|
97d20199fe | ||
|
|
d66d32066d | ||
|
|
13bde22344 | ||
|
|
fb430e55d2 | ||
|
|
5fde181fdc | ||
|
|
4da7b815f3 | ||
|
|
84e17ab91f | ||
|
|
95d0830584 | ||
|
|
a8fa13dd3c | ||
|
|
a7a8c51c18 | ||
|
|
50ae198164 | ||
|
|
b325e50da1 | ||
|
|
c6afcc57d9 | ||
|
|
ff4b03f4fa | ||
|
|
393a5ce570 | ||
|
|
ca9128bdbf | ||
|
|
6837852f52 | ||
|
|
957a0e78a3 | ||
|
|
656d725b58 | ||
|
|
ffed226a4f | ||
|
|
215abeb105 | ||
|
|
68c8faa8cb | ||
|
|
d2e86e936b | ||
|
|
d2fe9be860 | ||
|
|
357614992e | ||
|
|
134250d1c1 | ||
|
|
8a8d485c39 | ||
|
|
d06b08f020 | ||
|
|
7a70257b95 | ||
|
|
4400125c7e | ||
|
|
88d0fe5752 | ||
|
|
cc1b45ac6e | ||
|
|
61d5d4a150 | ||
|
|
107c84fdbc | ||
|
|
f85d983c84 | ||
|
|
a0406c9749 | ||
|
|
840d9f5915 | ||
|
|
59f8002a5d | ||
|
|
0b38e192d4 | ||
|
|
014e350a9e | ||
|
|
382cf45e08 | ||
|
|
abe8446736 | ||
|
|
ed4acb0118 | ||
|
|
8032addc0a | ||
|
|
0cfc75976f | ||
|
|
8e83c5f788 | ||
|
|
7b01cb47de | ||
|
|
b13d20d44c | ||
|
|
b8ab1edc56 | ||
|
|
cc96aef50f | ||
|
|
9ddd3a2a58 | ||
|
|
fea75e2c2f | ||
|
|
87b15ce57d | ||
|
|
a807ffd918 | ||
|
|
f3d505170a | ||
|
|
13904cfd7b | ||
|
|
3e83ae8a6e | ||
|
|
44febee357 | ||
|
|
0b20a154f5 | ||
|
|
b9101b2041 | ||
|
|
9e798c6362 | ||
|
|
9e1bd811a5 | ||
|
|
26aed64bf8 | ||
|
|
3f93044121 | ||
|
|
8cb615df5f | ||
|
|
885bf7e88c | ||
|
|
efabfd7183 | ||
|
|
d8b43f60b8 | ||
|
|
0a2fed06cb | ||
|
|
e13d588c07 | ||
|
|
460e153c6f | ||
|
|
cb36615228 | ||
|
|
6dca567827 | ||
|
|
80379232a9 | ||
|
|
3a3aa73d2d | ||
|
|
c949c153ed | ||
|
|
a4dba36f82 | ||
|
|
bee19fabfa | ||
|
|
43770d37e1 | ||
|
|
7b6b145229 | ||
|
|
57d52bd59e | ||
|
|
d6b4bd8d36 | ||
|
|
c28f70d885 | ||
|
|
fad2ae873d | ||
|
|
30c025202c | ||
|
|
9cb64e34dc | ||
|
|
72af7c600f | ||
|
|
903a91b9ea | ||
|
|
2b699849ca | ||
|
|
a7ae6e54de | ||
|
|
1396aca657 | ||
|
|
b19cabef79 | ||
|
|
c3f5e6c4db | ||
|
|
f4b6d9930f | ||
|
|
f77ddac4ed | ||
|
|
932e1f95c5 | ||
|
|
a8b52d50af | ||
|
|
f10f63b6be | ||
|
|
c5cdd9f567 | ||
|
|
e5b2fd90c0 | ||
|
|
f7b43f470f | ||
|
|
515e542179 | ||
|
|
cc4637095d | ||
|
|
bffa8817d9 | ||
|
|
98b82ed0c6 | ||
|
|
4f52982a7e | ||
|
|
1edba0c368 | ||
|
|
06983ca382 | ||
|
|
c53ef5b96e | ||
|
|
a2b7f98332 | ||
|
|
c25ad76200 | ||
|
|
7057984534 | ||
|
|
02a4fd4e1d | ||
|
|
57ec429776 | ||
|
|
c52d3819af | ||
|
|
85f35abe2d | ||
|
|
58674a2f8f | ||
|
|
968137a967 | ||
|
|
66b274c1bf | ||
|
|
b9d68a17fa | ||
|
|
ced64138e8 | ||
|
|
4fdaed5cc4 | ||
|
|
0fd11afdcb | ||
|
|
8202cc96e7 | ||
|
|
59bf7ba22f | ||
|
|
9c075c05f5 | ||
|
|
6815501c1d | ||
|
|
f11aa9a1c4 | ||
|
|
3b33dde9ac | ||
|
|
7fb0e88313 | ||
|
|
9615aaa83a | ||
|
|
16cc53146c | ||
|
|
56e9f748f4 | ||
|
|
80e338610f | ||
|
|
93abbf4a10 | ||
|
|
0271ccfc28 | ||
|
|
dae3e416a2 | ||
|
|
759213f8b9 | ||
|
|
01b313a3ce | ||
|
|
4567f7c781 | ||
|
|
ef76635508 | ||
|
|
30235ff3eb | ||
|
|
ebb390a1fd | ||
|
|
0c1a4f692a | ||
|
|
0c25611d26 | ||
|
|
cd79670438 | ||
|
|
6b46b31818 | ||
|
|
713cb1b3ac | ||
|
|
e492c4aca6 | ||
|
|
5496915e19 | ||
|
|
f77d084a53 | ||
|
|
060b3f8782 | ||
|
|
e4b7bf799d | ||
|
|
6066601568 | ||
|
|
01404187cc | ||
|
|
a9da673a31 | ||
|
|
d1a9460117 | ||
|
|
bde278430e | ||
|
|
9c36b31ad2 | ||
|
|
b528b93178 | ||
|
|
7ca00d56be | ||
|
|
39f17b1a9e | ||
|
|
08e17f7d16 | ||
|
|
a638dddec9 | ||
|
|
59bbfcef4f | ||
|
|
5cd1c1284a | ||
|
|
f81826fd9b | ||
|
|
2e59e2bfdf | ||
|
|
03a8a9c8c9 | ||
|
|
689cb40bcc | ||
|
|
1c2a1b8c69 | ||
|
|
3d187fd0a0 | ||
|
|
2fc057d670 | ||
|
|
e7b030fa30 | ||
|
|
e74262c81e | ||
|
|
d1a52ca85c | ||
|
|
44b53ffd2c | ||
|
|
ffe49e8acd | ||
|
|
58b3a19ae7 | ||
|
|
0be29498b0 | ||
|
|
1b4069f01e | ||
|
|
5f284c31ab | ||
|
|
1c892a0f9c | ||
|
|
8fb5a3ae7c | ||
|
|
3c731661a0 | ||
|
|
ed5e2ba39d | ||
|
|
22eb0e19cc | ||
|
|
ad31b07a04 | ||
|
|
99696ff6cb | ||
|
|
8b3c634652 | ||
|
|
26084a19fa | ||
|
|
84637d82d4 | ||
|
|
7a83a01095 | ||
|
|
71d3410b4f | ||
|
|
b58a9d3b88 | ||
|
|
05897c3e01 | ||
|
|
a06211b497 | ||
|
|
db2cca8e86 | ||
|
|
aa5e574d5d | ||
|
|
09c5bbcb63 | ||
|
|
cadab96bae | ||
|
|
0c9ab91373 | ||
|
|
836b7fb056 | ||
|
|
d3fd4ee2f4 | ||
|
|
58499a068f | ||
|
|
ce83e8f92b | ||
|
|
fc5aea1c33 | ||
|
|
89bf0aa128 | ||
|
|
b2ea0cb666 | ||
|
|
c0b19fa2b2 | ||
|
|
9e028ef0f7 | ||
|
|
a8460b7570 | ||
|
|
f42fa0ee7b | ||
|
|
8d27f71cee | ||
|
|
3a9813c1b5 | ||
|
|
699f451234 | ||
|
|
cad3c02f08 | ||
|
|
7484ab1bc9 | ||
|
|
8f87aa6636 | ||
|
|
15486ed764 | ||
|
|
118693471c | ||
|
|
382bd88344 | ||
|
|
2a4d618bcc | ||
|
|
14b56d9287 | ||
|
|
ba35677cf6 | ||
|
|
c4723fc3f2 | ||
|
|
3aff47d983 | ||
|
|
9fe6db8cd9 | ||
|
|
15a03f63a9 | ||
|
|
d7b5c4bc71 | ||
|
|
db05ea5f32 | ||
|
|
ceedab3a6e | ||
|
|
0b6bb64600 | ||
|
|
2985a08a8d | ||
|
|
a1b26c91d2 | ||
|
|
7d54744e9a | ||
|
|
7afc7e2797 | ||
|
|
8d1f894622 | ||
|
|
3f0a491f8c | ||
|
|
9787089615 | ||
|
|
076c07b4be | ||
|
|
6887dad1a9 | ||
|
|
5fee795b5c | ||
|
|
146c205f6c | ||
|
|
5c87e2210c | ||
|
|
db6bdfd931 | ||
|
|
b796f02a3d | ||
|
|
a86140cec0 | ||
|
|
1f9caedc16 | ||
|
|
dc6034796a | ||
|
|
be8d38b478 | ||
|
|
d3cd83eb93 | ||
|
|
984849d2c8 | ||
|
|
bc82c8fead | ||
|
|
3b9f580bac | ||
|
|
84d9212582 | ||
|
|
9c7142817d | ||
|
|
1217483894 | ||
|
|
71d592e38b | ||
|
|
59b7ced862 | ||
|
|
29d54671d3 | ||
|
|
7676acf1f2 | ||
|
|
ca44db25a0 | ||
|
|
8c5f5ba629 | ||
|
|
ef97f63b73 | ||
|
|
b103d719ea | ||
|
|
ad0828df12 | ||
|
|
719fac7f88 | ||
|
|
b1b2eec21f | ||
|
|
6169328647 | ||
|
|
fbd93b879c | ||
|
|
af43ccf37e | ||
|
|
e356957592 | ||
|
|
1fee5d7242 | ||
|
|
3e55073188 | ||
|
|
fb66ed078a | ||
|
|
d4f93f07ee | ||
|
|
6e3bc87302 | ||
|
|
28f525fb5c | ||
|
|
def6a7c051 | ||
|
|
5d36c7228d | ||
|
|
cf2dabc714 | ||
|
|
a63e752dde | ||
|
|
ec1696ebab | ||
|
|
7730a57dbf | ||
|
|
e444ebff62 | ||
|
|
015f51f8d3 | ||
|
|
40ba41497b | ||
|
|
2a5494c85a | ||
|
|
ffe20960d5 | ||
|
|
040f151d65 | ||
|
|
db286077f8 | ||
|
|
90bd5c3512 | ||
|
|
ee29c406ab | ||
|
|
599d179c4d | ||
|
|
4b84d978d1 | ||
|
|
91c1928309 | ||
|
|
9d4d6efdb9 | ||
|
|
81cef92443 | ||
|
|
734686ff33 | ||
|
|
0d897f13e3 | ||
|
|
05436211dd | ||
|
|
ed9235d341 | ||
|
|
ee7177bdec | ||
|
|
74da53c822 | ||
|
|
0f0ae6eb6d | ||
|
|
472291e59d | ||
|
|
86c881a63c | ||
|
|
f95431c55e | ||
|
|
f2f022ba30 | ||
|
|
1a62e9413d | ||
|
|
e53e3f9843 | ||
|
|
69391309bc | ||
|
|
038e9947c1 | ||
|
|
5c4a38e4de | ||
|
|
a0d7997778 | ||
|
|
d660165470 | ||
|
|
735f890e56 | ||
|
|
a2ab73fa41 | ||
|
|
f7f1907546 | ||
|
|
ced78ac6f7 | ||
|
|
fe3728d522 | ||
|
|
f858f045d6 | ||
|
|
51673f3569 | ||
|
|
e430092eda | ||
|
|
eaf70765d5 | ||
|
|
9191bc6c08 | ||
|
|
d1d772f790 | ||
|
|
edc7a91519 | ||
|
|
4eb177e65f | ||
|
|
5f34dfa968 | ||
|
|
c43574a714 | ||
|
|
525b6ee98d | ||
|
|
e5814b14d9 | ||
|
|
e5cd9ad727 | ||
|
|
cc5c30cc69 | ||
|
|
cf2104e989 | ||
|
|
14b7be0a4f | ||
|
|
e6c385da10 | ||
|
|
57124d040d | ||
|
|
67c55c5a25 | ||
|
|
f86e4f39d3 | ||
|
|
5e162b018d | ||
|
|
9851ac53cc | ||
|
|
794c4d3b55 | ||
|
|
530b6da6e8 | ||
|
|
6986ffefbe | ||
|
|
e6eefc9913 | ||
|
|
3cd66a9fc4 | ||
|
|
a1c98e4012 | ||
|
|
cc7610d436 | ||
|
|
36efb04f86 | ||
|
|
dcc5859eb8 | ||
|
|
1557e5b7a3 | ||
|
|
9a41d35f98 | ||
|
|
65a7983edc | ||
|
|
7b4a34ee69 | ||
|
|
fb63dac2d1 | ||
|
|
f9b014f640 | ||
|
|
fe15ff4913 | ||
|
|
cb128e5020 | ||
|
|
2c3a11cff9 | ||
|
|
7dbb715f04 | ||
|
|
cdc2c8b1e4 | ||
|
|
ba33268596 | ||
|
|
fd96e4b42e | ||
|
|
950c9d7373 | ||
|
|
470fb9a02a | ||
|
|
f2a4c52110 | ||
|
|
10cfdb137a | ||
|
|
323e2210c3 | ||
|
|
d256ddfcbc | ||
|
|
de250df0cb | ||
|
|
e7c9b4d402 | ||
|
|
f3719d339e | ||
|
|
efc353256d | ||
|
|
f4026c1df5 | ||
|
|
eed7776e86 | ||
|
|
aface6b425 | ||
|
|
b0fb3a31f7 | ||
|
|
b01d37d085 | ||
|
|
72e6e2af24 | ||
|
|
0db11bf0f8 | ||
|
|
07e388c554 | ||
|
|
84c9ac7e82 | ||
|
|
e572c072a9 | ||
|
|
f6f7b2e4be | ||
|
|
5a0973dfa3 | ||
|
|
268f3b0a24 | ||
|
|
348de6da35 | ||
|
|
82958cd8c2 | ||
|
|
264bc50451 | ||
|
|
2ce7e9728f | ||
|
|
8c0bef06c6 | ||
|
|
7a493fad80 | ||
|
|
891835d542 | ||
|
|
1876ed1459 | ||
|
|
711f54662c | ||
|
|
f331dee8a1 | ||
|
|
3f0d94c157 | ||
|
|
f5576606e1 | ||
|
|
34de2c03c4 | ||
|
|
225be93610 | ||
|
|
089b03de38 | ||
|
|
785e8f0938 | ||
|
|
ea24918785 | ||
|
|
daa8e45582 | ||
|
|
aa45bf5f70 | ||
|
|
b64bfaeb92 | ||
|
|
659d673ffa | ||
|
|
65e0962111 | ||
|
|
a5cf1a0ac9 | ||
|
|
465f29531e | ||
|
|
88b0c70d0c | ||
|
|
4c1b30a081 | ||
|
|
afdd94ff9e | ||
|
|
0b8c1441ef | ||
|
|
83b1d85730 | ||
|
|
399664c65a | ||
|
|
2830bb722f | ||
|
|
7e733e60ee | ||
|
|
1f6e3c271b | ||
|
|
9c79654cf4 | ||
|
|
7ea04992e3 | ||
|
|
29a949d3d2 | ||
|
|
36ed2b4dc2 | ||
|
|
9d50eca251 | ||
|
|
c28a0291d7 | ||
|
|
e9ba9e089e | ||
|
|
01b58cf247 | ||
|
|
aa532806d0 | ||
|
|
6ddfe7a378 | ||
|
|
01a2690cf1 | ||
|
|
8692a107ab | ||
|
|
d8b0221c91 | ||
|
|
a6408bf398 | ||
|
|
433c8669f4 | ||
|
|
43aebcccff | ||
|
|
1e22b96d9a | ||
|
|
962abd34c7 | ||
|
|
c6a45789bc | ||
|
|
9d48bbf2f3 | ||
|
|
bdc002978a | ||
|
|
7ce1781f57 | ||
|
|
fde4d53f1d | ||
|
|
862265ab60 | ||
|
|
8ac41a28b9 | ||
|
|
fb4b0e3920 | ||
|
|
49297ee5e2 | ||
|
|
046be275a7 | ||
|
|
5054eec852 | ||
|
|
a7041e0399 | ||
|
|
5f5650f53a | ||
|
|
606f8fe557 | ||
|
|
fd6a0597a6 | ||
|
|
62fa764b4c | ||
|
|
9217d9977f | ||
|
|
31231a5f60 | ||
|
|
4cf8e2f2ea | ||
|
|
fd74671760 | ||
|
|
28d626f882 | ||
|
|
09d69945f1 | ||
|
|
b87e4277f2 | ||
|
|
24efe70335 | ||
|
|
a26b37c270 | ||
|
|
3d67143903 | ||
|
|
96219f406d | ||
|
|
4f5cb34f00 | ||
|
|
d4f3093ae3 | ||
|
|
cc89f26982 | ||
|
|
8155484ee9 | ||
|
|
97e3b30415 | ||
|
|
07b2c26bec | ||
|
|
afe431b72f | ||
|
|
f5f796344c | ||
|
|
8ee56d23ba | ||
|
|
f62dba4e1b | ||
|
|
87f84c694a | ||
|
|
f5a0727b8e | ||
|
|
4d5dcb82d6 | ||
|
|
7fa901bebb | ||
|
|
1159bde3eb | ||
|
|
9013062ae9 | ||
|
|
47b2fe7c7c | ||
|
|
cfaae63657 | ||
|
|
98e79d933c | ||
|
|
ae27e06675 | ||
|
|
209ab4dff9 | ||
|
|
cf18590b84 | ||
|
|
6c25cd1c85 | ||
|
|
0d3df6e1fe | ||
|
|
b11d0c5cd9 | ||
|
|
afc3ab8a8b | ||
|
|
1903f34dea | ||
|
|
ee7e50004a | ||
|
|
96d26d0d94 | ||
|
|
7c12ab82c5 | ||
|
|
5c152a9754 | ||
|
|
5a4fffbce6 | ||
|
|
220118f4bc | ||
|
|
5d214e5bd7 | ||
|
|
43fe968ad0 | ||
|
|
7daa7eb0bc | ||
|
|
a0274b083b | ||
|
|
04c7aae433 | ||
|
|
5a99950a8f | ||
|
|
4659d8e24a | ||
|
|
5e3a4fb1ab | ||
|
|
1839264f7a | ||
|
|
5f9d90a293 | ||
|
|
5c825e3206 | ||
|
|
a54a27d6ba | ||
|
|
16135fb92b | ||
|
|
f8d0472274 | ||
|
|
368e6a5c50 | ||
|
|
fb4ade70d2 | ||
|
|
6a0fcc1fd9 | ||
|
|
0eec533647 | ||
|
|
941b887b75 | ||
|
|
43595df977 | ||
|
|
8d652183a0 | ||
|
|
6af37fb40e | ||
|
|
d3ceeb3f14 | ||
|
|
7182b245b3 | ||
|
|
a48d6ae174 | ||
|
|
521d6bbd4d | ||
|
|
e4f0144bbc | ||
|
|
2c50107bea | ||
|
|
043ca2ff5a | ||
|
|
ab1e3c3fc8 | ||
|
|
230c2a1cf3 | ||
|
|
7bea15a7a9 | ||
|
|
2b2d44166d | ||
|
|
70dc03098c | ||
|
|
16b7d7f029 | ||
|
|
81dad796ee | ||
|
|
8a28c6e0ef | ||
|
|
fc5d14d223 | ||
|
|
0ec2238e4b | ||
|
|
8077a2e3b1 | ||
|
|
677cd54e1c | ||
|
|
a3a3dec68c | ||
|
|
bb6860532c | ||
|
|
68b4edd1e1 | ||
|
|
9dff94f1c8 | ||
|
|
f5e2d13c53 | ||
|
|
15e7441ab9 | ||
|
|
12e63a3eea | ||
|
|
4e1405ca39 | ||
|
|
0e1d82db8b | ||
|
|
952edd380f | ||
|
|
9b843a8ad5 | ||
|
|
d4e310d150 | ||
|
|
e0e57da5b8 | ||
|
|
00b881f49b | ||
|
|
080eeb29ec | ||
|
|
db74c99098 | ||
|
|
d3599dc8c0 | ||
|
|
6eba5f5318 | ||
|
|
16bca3c665 | ||
|
|
dcb32c1bb5 | ||
|
|
f76df2252d | ||
|
|
402e8620a9 | ||
|
|
ccf40fc89b | ||
|
|
660bede9c5 | ||
|
|
1db572e010 | ||
|
|
d4c4a0c05f | ||
|
|
6b7a3e73f1 | ||
|
|
55aab4004c | ||
|
|
c1de55f3d5 | ||
|
|
f9d84a09f1 |
10
.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
packages/*
|
||||
lib/classes/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/*/
|
||||
temp/*
|
||||
templates/*
|
||||
install/update.log
|
||||
.buildpath
|
||||
.project
|
||||
.settings/
|
||||
*.diff
|
||||
*~
|
||||
561
COPYING
@@ -1,281 +1,280 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the 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 a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE 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.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the 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 a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE 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.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Language
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -32,6 +32,32 @@ return array(
|
||||
'option_options_method' => 'getLanguages',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_default_theme' => array(
|
||||
'label' => array('title' => $lng['panel']['theme'], 'description' => $lng['serversettings']['default_theme']),
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'default_theme',
|
||||
'type' => 'option',
|
||||
'default' => 'Froxlor',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getThemes',
|
||||
'save_method' => 'storeSettingDefaultTheme',
|
||||
),
|
||||
'panel_allow_theme_change_customer' => array(
|
||||
'label' => $lng['serversettings']['panel_allow_theme_change_customer'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'allow_theme_change_customer',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_allow_theme_change_admin' => array(
|
||||
'label' => $lng['serversettings']['panel_allow_theme_change_admin'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'allow_theme_change_admin',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'panel_natsorting' => array(
|
||||
'label' => $lng['serversettings']['natsorting'],
|
||||
'settinggroup' => 'panel',
|
||||
@@ -64,7 +90,24 @@ return array(
|
||||
'type' => 'option',
|
||||
'default' => 'Manual',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('Manual' => 'Manual', 'Dropdown' => 'Dropdown'),
|
||||
'option_options' => array('Manual' => $lng['serversettings']['manual'], 'Dropdown' => $lng['serversettings']['dropdown']),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'use_webfonts' => array(
|
||||
'label' => $lng['serversettings']['enablewebfonts'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'use_webfonts',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'webfont' => array(
|
||||
'label' => $lng['serversettings']['definewebfont']['title'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'webfont',
|
||||
'type' => 'string',
|
||||
'default' => 'Numans',
|
||||
'string_emptyallowed' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_adminmail' => array(
|
||||
@@ -77,6 +120,24 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_adminmail_defname' => array(
|
||||
'label' => $lng['serversettings']['adminmail_defname'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'adminmail_defname',
|
||||
'type' => 'string',
|
||||
'default' => 'Froxlor Administrator',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_adminmail_return' => array(
|
||||
'label' => $lng['serversettings']['adminmail_return'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'adminmail_return',
|
||||
'type' => 'string',
|
||||
'string_type' => 'mail',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_decimal_places' => array(
|
||||
'label' => $lng['serversettings']['decimal_places'],
|
||||
'settinggroup' => 'panel',
|
||||
@@ -133,14 +194,6 @@ return array(
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'admin_froxlor_graphic' => array(
|
||||
'label' => $lng['admin']['froxlor_graphic'],
|
||||
'settinggroup' => 'admin',
|
||||
'varname' => 'froxlor_graphic',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_allow_domain_change_admin' => array(
|
||||
'label' => $lng['serversettings']['panel_allow_domain_change_admin'],
|
||||
'settinggroup' => 'panel',
|
||||
@@ -157,6 +210,14 @@ return array(
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_phpconfigs_hidestdsubdomain' => array(
|
||||
'label' => $lng['serversettings']['panel_phpconfigs_hidestdsubdomain'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'phpconfigs_hidestdsubdomain',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -38,6 +38,14 @@ return array(
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'login_domain_login' => array(
|
||||
'label' => $lng['serversettings']['login_domain_login'],
|
||||
'settinggroup' => 'login',
|
||||
'varname' => 'domain_login',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'login_maxloginattempts' => array(
|
||||
'label' => $lng['serversettings']['maxloginattempts'],
|
||||
'settinggroup' => 'login',
|
||||
@@ -54,6 +62,23 @@ return array(
|
||||
'default' => 900,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_password_min_length' => array(
|
||||
'label' => $lng['serversettings']['panel_password_min_length'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'password_min_length',
|
||||
'type' => 'int',
|
||||
'default' => 0,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_password_regex' => array(
|
||||
'label' => $lng['serversettings']['panel_password_regex'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'password_regex',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
/* 'plausibility_check_method' => 'checkValidRegEx', */
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'customer_accountprefix' => array(
|
||||
'label' => $lng['serversettings']['accountprefix'],
|
||||
'settinggroup' => 'customer',
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -27,8 +27,18 @@ return array(
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'documentroot_prefix',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/customers/webs/',
|
||||
'save_method' => 'storeSettingField',
|
||||
'plausibility_check_method' => 'checkPathConflicts'
|
||||
),
|
||||
'system_documentroot_use_default_value' => array(
|
||||
'label' => $lng['serversettings']['documentroot_use_default_value'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'documentroot_use_default_value',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_ipaddress' => array(
|
||||
'label' => $lng['serversettings']['ipaddress'],
|
||||
@@ -57,6 +67,31 @@ return array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingHostname',
|
||||
'plausibility_check_method' => 'checkHostname',
|
||||
),
|
||||
'system_froxlordirectlyviahostname' => array(
|
||||
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'froxlordirectlyviahostname',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_validatedomain' => array(
|
||||
'label' => $lng['serversettings']['validate_domain'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'validate_domain',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_stdsubdomain' => array(
|
||||
'label' => $lng['serversettings']['stdsubdomainhost'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'stdsubdomain',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingHostname',
|
||||
),
|
||||
'system_mysql_access_host' => array(
|
||||
'label' => $lng['serversettings']['mysql_access_host'],
|
||||
@@ -67,15 +102,6 @@ return array(
|
||||
'plausibility_check_method' => 'checkMysqlAccessHost',
|
||||
'save_method' => 'storeSettingMysqlAccessHost',
|
||||
),
|
||||
'system_realtime_port' => array(
|
||||
'label' => $lng['serversettings']['system_realtime_port'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'realtime_port',
|
||||
'type' => (function_exists('socket_create') ? 'int' : 'hidden'),
|
||||
'int_max' => 65535,
|
||||
'default' => 0,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_index_file_extension' => array(
|
||||
'label' => $lng['serversettings']['index_file_extension'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -85,6 +111,14 @@ return array(
|
||||
'default' => 'html',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_store_index_file_subs' => array(
|
||||
'label' => $lng['serversettings']['system_store_index_file_subs'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'store_index_file_subs',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_httpuser' => array(
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'httpuser',
|
||||
@@ -97,6 +131,35 @@ return array(
|
||||
'type' => 'hidden',
|
||||
'default' => 'www-data',
|
||||
),
|
||||
'system_report_enable' => array(
|
||||
'label' => $lng['serversettings']['report']['report'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'report_enable',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'cronmodule' => 'froxlor/reports',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_report_webmax' => array(
|
||||
'label' => $lng['serversettings']['report']['webmax'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'report_webmax',
|
||||
'type' => 'int',
|
||||
'int_min' => 1,
|
||||
'int_max' => 150,
|
||||
'default' => 90,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_report_trafficmax' => array(
|
||||
'label' => $lng['serversettings']['report']['trafficmax'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'report_trafficmax',
|
||||
'type' => 'int',
|
||||
'int_min' => 1,
|
||||
'int_max' => 150,
|
||||
'default' => 90,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_debug_cron' => array(
|
||||
'label' => $lng['serversettings']['cron']['debug'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -104,10 +167,10 @@ return array(
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -27,9 +27,35 @@ return array(
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'webserver',
|
||||
'type' => 'option',
|
||||
'default' => 'Apache2',
|
||||
'default' => 'apache2',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd'),
|
||||
'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd', 'nginx' => 'Nginx'),
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_apache_24' => array(
|
||||
'label' => $lng['serversettings']['apache_24'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'apache24',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_httpuser' => array(
|
||||
'label' => $lng['admin']['webserver_user'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'httpuser',
|
||||
'type' => 'string',
|
||||
'default' => 'www-data',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_httpgroup' => array(
|
||||
'label' => $lng['admin']['webserver_group'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'httpgroup',
|
||||
'type' => 'string',
|
||||
'default' => 'www-data',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_apacheconf_vhost' => array(
|
||||
@@ -59,22 +85,6 @@ return array(
|
||||
'default' => '/etc/apache2/htpasswd/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_apachereload_command' => array(
|
||||
'label' => $lng['serversettings']['apachereload_command'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'apachereload_command',
|
||||
'type' => 'string',
|
||||
'default' => '/etc/init.d/apache2 reload',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_log_sql' => array(
|
||||
'label' => $lng['serversettings']['mod_log_sql'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_log_sql',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_logfiles_directory' => array(
|
||||
'label' => $lng['serversettings']['logfiles_directory'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -84,6 +94,15 @@ return array(
|
||||
'default' => '/var/customers/logs/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_customersslpath' => array(
|
||||
'label' => $lng['serversettings']['customerssl_directory'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'customer_ssl_path',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/apache2/ssl/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpappendopenbasedir' => array(
|
||||
'label' => $lng['serversettings']['phpappendopenbasedir'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -111,60 +130,106 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
'ssl' => array(
|
||||
'title' => $lng['admin']['sslsettings'],
|
||||
'fields' => array(
|
||||
'system_ssl_enabled' => array(
|
||||
'label' => $lng['serversettings']['ssl']['use_ssl'],
|
||||
'system_apachereload_command' => array(
|
||||
'label' => $lng['serversettings']['apachereload_command'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'use_ssl',
|
||||
'varname' => 'apachereload_command',
|
||||
'type' => 'string',
|
||||
'default' => '/etc/init.d/apache2 reload',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpreload_command' => array(
|
||||
'label' => $lng['serversettings']['phpreload_command'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'phpreload_command',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('nginx')
|
||||
),
|
||||
'system_nginx_php_backend' => array(
|
||||
'label' => $lng['serversettings']['nginx_php_backend'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'nginx_php_backend',
|
||||
'type' => 'string',
|
||||
'default' => '127.0.0.1:8888',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('nginx')
|
||||
),
|
||||
'nginx_fastcgiparams' => array(
|
||||
'label' => $lng['serversettings']['nginx_fastcgiparams'],
|
||||
'settinggroup' => 'nginx',
|
||||
'varname' => 'fastcgiparams',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'default' => '/etc/nginx/fastcgi_params',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('nginx')
|
||||
),
|
||||
'defaultwebsrverrhandler_enabled' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_ssl_cert_file' => array(
|
||||
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ssl_cert_file',
|
||||
'defaultwebsrverrhandler_err401' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err401'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err401',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '/etc/apache2/apache2.pem',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'nginx')
|
||||
),
|
||||
'system_ssl_key_file' => array(
|
||||
'label' => $lng['serversettings']['ssl']['ssl_key_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ssl_key_file',
|
||||
'defaultwebsrverrhandler_err403' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err403',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '/etc/apache2/apache2.key',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'nginx')
|
||||
),
|
||||
'system_ssl_ca_file' => array(
|
||||
'label' => $lng['serversettings']['ssl']['ssl_ca_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ssl_ca_file',
|
||||
'defaultwebsrverrhandler_err404' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err404',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_ssl_openssl_cnf' => array(
|
||||
'label' => $lng['serversettings']['ssl']['openssl_cnf'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'openssl_cnf',
|
||||
'type' => 'text',
|
||||
'defaultwebsrverrhandler_err500' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err500'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err500',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'nginx')
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
'customredirect_enabled' => array(
|
||||
'label' => $lng['serversettings']['customredirect_enabled'],
|
||||
'settinggroup' => 'customredirect',
|
||||
'varname' => 'enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'lighttpd')
|
||||
),
|
||||
'customredirect_default' => array(
|
||||
'label' => $lng['serversettings']['customredirect_default'],
|
||||
'settinggroup' => 'customredirect',
|
||||
'varname' => 'default',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getRedirectCodes',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'lighttpd')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
77
actions/admin/settings/131.ssl.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'ssl' => array(
|
||||
'title' => $lng['admin']['sslsettings'],
|
||||
'fields' => array(
|
||||
'system_ssl_enabled' => array(
|
||||
'label' => $lng['serversettings']['ssl']['use_ssl'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'use_ssl',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_ssl_cert_file' => array(
|
||||
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ssl_cert_file',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '/etc/apache2/apache2.pem',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_ssl_key_file' => array(
|
||||
'label' => $lng['serversettings']['ssl']['ssl_key_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ssl_key_file',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '/etc/apache2/apache2.key',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_ssl_ca_file' => array(
|
||||
'label' => $lng['serversettings']['ssl']['ssl_ca_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ssl_ca_file',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_ssl_cert_chainfile' => array(
|
||||
'label' => $lng['admin']['ipsandports']['ssl_cert_chainfile'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ssl_cert_chainfile',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
151
actions/admin/settings/135.fcgid.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'fcgid' => array(
|
||||
'title' => $lng['admin']['fcgid_settings'],
|
||||
'websrv_avail' => array('apache2', 'lighttpd'),
|
||||
'fields' => array(
|
||||
'system_mod_fcgid_enabled' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'plausibility_check_method' => 'checkFcgidPhpFpm',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_mod_fcgid_configdir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_configdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/www/php-fcgi-scripts/',
|
||||
'plausibility_check_method' => 'checkPathConflicts',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_tmpdir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_tmpdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/customers/tmp/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_peardir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_peardir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'string_delimiter' => ':',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '/usr/share/php/:/usr/share/php5/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_wrapper' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['wrapper'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_wrapper',
|
||||
'type' => 'option',
|
||||
'option_options' => array(0 => 'ScriptAlias', 1=> 'FcgidWrapper'),
|
||||
'default' => 1,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_mod_fcgid_starter' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['starter'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_starter',
|
||||
'type' => 'int',
|
||||
'default' => 0,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_maxrequests' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['maxrequests'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_maxrequests',
|
||||
'type' => 'int',
|
||||
'default' => 250,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_defaultini' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_defaultini',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getPhpConfigs',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_enabled_ownvhost' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid_ownvhost'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_ownvhost',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_mod_fcgid_httpuser' => array(
|
||||
'label' => $lng['admin']['mod_fcgid_user'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_httpuser',
|
||||
'type' => 'string',
|
||||
'default' => 'froxlorlocal',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_mod_fcgid_httpgroup' => array(
|
||||
'label' => $lng['admin']['mod_fcgid_group'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_httpgroup',
|
||||
'type' => 'string',
|
||||
'default' => 'froxlorlocal',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_mod_fcgid_defaultini_ownvhost' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_defaultini_ownvhost',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getPhpConfigs',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_mod_fcgid_idle_timeout' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['idle_timeout'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_idle_timeout',
|
||||
'type' => 'int',
|
||||
'default' => 30,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
184
actions/admin/settings/136.phpfpm.php
Normal file
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'phpfpm' => array(
|
||||
'title' => $lng['admin']['phpfpm_settings'],
|
||||
'fields' => array(
|
||||
'system_phpfpm_enabled' => array(
|
||||
'label' => $lng['serversettings']['phpfpm'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'plausibility_check_method' => 'checkFcgidPhpFpm',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_phpfpm_enabled_ownvhost' => array(
|
||||
'label' => $lng['phpfpm']['ownvhost'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'enabled_ownvhost',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_phpfpm_httpuser' => array(
|
||||
'label' => $lng['phpfpm']['vhost_httpuser'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'vhost_httpuser',
|
||||
'type' => 'string',
|
||||
'default' => 'froxlorlocal',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_phpfpm_httpgroup' => array(
|
||||
'label' => $lng['phpfpm']['vhost_httpgroup'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'vhost_httpgroup',
|
||||
'type' => 'string',
|
||||
'default' => 'froxlorlocal',
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_phpfpm_defaultini' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'defaultini',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getPhpConfigs',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_defaultini_ownvhost' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['defaultini_ownvhost'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'vhost_defaultini',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getPhpConfigs',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_configdir' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'configdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/php-fpm.d/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_aliasconfigdir' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['aliasconfigdir'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'aliasconfigdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/www/php-fpm/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_tmpdir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'tmpdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/customers/tmp/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_peardir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'peardir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/usr/share/php/:/usr/share/php5/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_reload' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['reload'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'reload',
|
||||
'type' => 'string',
|
||||
'default' => '/etc/init.d/php-fpm restart',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_pm' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'pm',
|
||||
'type' => 'option',
|
||||
'default' => 'static',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('static' => 'static', 'dynamic' => 'dynamic', 'ondemand' => 'ondemand'),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_max_children' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_children'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'max_children',
|
||||
'type' => 'int',
|
||||
'default' => 1,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_start_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['start_servers'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'start_servers',
|
||||
'type' => 'int',
|
||||
'default' => 20,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_min_spare_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'min_spare_servers',
|
||||
'type' => 'int',
|
||||
'default' => 5,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_max_spare_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'max_spare_servers',
|
||||
'type' => 'int',
|
||||
'default' => 35,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_max_requests' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_requests'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'max_requests',
|
||||
'type' => 'int',
|
||||
'default' => 0,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_phpfpm_idle_timeout' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'idle_timeout',
|
||||
'type' => 'int',
|
||||
'default' => 30,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
65
actions/admin/settings/137.perl.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'perl' => array(
|
||||
'title' => $lng['admin']['perl_settings'],
|
||||
'fields' => array(
|
||||
'perl_path' => array(
|
||||
'label' => $lng['serversettings']['perl_path'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'perl_path',
|
||||
'type' => 'string',
|
||||
'default' => '/usr/bin/perl',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('lighttpd')
|
||||
),
|
||||
'system_perl_suexecworkaround' => array(
|
||||
'label' => $lng['serversettings']['perl']['suexecworkaround'],
|
||||
'settinggroup' => 'perl',
|
||||
'varname' => 'suexecworkaround',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_perl_suexeccgipath' => array(
|
||||
'label' => $lng['serversettings']['perl']['suexeccgipath'],
|
||||
'settinggroup' => 'perl',
|
||||
'varname' => 'suexecpath',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/www/cgi-bin/',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'perl_server' => array(
|
||||
'label' => $lng['serversettings']['perl_server'],
|
||||
'settinggroup' => 'serversettings',
|
||||
'varname' => 'perl_server',
|
||||
'type' => 'string',
|
||||
'default' => 'unix:/var/run/nginx/cgiwrap-dispatch.sock',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('nginx')
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -40,45 +40,45 @@ return array(
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_domain_file' => array(
|
||||
'label' => $lng['serversettings']['awstats_domain_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_domain_file',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/awstats/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_model_file' => array(
|
||||
'label' => $lng['serversettings']['awstats_model_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_model_file',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'default' => '/etc/awstats/awstats.model.conf.syscp',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_path' => array(
|
||||
'label' => $lng['serversettings']['awstats_path'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_path',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/usr/share/awstats/VERSION/webroot/cgi-bin/',
|
||||
'default' => '/usr/bin/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_updateall_command' => array(
|
||||
'label' => $lng['serversettings']['awstats_updateall_command'],
|
||||
'system_awstats_awstatspath' => array(
|
||||
'label' => $lng['serversettings']['awstats_awstatspath'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_updateall_command',
|
||||
'varname' => 'awstats_awstatspath',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'default' => '/usr/bin/awstats_updateall.pl',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/usr/bin/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
'system_awstats_conf' => array(
|
||||
'label' => $lng['serversettings']['awstats_conf'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_conf',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/awstats/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_icons' => array(
|
||||
'label' => $lng['serversettings']['awstats_icons'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_icons',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/usr/share/awstats/icon/',
|
||||
'save_method' => 'storeSettingField',
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -51,6 +51,16 @@ return array(
|
||||
'default' => '/var/customers/mail/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_vmail_maildirname' => array(
|
||||
'label' => $lng['serversettings']['vmail_maildirname'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'vmail_maildirname',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => 'Maildir',
|
||||
'string_emptyallowed' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_sendalternativemail' => array(
|
||||
'label' => $lng['serversettings']['sendalternativemail'],
|
||||
'settinggroup' => 'panel',
|
||||
@@ -75,7 +85,7 @@ return array(
|
||||
'default' => 100,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'systen_autoresponder_enabled' => array(
|
||||
'system_autoresponder_enabled' => array(
|
||||
'label' => $lng['serversettings']['autoresponder_active'],
|
||||
'settinggroup' => 'autoresponder',
|
||||
'varname' => 'autoresponder_active',
|
||||
@@ -84,15 +94,23 @@ return array(
|
||||
'cronmodule' => 'froxlor/autoresponder',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'systen_last_autoresponder_run' => array(
|
||||
'system_last_autoresponder_run' => array(
|
||||
'settinggroup' => 'autoresponder',
|
||||
'varname' => 'last_autoresponder_run',
|
||||
'type' => 'hidden',
|
||||
'default' => 0,
|
||||
),
|
||||
'system_catchall_enabled' => array(
|
||||
'label' => $lng['serversettings']['catchall_enabled'],
|
||||
'settinggroup' => 'catchall',
|
||||
'varname' => 'catchall_enabled',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingResetCatchall',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
40
actions/admin/settings/155.ftpserver.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'ftpserver' => array(
|
||||
'title' => $lng['admin']['ftpserversettings'],
|
||||
'fields' => array(
|
||||
'ftpserver' => array(
|
||||
'label' => $lng['admin']['ftpserver'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ftpserver',
|
||||
'type' => 'option',
|
||||
'default' => 'proftpd',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('proftpd' => 'Proftpd', 'pureftpd' => 'Pureftpd'),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -22,6 +22,15 @@ return array(
|
||||
'nameserver' => array(
|
||||
'title' => $lng['admin']['nameserversettings'],
|
||||
'fields' => array(
|
||||
'nameserver_enable' => array(
|
||||
'label' => $lng['serversettings']['bindenable'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'bind_enable',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_bindconf_directory' => array(
|
||||
'label' => $lng['serversettings']['bindconf_directory'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -59,6 +68,34 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_axfrservers' => array(
|
||||
'label' => $lng['serversettings']['axfrservers'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'axfrservers',
|
||||
'type' => 'string',
|
||||
'string_type' => 'validate_ip',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_dns_createmailentry' => array(
|
||||
'label' => $lng['serversettings']['mail_also_with_mxservers'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'dns_createmailentry',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_defaultttl' => array(
|
||||
'label' => $lng['serversettings']['defaultttl'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'defaultttl',
|
||||
'type' => 'int',
|
||||
'default' => 604800, /* 1 week */
|
||||
'int_min' => 3600, /* 1 hour */
|
||||
'int_max' => 2147483647, /* integer max */
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -29,6 +29,7 @@ return array(
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'logger_severity' => array(
|
||||
'label' => $lng['serversettings']['logger']['severity'],
|
||||
|
||||
@@ -14,9 +14,11 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
global $settings;
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'dkim' => array(
|
||||
@@ -28,13 +30,15 @@ return array(
|
||||
'varname' => 'use_dkim',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
'overview_option' => true
|
||||
),
|
||||
'dkim_prefix' => array(
|
||||
'label' => $lng['dkim']['dkim_prefix'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_prefix',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/postfix/dkim/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
@@ -56,6 +60,66 @@ return array(
|
||||
'default' => 'dkim-keys.conf',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'dkim_algorithm' => array(
|
||||
'label' => $lng['dkim']['dkim_algorithm'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_algorithm',
|
||||
'type' => 'option',
|
||||
'default' => 'all',
|
||||
'option_mode' => 'multiple',
|
||||
'option_options' => array('all' => 'All', 'sha1' => 'SHA1', 'sha256' => 'SHA256'),
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_servicetype' => array(
|
||||
'label' => $lng['dkim']['dkim_servicetype'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_servicetype',
|
||||
'type' => 'option',
|
||||
'default' => '0',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('0' => 'All', '1' => 'E-Mail'),
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_keylength' => array(
|
||||
'label' => array(
|
||||
'title' => $lng['dkim']['dkim_keylength']['title'],
|
||||
'description' => sprintf($lng['dkim']['dkim_keylength']['description'],$settings['dkim']['dkim_prefix'])
|
||||
),
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_keylength',
|
||||
'type' => 'option',
|
||||
'default' => '1024',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('1024' => '1024 Bit', '2048' => '2048 Bit'),
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_notes' => array(
|
||||
'label' => $lng['dkim']['dkim_notes'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_notes',
|
||||
'type' => 'string',
|
||||
'string_regexp' => '/^[a-z0-9\._]+$/i',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_add_adsp' => array(
|
||||
'label' => $lng['dkim']['dkim_add_adsp'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_add_adsp',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_add_adsppolicy' => array(
|
||||
'label' => $lng['dkim']['dkim_add_adsppolicy'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_add_adsppolicy',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('0' => 'Unknown', '1' => 'All', '2' => 'Discardable'),
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkimrestart_command' => array(
|
||||
'label' => $lng['dkim']['dkimrestart_command'],
|
||||
'settinggroup' => 'dkim',
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -26,7 +26,8 @@ return array(
|
||||
'varname' => 'use_spf',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'spf_entry' => array(
|
||||
'label' => $lng['spf']['spf_entry'],
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -30,6 +30,7 @@ return array(
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/ticket',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'ticket_noreply_email' => array(
|
||||
'label' => $lng['serversettings']['ticket']['noreply_email'],
|
||||
@@ -57,6 +58,7 @@ return array(
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(0 => html_entity_decode($lng['admin']['tickets']['daily']), 1 => html_entity_decode($lng['admin']['tickets']['weekly']), 2 => html_entity_decode($lng['admin']['tickets']['monthly']), 3 => html_entity_decode($lng['admin']['tickets']['yearly'])),
|
||||
'save_method' => 'storeSettingField',
|
||||
'plausibility_check_method' => 'setCycleOfCronjob',
|
||||
),
|
||||
'ticket_concurrently_open' => array(
|
||||
'label' => $lng['serversettings']['ticket']['concurrentlyopen'],
|
||||
@@ -124,9 +126,19 @@ return array(
|
||||
'type' => 'hidden',
|
||||
'default' => '',
|
||||
),
|
||||
'ticket_default_priority' => array(
|
||||
'label' => $lng['serversettings']['ticket']['default_priority'],
|
||||
'settinggroup' => 'ticket',
|
||||
'varname' => 'default_priority',
|
||||
'type' => 'option',
|
||||
'default' => 2,
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(1 => $lng['ticket']['high'], 2 => $lng['ticket']['normal'], 3 => $lng['ticket']['low']),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -30,6 +30,7 @@ return array(
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/aps',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'aps_items_per_page' => array(
|
||||
'label' => $lng['aps']['packages_per_page'],
|
||||
@@ -58,7 +59,7 @@ return array(
|
||||
'type' => 'option',
|
||||
'default' => '',
|
||||
'option_mode' => 'multiple',
|
||||
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap'),
|
||||
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring', 'Zend Optimizer' => 'Zend Guard'),
|
||||
'save_method' => 'storeSettingApsPhpExtensions',
|
||||
),
|
||||
'aps_php-function' => array(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -38,71 +38,17 @@ return array(
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_enabled' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid'],
|
||||
'system_passwordcryptfunc' => array(
|
||||
'label' => $lng['serversettings']['passwordcryptfunc'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_configdir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_configdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/www/php-fcgi-scripts/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_tmpdir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_tmpdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/customers/tmp/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_peardir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_peardir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'string_delimiter' => ':',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '/usr/share/php/:/usr/share/php5/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_wrapper' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['wrapper'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_wrapper',
|
||||
'varname' => 'passwordcryptfunc',
|
||||
'type' => 'option',
|
||||
'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'),
|
||||
'default' => 0,
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(0 => $lng['serversettings']['systemdefault'], 1 => 'MD5', 2 => 'BLOWFISH', 3 => 'SHA-256', 4 => 'SHA-512'),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_starter' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['starter'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_starter',
|
||||
'type' => 'int',
|
||||
'default' => 0,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_maxrequests' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['maxrequests'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_maxrequests',
|
||||
'type' => 'int',
|
||||
'default' => 250,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
118
actions/admin/settings/215.backup.php
Normal file
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'backup' => array(
|
||||
'title' => $lng['backup'],
|
||||
'fields' => array(
|
||||
'backup_enabled' => array(
|
||||
'label' => $lng['serversettings']['backup_enabled'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/backup',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'backup_dir' => array(
|
||||
'label' => $lng['serversettings']['backupdir']['description'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_dir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/customers/backups/',
|
||||
'string_regexp' => '#^/.*/$#',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_mysqldump_path' => array(
|
||||
'label' => $lng['serversettings']['mysqldump_path']['description'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_mysqldump_path',
|
||||
'type' => 'string',
|
||||
'default' => '/usr/bin/mysqldump',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_count' => array(
|
||||
'label' => $lng['serversettings']['backup_count'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_count',
|
||||
'type' => 'bool',
|
||||
'default' => 'true',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'backup_bigfile' => array(
|
||||
'label' => $lng['serversettings']['backup_bigfile'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_bigfile',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'backup_ftp_enabled_' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_enabled'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'backup_server' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_server'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_server',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_user' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_user'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_user',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_pass' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_pass'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_pass',
|
||||
'type' => 'hiddenstring',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'backup_passive_mode' => array(
|
||||
'label' => $lng['serversettings']['backup_ftp_passive_mode'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'backup_ftp_passive',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
60
actions/admin/settings/220.quota.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2011- the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2011-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'diskquota' => array(
|
||||
'title' => $lng['diskquota'],
|
||||
'fields' => array(
|
||||
'diskquota_enabled' => array(
|
||||
'label' => $lng['serversettings']['diskquota_enabled'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'diskquota_enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'diskquota_repquota_path' => array(
|
||||
'label' => $lng['serversettings']['diskquota_repquota_path']['description'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'diskquota_repquota_path',
|
||||
'type' => 'string',
|
||||
'default' => '/usr/sbin/repquota',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'diskquota_quotatool_path' => array(
|
||||
'label' => $lng['serversettings']['diskquota_quotatool_path']['description'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'diskquota_quotatool_path',
|
||||
'type' => 'string',
|
||||
'default' => '/usr/bin/quotatool',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'diskquota_customer_partition' => array(
|
||||
'label' => $lng['serversettings']['diskquota_customer_partition']['description'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'diskquota_customer_partition',
|
||||
'type' => 'string',
|
||||
'default' => '/dev/root',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
385
admin_admins.php
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -47,22 +47,6 @@ if($page == 'admins'
|
||||
'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'traffic' => $lng['customer']['traffic'],
|
||||
'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'mysqls' => $lng['customer']['mysqls'],
|
||||
'mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'ftps' => $lng['customer']['ftps'],
|
||||
'ftps_used' => $lng['customer']['ftps'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'tickets' => $lng['customer']['tickets'],
|
||||
'tickets_used' => $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'subdomains' => $lng['customer']['subdomains'],
|
||||
'subdomains_used' => $lng['customer']['subdomains'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'emails' => $lng['customer']['emails'],
|
||||
'emails_used' => $lng['customer']['emails'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'email_accounts' => $lng['customer']['accounts'],
|
||||
'email_accounts_used' => $lng['customer']['accounts'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'email_forwarders' => $lng['customer']['forwarders'],
|
||||
'email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'email_quota' => $lng['customer']['email_quota'],
|
||||
'email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'deactivated' => $lng['admin']['deactivated']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
@@ -84,7 +68,30 @@ if($page == 'admins'
|
||||
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
|
||||
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
|
||||
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains tickets');
|
||||
|
||||
/**
|
||||
* percent-values for progressbar
|
||||
*/
|
||||
//For Disk usage
|
||||
if ($row['diskspace'] > 0) {
|
||||
$disk_percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
|
||||
$disk_doublepercent = round($disk_percent*2, 2);
|
||||
} else {
|
||||
$disk_percent = 0;
|
||||
$disk_doublepercent = 0;
|
||||
}
|
||||
|
||||
//For Traffic usage
|
||||
if ($row['traffic'] > 0) {
|
||||
$traffic_percent = round(($row['traffic_used']*100)/$row['traffic'], 2);
|
||||
$traffic_doublepercent = round($traffic_percent*2, 2);
|
||||
} else {
|
||||
$traffic_percent = 0;
|
||||
$traffic_doublepercent = 0;
|
||||
}
|
||||
/* */
|
||||
|
||||
$row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps subdomains tickets');
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";");
|
||||
$count++;
|
||||
@@ -93,6 +100,7 @@ if($page == 'admins'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$admincount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("admins/admins") . "\";");
|
||||
}
|
||||
elseif($action == 'su')
|
||||
@@ -154,6 +162,7 @@ if($page == 'admins'
|
||||
|
||||
$loginname = validate($_POST['loginname'], 'loginname');
|
||||
$password = validate($_POST['admin_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$customers = intval_ressource($_POST['customers']);
|
||||
|
||||
@@ -211,6 +220,20 @@ if($page == 'admins'
|
||||
$email_quota = - 1;
|
||||
}
|
||||
|
||||
if($settings['autoresponder']['autoresponder_active'] == '1')
|
||||
{
|
||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
||||
|
||||
if(isset($_POST['email_autoresponder_ul']))
|
||||
{
|
||||
$email_autoresponder = - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$email_autoresponder = 0;
|
||||
}
|
||||
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
|
||||
if(isset($_POST['ftps_ul']))
|
||||
@@ -218,12 +241,18 @@ if($page == 'admins'
|
||||
$ftps = - 1;
|
||||
}
|
||||
|
||||
$tickets = intval_ressource($_POST['tickets']);
|
||||
|
||||
if(isset($_POST['tickets_ul'])
|
||||
&& $settings['ticket']['enabled'] == '1')
|
||||
if($settings['ticket']['enabled'] == 1)
|
||||
{
|
||||
$tickets = - 1;
|
||||
$tickets = intval_ressource($_POST['tickets']);
|
||||
|
||||
if(isset($_POST['tickets_ul']))
|
||||
{
|
||||
$tickets = - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tickets = 0;
|
||||
}
|
||||
|
||||
$mysqls = intval_ressource($_POST['mysqls']);
|
||||
@@ -242,7 +271,7 @@ if($page == 'admins'
|
||||
$number_of_aps_packages = - 1;
|
||||
}
|
||||
|
||||
$can_manage_aps_packages = intval($_POST['can_manage_aps_packages']);
|
||||
$can_manage_aps_packages = isset($_POST['can_manage_aps_packages']) ? 1 : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -250,10 +279,21 @@ if($page == 'admins'
|
||||
$can_manage_aps_packages = 0;
|
||||
}
|
||||
|
||||
$customers_see_all = intval($_POST['customers_see_all']);
|
||||
$domains_see_all = intval($_POST['domains_see_all']);
|
||||
$caneditphpsettings = intval($_POST['caneditphpsettings']);
|
||||
$change_serversettings = intval($_POST['change_serversettings']);
|
||||
$customers_see_all = 0;
|
||||
if(isset($_POST['customers_see_all']))
|
||||
$customers_see_all = intval($_POST['customers_see_all']);
|
||||
|
||||
$domains_see_all = 0;
|
||||
if(isset($_POST['domains_see_all']))
|
||||
$domains_see_all = intval($_POST['domains_see_all']);
|
||||
|
||||
$caneditphpsettings = 0;
|
||||
if(isset($_POST['caneditphpsettings']))
|
||||
$caneditphpsettings = intval($_POST['caneditphpsettings']);
|
||||
|
||||
$change_serversettings = 0;
|
||||
if(isset($_POST['change_serversettings']))
|
||||
$change_serversettings = intval($_POST['change_serversettings']);
|
||||
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
|
||||
@@ -269,6 +309,10 @@ if($page == 'admins'
|
||||
$traffic = - 1;
|
||||
}
|
||||
|
||||
$tickets_see_all = 0;
|
||||
if(isset($_POST['tickets_see_all']))
|
||||
$tickets_see_all = intval($_POST['tickets_see_all']);
|
||||
|
||||
$diskspace = $diskspace * 1024;
|
||||
$traffic = $traffic * 1024 * 1024;
|
||||
$ipaddress = intval_ressource($_POST['ipaddress']);
|
||||
@@ -336,8 +380,43 @@ if($page == 'admins'
|
||||
$change_serversettings = '0';
|
||||
}
|
||||
|
||||
$result = $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` (`loginname`, `password`, `name`, `email`, `def_language`, `change_serversettings`, `customers`, `customers_see_all`, `domains`, `domains_see_all`, `caneditphpsettings`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `ip`, `can_manage_aps_packages`, `aps_packages`)
|
||||
VALUES ('" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($email) . "','" . $db->escape($def_language) . "', '" . $db->escape($change_serversettings) . "', '" . $db->escape($customers) . "', '" . $db->escape($customers_see_all) . "', '" . $db->escape($domains) . "', '" . $db->escape($domains_see_all) . "', '" . (int)$caneditphpsettings . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '" . (int)$ipaddress . "', " . (int)$can_manage_aps_packages . ", " . (int)$number_of_aps_packages . ")");
|
||||
if ($tickets_see_all != '1') {
|
||||
$tickets_see_all = '0';
|
||||
}
|
||||
|
||||
$_theme = $settings['panel']['default_theme'];
|
||||
|
||||
$result = $db->query("INSERT INTO
|
||||
`" . TABLE_PANEL_ADMINS . "`
|
||||
SET
|
||||
`loginname` = '" . $db->escape($loginname) . "',
|
||||
`password` = '" . md5($password) . "',
|
||||
`name` = '" . $db->escape($name) . "',
|
||||
`email` = '" . $db->escape($email) . "',
|
||||
`def_language` = '" . $db->escape($def_language) . "',
|
||||
`change_serversettings` = '" . $db->escape($change_serversettings) . "',
|
||||
`customers` = '" . $db->escape($customers) . "',
|
||||
`customers_see_all` = '" . $db->escape($customers_see_all) . "',
|
||||
`domains` = '" . $db->escape($domains) . "',
|
||||
`domains_see_all` = '" . $db->escape($domains_see_all) . "',
|
||||
`caneditphpsettings` = '" . (int)$caneditphpsettings . "',
|
||||
`diskspace` = '" . $db->escape($diskspace) . "',
|
||||
`traffic` = '" . $db->escape($traffic) . "',
|
||||
`subdomains` = '" . $db->escape($subdomains) . "',
|
||||
`emails` = '" . $db->escape($emails) . "',
|
||||
`email_accounts` = '" . $db->escape($email_accounts) . "',
|
||||
`email_forwarders` = '" . $db->escape($email_forwarders) . "',
|
||||
`email_quota` = '" . $db->escape($email_quota) . "',
|
||||
`ftps` = '" . $db->escape($ftps) . "',
|
||||
`tickets` = '" . $db->escape($tickets) . "',
|
||||
`tickets_see_all` = '" . $db->escape($tickets_see_all) . "',
|
||||
`mysqls` = '" . $db->escape($mysqls) . "',
|
||||
`ip` = '" . (int)$ipaddress . "',
|
||||
`can_manage_aps_packages` = '" . (int)$can_manage_aps_packages . "',
|
||||
`aps_packages` = '" . (int)$number_of_aps_packages . "',
|
||||
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
|
||||
`theme` = '".$db->escape($_theme)."';
|
||||
");
|
||||
$adminid = $db->insert_id();
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "added admin '" . $loginname . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
@@ -379,16 +458,25 @@ if($page == 'admins'
|
||||
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
/*
|
||||
$change_serversettings = makeyesno('change_serversettings', '1', '0', '0');
|
||||
$customers_see_all = makeyesno('customers_see_all', '1', '0', '0');
|
||||
$domains_see_all = makeyesno('domains_see_all', '1', '0', '0');
|
||||
$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', '0');
|
||||
$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', '0');
|
||||
*/
|
||||
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
|
||||
$admin_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_add.php';
|
||||
$admin_add_form = htmlform::genHTMLForm($admin_add_data);
|
||||
|
||||
$title = $admin_add_data['admin_add']['title'];
|
||||
$image = $admin_add_data['admin_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("admins/admins_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -417,9 +505,11 @@ if($page == 'admins'
|
||||
$email_accounts = $result['email_accounts'];
|
||||
$email_forwarders = $result['email_forwarders'];
|
||||
$email_quota = $result['email_quota'];
|
||||
$email_autoresponder = $result['email_autoresponder'];
|
||||
$ftps = $result['ftps'];
|
||||
$tickets = $result['tickets'];
|
||||
$mysqls = $result['mysqls'];
|
||||
$tickets_see_all = $result['tickets_see_all'];
|
||||
$customers_see_all = $result['customers_see_all'];
|
||||
$domains_see_all = $result['domains_see_all'];
|
||||
$caneditphpsettings = $result['caneditphpsettings'];
|
||||
@@ -434,109 +524,113 @@ if($page == 'admins'
|
||||
{
|
||||
$password = validate($_POST['admin_password'], 'new password');
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$deactivated = intval($_POST['deactivated']);
|
||||
$customers = intval_ressource($_POST['customers']);
|
||||
$deactivated = isset($_POST['deactivated']) ? 1 : 0;
|
||||
|
||||
if(isset($_POST['customers_ul']))
|
||||
{
|
||||
$customers = - 1;
|
||||
$customers = intval_ressource($_POST['customers']);
|
||||
if (isset($_POST['customers_ul'])) {
|
||||
$customers = -1;
|
||||
}
|
||||
|
||||
$domains = intval_ressource($_POST['domains']);
|
||||
|
||||
if(isset($_POST['domains_ul']))
|
||||
{
|
||||
$domains = - 1;
|
||||
if (isset($_POST['domains_ul'])) {
|
||||
$domains = -1;
|
||||
}
|
||||
|
||||
$subdomains = intval_ressource($_POST['subdomains']);
|
||||
|
||||
if(isset($_POST['subdomains_ul']))
|
||||
{
|
||||
$subdomains = - 1;
|
||||
if (isset($_POST['subdomains_ul'])) {
|
||||
$subdomains = -1;
|
||||
}
|
||||
|
||||
$emails = intval_ressource($_POST['emails']);
|
||||
|
||||
if(isset($_POST['emails_ul']))
|
||||
{
|
||||
$emails = - 1;
|
||||
if (isset($_POST['emails_ul'])) {
|
||||
$emails = -1;
|
||||
}
|
||||
|
||||
$email_accounts = intval_ressource($_POST['email_accounts']);
|
||||
|
||||
if(isset($_POST['email_accounts_ul']))
|
||||
{
|
||||
$email_accounts = - 1;
|
||||
if (isset($_POST['email_accounts_ul'])) {
|
||||
$email_accounts = -1;
|
||||
}
|
||||
|
||||
$email_forwarders = intval_ressource($_POST['email_forwarders']);
|
||||
|
||||
if(isset($_POST['email_forwarders_ul']))
|
||||
{
|
||||
$email_forwarders = - 1;
|
||||
if (isset($_POST['email_forwarders_ul'])) {
|
||||
$email_forwarders = -1;
|
||||
}
|
||||
|
||||
if($settings['system']['mail_quota_enabled'] == '1')
|
||||
{
|
||||
if ($settings['system']['mail_quota_enabled'] == '1') {
|
||||
$email_quota = validate($_POST['email_quota'], 'email_quota', '/^\d+$/', 'vmailquotawrong', array('0', ''));
|
||||
|
||||
if(isset($_POST['email_quota_ul']))
|
||||
{
|
||||
$email_quota = - 1;
|
||||
if (isset($_POST['email_quota_ul'])) {
|
||||
$email_quota = -1;
|
||||
}
|
||||
} else {
|
||||
$email_quota = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$email_quota = - 1;
|
||||
|
||||
if ($settings['autoresponder']['autoresponder_active'] == '1') {
|
||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
||||
if (isset($_POST['email_autoresponder_ul'])) {
|
||||
$email_autoresponder = -1;
|
||||
}
|
||||
} else {
|
||||
$email_autoresponder = 0;
|
||||
}
|
||||
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
|
||||
if(isset($_POST['ftps_ul']))
|
||||
{
|
||||
$ftps = - 1;
|
||||
if (isset($_POST['ftps_ul'])) {
|
||||
$ftps = -1;
|
||||
}
|
||||
|
||||
$tickets = intval_ressource($_POST['tickets']);
|
||||
|
||||
if(isset($_POST['tickets_ul']))
|
||||
{
|
||||
$tickets = - 1;
|
||||
|
||||
if ($settings['ticket']['enabled'] == 1) {
|
||||
$tickets = intval_ressource($_POST['tickets']);
|
||||
if (isset($_POST['tickets_ul'])) {
|
||||
$tickets = -1;
|
||||
}
|
||||
} else {
|
||||
$tickets = 0;
|
||||
}
|
||||
|
||||
$mysqls = intval_ressource($_POST['mysqls']);
|
||||
|
||||
if(isset($_POST['mysqls_ul']))
|
||||
{
|
||||
if (isset($_POST['mysqls_ul'])) {
|
||||
$mysqls = - 1;
|
||||
}
|
||||
|
||||
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
|
||||
|
||||
if(isset($_POST['number_of_aps_packages_ul']))
|
||||
{
|
||||
$number_of_aps_packages = - 1;
|
||||
if ($settings['aps']['aps_active'] == '1') {
|
||||
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
|
||||
if (isset($_POST['number_of_aps_packages_ul'])) {
|
||||
$number_of_aps_packages = -1;
|
||||
}
|
||||
$can_manage_aps_packages = isset($_POST['can_manage_aps_packages']) ? 1 : 0;
|
||||
} else {
|
||||
$number_of_aps_packages = 0;
|
||||
}
|
||||
|
||||
$customers_see_all = intval($_POST['customers_see_all']);
|
||||
$domains_see_all = intval($_POST['domains_see_all']);
|
||||
$caneditphpsettings = intval($_POST['caneditphpsettings']);
|
||||
$change_serversettings = intval($_POST['change_serversettings']);
|
||||
$can_manage_aps_packages = intval($_POST['can_manage_aps_packages']);
|
||||
$customers_see_all = 0;
|
||||
if(isset($_POST['customers_see_all']))
|
||||
$customers_see_all = intval($_POST['customers_see_all']);
|
||||
|
||||
$domains_see_all = 0;
|
||||
if(isset($_POST['domains_see_all']))
|
||||
$domains_see_all = intval($_POST['domains_see_all']);
|
||||
|
||||
$caneditphpsettings = 0;
|
||||
if(isset($_POST['caneditphpsettings']))
|
||||
$caneditphpsettings = intval($_POST['caneditphpsettings']);
|
||||
|
||||
$change_serversettings = 0;
|
||||
if(isset($_POST['change_serversettings']))
|
||||
$change_serversettings = isset($_POST['change_serversettings']) ? 1 : 0;
|
||||
|
||||
$tickets_see_all = 0;
|
||||
if (isset($_POST['tickets_see_all']))
|
||||
$tickets_see_all = intval($_POST['tickets_see_all']);
|
||||
|
||||
$diskspace = intval($_POST['diskspace']);
|
||||
|
||||
if(isset($_POST['diskspace_ul']))
|
||||
{
|
||||
$diskspace = - 1;
|
||||
if (isset($_POST['diskspace_ul'])) {
|
||||
$diskspace = -1;
|
||||
}
|
||||
|
||||
$traffic = doubleval_ressource($_POST['traffic']);
|
||||
|
||||
if(isset($_POST['traffic_ul']))
|
||||
{
|
||||
$traffic = - 1;
|
||||
if (isset($_POST['traffic_ul'])) {
|
||||
$traffic = -1;
|
||||
}
|
||||
|
||||
$diskspace = $diskspace * 1024;
|
||||
@@ -560,6 +654,7 @@ if($page == 'admins'
|
||||
{
|
||||
if($password != '')
|
||||
{
|
||||
$password = validatePassword($password);
|
||||
$password = md5($password);
|
||||
}
|
||||
else
|
||||
@@ -592,7 +687,88 @@ if($page == 'admins'
|
||||
$change_serversettings = '0';
|
||||
}
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `name`='" . $db->escape($name) . "', `email`='" . $db->escape($email) . "', `def_language`='" . $db->escape($def_language) . "', `change_serversettings` = '" . $db->escape($change_serversettings) . "', `customers` = '" . $db->escape($customers) . "', `customers_see_all` = '" . $db->escape($customers_see_all) . "', `domains` = '" . $db->escape($domains) . "', `domains_see_all` = '" . $db->escape($domains_see_all) . "', `caneditphpsettings` = '" . (int)$caneditphpsettings . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `email_quota`='" . $db->escape($email_quota) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `ip`='" . (int)$ipaddress . "', `deactivated`='" . $db->escape($deactivated) . "', `can_manage_aps_packages`=" . (int)$can_manage_aps_packages . ", `aps_packages`=" . (int)$number_of_aps_packages . " WHERE `adminid`='" . $db->escape($id) . "'");
|
||||
if ($tickets_see_all != '1') {
|
||||
$tickets_see_all = '0';
|
||||
}
|
||||
|
||||
// check if a resource was set to something lower
|
||||
// than actually used by the admin/reseller
|
||||
$res_warning = "";
|
||||
if ($customers != $result['customers'] && $customers < $result['customers_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'customers');
|
||||
}
|
||||
if ($domains != $result['domains'] && $domains < $result['domains_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'domains');
|
||||
}
|
||||
if ($diskspace != $result['diskspace'] && ($diskspace / 1024) != -1 && $diskspace < $result['diskspace_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'diskspace');
|
||||
}
|
||||
if ($traffic != $result['traffic'] && ($traffic / 1024 / 1024) != -1 && $traffic < $result['traffic_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'traffic');
|
||||
}
|
||||
if ($emails != $result['emails'] && $emails < $result['emails_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'emails');
|
||||
}
|
||||
if ($email_accounts != $result['email_accounts'] && $email_accounts < $result['email_accounts_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email accounts');
|
||||
}
|
||||
if ($email_forwarders != $result['email_forwarders'] && $email_forwarders < $result['email_forwarders_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email forwarders');
|
||||
}
|
||||
if ($email_quota != $result['email_quota'] && $email_quota < $result['email_quota_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email quota');
|
||||
}
|
||||
if ($email_autoresponder != $result['email_autoresponder'] && $email_autoresponder < $result['email_autoresponder_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'email autoresponder');
|
||||
}
|
||||
if ($ftps != $result['ftps'] && $ftps < $result['ftps_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'ftps');
|
||||
}
|
||||
if ($tickets != $result['tickets'] && $tickets < $result['tickets_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'tickets');
|
||||
}
|
||||
if ($mysqls != $result['mysqls'] && $mysqls < $result['mysqls_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'mysqls');
|
||||
}
|
||||
if ($number_of_aps_packages != $result['aps_packages'] && $number_of_aps_packages < $result['aps_packages_used']) {
|
||||
$res_warning .= sprintf($lng['error']['setlessthanalreadyused'], 'aps packages');
|
||||
}
|
||||
|
||||
if ($res_warning != "") {
|
||||
$link = '';
|
||||
$error = $res_warning;
|
||||
eval("echo \"" . getTemplate('misc/error', '1') . "\";");
|
||||
exit;
|
||||
}
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET
|
||||
`name`='" . $db->escape($name) . "',
|
||||
`email`='" . $db->escape($email) . "',
|
||||
`def_language`='" . $db->escape($def_language) . "',
|
||||
`change_serversettings` = '" . $db->escape($change_serversettings) . "',
|
||||
`customers` = '" . $db->escape($customers) . "',
|
||||
`customers_see_all` = '" . $db->escape($customers_see_all) . "',
|
||||
`domains` = '" . $db->escape($domains) . "',
|
||||
`domains_see_all` = '" . $db->escape($domains_see_all) . "',
|
||||
`caneditphpsettings` = '" . (int)$caneditphpsettings . "',
|
||||
`password` = '" . $password . "',
|
||||
`diskspace`='" . $db->escape($diskspace) . "',
|
||||
`traffic`='" . $db->escape($traffic) . "',
|
||||
`subdomains`='" . $db->escape($subdomains) . "',
|
||||
`emails`='" . $db->escape($emails) . "',
|
||||
`email_accounts` = '" . $db->escape($email_accounts) . "',
|
||||
`email_forwarders`='" . $db->escape($email_forwarders) . "',
|
||||
`email_quota`='" . $db->escape($email_quota) . "',
|
||||
`email_autoresponder`='" . $db->escape($email_autoresponder) . "',
|
||||
`ftps`='" . $db->escape($ftps) . "',
|
||||
`tickets`='" . $db->escape($tickets) . "',
|
||||
`tickets_see_all`='".$db->escape($tickets_see_all) . "',
|
||||
`mysqls`='" . $db->escape($mysqls) . "',
|
||||
`ip`='" . (int)$ipaddress . "',
|
||||
`deactivated`='" . $db->escape($deactivated) . "',
|
||||
`can_manage_aps_packages`=" . (int)$can_manage_aps_packages . ",
|
||||
`aps_packages`=" . (int)$number_of_aps_packages . "
|
||||
WHERE `adminid`='" . $db->escape($id) . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited admin '#" . $id . "'");
|
||||
$redirect_props = Array(
|
||||
'page' => $page,
|
||||
@@ -670,6 +846,13 @@ if($page == 'admins'
|
||||
$result['email_quota'] = '';
|
||||
}
|
||||
|
||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, $result['email_autoresponder'], true, true);
|
||||
|
||||
if($result['email_autoresponder'] == '-1')
|
||||
{
|
||||
$result['email_autoresponder'] = '';
|
||||
}
|
||||
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
||||
|
||||
if($result['ftps'] == '-1')
|
||||
@@ -723,14 +906,22 @@ if($page == 'admins'
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
$change_serversettings = makeyesno('change_serversettings', '1', '0', $result['change_serversettings']);
|
||||
$customers_see_all = makeyesno('customers_see_all', '1', '0', $result['customers_see_all']);
|
||||
$domains_see_all = makeyesno('domains_see_all', '1', '0', $result['domains_see_all']);
|
||||
$caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', $result['caneditphpsettings']);
|
||||
$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
|
||||
$can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', $result['can_manage_aps_packages']);
|
||||
|
||||
*/
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$admin_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/admin/formfield.admin_edit.php';
|
||||
$admin_edit_form = htmlform::genHTMLForm($admin_edit_data);
|
||||
|
||||
$title = $admin_edit_data['admin_edit']['title'];
|
||||
$image = $admin_edit_data['admin_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("admins/admins_edit") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
// Required code
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -95,10 +95,12 @@ if($userinfo['change_serversettings'] == '1')
|
||||
'<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'],
|
||||
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
||||
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
||||
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
|
||||
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
||||
'<REALTIME_PORT>' => $settings['system']['realtime_port'],
|
||||
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? $settings['system']['mod_fcgid_tmpdir'] : '/tmp/'
|
||||
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/',
|
||||
'<BASE_PATH>' => makeCorrectDir(dirname(__FILE__)),
|
||||
'<BIND_CONFIG_PATH>' => makeCorrectDir($settings['system']['bindconf_directory']),
|
||||
'<WEBSERVER_RELOAD_CMD>' => $settings['system']['apachereload_command'],
|
||||
'<CUSTOMER_LOGS>' => makeCorrectDir($settings['system']['logfiles_directory'])
|
||||
);
|
||||
$files = '';
|
||||
$configpage = '';
|
||||
@@ -111,6 +113,7 @@ if($userinfo['change_serversettings'] == '1')
|
||||
if(is_array($value))
|
||||
{
|
||||
$commands = implode("\n", $value);
|
||||
$commands = str_replace("\n\n", "\n", $commands);
|
||||
|
||||
if($commands != '')
|
||||
{
|
||||
|
||||
@@ -12,28 +12,21 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
require_once('./lib/init.php');
|
||||
|
||||
require_once("./lib/init.php");
|
||||
|
||||
if(isset($_POST['id']))
|
||||
{
|
||||
if (isset($_POST['id'])) {
|
||||
$id = intval($_POST['id']);
|
||||
}
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
} elseif(isset($_GET['id'])) {
|
||||
$id = intval($_GET['id']);
|
||||
}
|
||||
|
||||
if($page == 'cronjobs'
|
||||
|| $page == 'overview')
|
||||
{
|
||||
if($action == '')
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_cronjobs");
|
||||
if ($page == 'cronjobs' || $page == 'overview') {
|
||||
if ($action == '') {
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, 'viewed admin_cronjobs');
|
||||
|
||||
$fields = array(
|
||||
'c.lastrun' => $lng['cron']['lastrun'],
|
||||
@@ -56,61 +49,81 @@ if($page == 'cronjobs'
|
||||
$i = 0;
|
||||
$count = 0;
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
if ($paging->checkDisplay($i)) {
|
||||
$row = htmlentities_array($row);
|
||||
|
||||
|
||||
$row['lastrun'] = date('d.m.Y H:i', $row['lastrun']);
|
||||
|
||||
if((int)$row['isactive'] == 1)
|
||||
{
|
||||
$row['isactive'] = $lng['panel']['yes'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$row['isactive'] = $lng['panel']['no'];
|
||||
}
|
||||
|
||||
$row['isactive'] = ((int)$row['isactive'] == 1) ? $lng['panel']['yes'] : $lng['panel']['no'];
|
||||
|
||||
$description = $lng['crondesc'][$row['desc_lng_key']];
|
||||
|
||||
/*
|
||||
* don't allow deletion of 'froxlor' cronjobs
|
||||
*/
|
||||
$vendor_a = explode('/', $row['module']);
|
||||
$vendor = $vendor_a[0];
|
||||
|
||||
eval("\$crons.=\"" . getTemplate("cronjobs/cronjobs_cronjob") . "\";");
|
||||
|
||||
eval("\$crons.=\"" . getTemplate('cronjobs/cronjobs_cronjob') . "\";");
|
||||
$count++;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("cronjobs/cronjobs") . "\";");
|
||||
eval("echo \"" . getTemplate('cronjobs/cronjobs') . "\";");
|
||||
|
||||
}
|
||||
elseif($action == 'new')
|
||||
{
|
||||
} elseif ($action == 'new') {
|
||||
/*
|
||||
* @TODO Finish me
|
||||
* @TODO later
|
||||
*/
|
||||
} elseif ($action == 'edit' && $id != 0) {
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `id`='" . (int)$id . "'");
|
||||
if ($result['cronfile'] != '') {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$isactive = isset($_POST['isactive']) ? 1 : 0;
|
||||
$interval_value = validate($_POST['interval_value'], 'interval_value', '/^([0-9]+)$/Di', 'stringisempty');
|
||||
$interval_interval = validate($_POST['interval_interval'], 'interval_interval');
|
||||
|
||||
if ($isactive != 1) {
|
||||
$isactive = 0;
|
||||
}
|
||||
|
||||
$interval = $interval_value . ' ' . strtoupper($interval_interval);
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "`
|
||||
SET `isactive` = '".(int)$isactive."',
|
||||
`interval` = '".$interval."'
|
||||
WHERE `id` = '" . (int)$id . "'");
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
} else {
|
||||
//$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
|
||||
// interval
|
||||
$interval_nfo = explode(' ', $result['interval']);
|
||||
$interval_value = $interval_nfo[0];
|
||||
|
||||
$interval_interval = '';
|
||||
$interval_interval .= makeoption($lng['cronmgmt']['seconds'], 'SECOND', $interval_nfo[1]);
|
||||
$interval_interval .= makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
|
||||
$interval_interval .= makeoption($lng['cronmgmt']['hours'], 'HOUR', $interval_nfo[1]);
|
||||
$interval_interval .= makeoption($lng['cronmgmt']['days'], 'DAY', $interval_nfo[1]);
|
||||
$interval_interval .= makeoption($lng['cronmgmt']['weeks'], 'WEEK', $interval_nfo[1]);
|
||||
$interval_interval .= makeoption($lng['cronmgmt']['months'], 'MONTH', $interval_nfo[1]);
|
||||
// end of interval
|
||||
|
||||
$change_cronfile = false;
|
||||
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor') {
|
||||
$change_cronfile = true;
|
||||
}
|
||||
|
||||
$cronjobs_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
|
||||
$cronjobs_edit_form = htmlform::genHTMLForm($cronjobs_edit_data);
|
||||
|
||||
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
|
||||
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate('cronjobs/cronjob_edit') . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
elseif ($action == 'delete' && $id != 0) {
|
||||
/*
|
||||
* @TODO Finish me
|
||||
*/
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
&& $id != 0)
|
||||
{
|
||||
/*
|
||||
* @TODO Finish me
|
||||
* @TODO later
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -40,44 +40,30 @@ if($page == 'customers'
|
||||
{
|
||||
if($action == '')
|
||||
{
|
||||
// clear request data
|
||||
unset($_SESSION['requestData']);
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_customers");
|
||||
$fields = array(
|
||||
'c.loginname' => $lng['login']['username'],
|
||||
'a.loginname' => $lng['admin']['admin'],
|
||||
'c.name' => $lng['customer']['name'],
|
||||
'c.email' => $lng['customer']['email'],
|
||||
'c.firstname' => $lng['customer']['firstname'],
|
||||
'c.company' => $lng['customer']['company'],
|
||||
'c.diskspace' => $lng['customer']['diskspace'],
|
||||
'c.diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.traffic' => $lng['customer']['traffic'],
|
||||
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.mysqls' => $lng['customer']['mysqls'],
|
||||
'c.mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.ftps' => $lng['customer']['ftps'],
|
||||
'c.ftps_used' => $lng['customer']['ftps'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.subdomains' => $lng['customer']['subdomains'],
|
||||
'c.subdomains_used' => $lng['customer']['subdomains'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.emails' => $lng['customer']['emails'],
|
||||
'c.emails_used' => $lng['customer']['emails'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.email_accounts' => $lng['customer']['accounts'],
|
||||
'c.email_accounts_used' => $lng['customer']['accounts'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.email_forwarders' => $lng['customer']['forwarders'],
|
||||
'c.email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.email_quota' => $lng['customer']['email_quota'],
|
||||
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.deactivated' => $lng['admin']['deactivated'],
|
||||
'c.phpenabled' => $lng['admin']['phpenabled']
|
||||
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')'
|
||||
);
|
||||
|
||||
if($settings['ticket']['enabled'] == 1)
|
||||
{
|
||||
$fields['c.tickets'] = $lng['customer']['tickets'];
|
||||
$fields['c.tickets_used'] = $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')';
|
||||
if ($settings['system']['backup_enabled'] == '1') {
|
||||
$field['c.backup_allowed'] = $lng['backup_allowed'];
|
||||
}
|
||||
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_CUSTOMERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$customers = '';
|
||||
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query("SELECT `c`.*, `a`.`loginname` AS `adminname` " . "FROM `" . TABLE_PANEL_CUSTOMERS . "` `c`, `" . TABLE_PANEL_ADMINS . "` `a` " . "WHERE " . ($userinfo['customers_see_all'] ? '' : " `c`.`adminid` = '" . (int)$userinfo['adminid'] . "' AND ") . "`c`.`adminid`=`a`.`adminid` " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy($settings['panel']['natsorting']) . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng, true);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -96,7 +82,36 @@ if($page == 'customers'
|
||||
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
|
||||
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
|
||||
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains');
|
||||
$last_login = ((int)$row['lastlogin_succ'] == 0) ? $lng['panel']['neverloggedin'] : date('d.m.Y', $row['lastlogin_succ']);
|
||||
|
||||
/**
|
||||
* percent-values for progressbar
|
||||
*/
|
||||
//For Disk usage
|
||||
if ($row['diskspace'] > 0) {
|
||||
$disk_percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
|
||||
$disk_doublepercent = round($disk_percent*2, 2);
|
||||
} else {
|
||||
$disk_percent = 0;
|
||||
$disk_doublepercent = 0;
|
||||
}
|
||||
|
||||
if ($row['traffic'] > 0) {
|
||||
$traffic_percent = round(($row['traffic_used']*100)/$row['traffic'], 2);
|
||||
$traffic_doublepercent = round($traffic_percent*2, 2);
|
||||
} else {
|
||||
$traffic_percent = 0;
|
||||
$traffic_doublepercent = 0;
|
||||
}
|
||||
|
||||
$islocked = 0;
|
||||
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
|
||||
&& $row['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
|
||||
) {
|
||||
$islocked = 1;
|
||||
}
|
||||
|
||||
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains email_autoresponder');
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$customers.=\"" . getTemplate("customers/customers_customer") . "\";");
|
||||
$count++;
|
||||
@@ -105,6 +120,7 @@ if($page == 'customers'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$customercount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("customers/customers") . "\";");
|
||||
}
|
||||
elseif($action == 'su'
|
||||
@@ -115,17 +131,45 @@ if($page == 'customers'
|
||||
|
||||
if($destination_user != '')
|
||||
{
|
||||
if ($result['deactivated'] == '1') {
|
||||
standard_error("usercurrentlydeactivated", $destination_user);
|
||||
}
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$userinfo['userid'] . "' AND `hash`='" . $db->escape($s) . "'");
|
||||
$s = md5(uniqid(microtime(), 1));
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$id . "', '" . $db->escape($result['ipaddress']) . "', '" . $db->escape($result['useragent']) . "', '" . time() . "', '" . $db->escape($result['language']) . "', '0')");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "switched user and is now '" . $destination_user . "'");
|
||||
redirectTo('customer_index.php', Array('s' => $s));
|
||||
redirectTo('customer_index.php', Array('s' => $s), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
redirectTo('index.php', Array('action' => 'login'));
|
||||
}
|
||||
}
|
||||
elseif($action == 'unlock'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$id . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . $db->escape($userinfo['adminid']) . "' "));
|
||||
|
||||
if($result['loginname'] != '')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$result = $db->query("UPDATE
|
||||
`" . TABLE_PANEL_CUSTOMERS . "`
|
||||
SET
|
||||
`loginfail_count` = '0'
|
||||
WHERE
|
||||
`customerid`= '" . (int)$id . "'"
|
||||
);
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno('customer_reallyunlock', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['loginname']);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
&& $id != 0)
|
||||
{
|
||||
@@ -138,7 +182,6 @@ if($page == 'customers'
|
||||
{
|
||||
$databases = $db->query("SELECT * FROM " . TABLE_PANEL_DATABASES . " WHERE customerid='" . (int)$id . "' ORDER BY `dbserver`");
|
||||
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
|
||||
unset($db_root->password);
|
||||
$last_dbserver = 0;
|
||||
|
||||
while($row_database = $db->fetch_array($databases))
|
||||
@@ -148,16 +191,20 @@ if($page == 'customers'
|
||||
$db_root->query('FLUSH PRIVILEGES;');
|
||||
$db_root->close();
|
||||
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
|
||||
unset($db_root->password);
|
||||
$last_dbserver = $row_database['dbserver'];
|
||||
}
|
||||
|
||||
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||
if(mysql_get_server_info() < '5.0.2') {
|
||||
// failsafe if user has been deleted manually (requires MySQL 4.1.2+)
|
||||
$db_root->query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM \'' . $db_root->escape($row_database['databasename']) .'\'',false,true);
|
||||
}
|
||||
|
||||
$host_res = $db_root->query("SELECT `Host` FROM `mysql`.`user` WHERE `User`='" . $db_root->escape($row_database['databasename']) . "'");
|
||||
while($host = $db_root->fetch_array($host_res))
|
||||
{
|
||||
$mysql_access_host = trim($mysql_access_host);
|
||||
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
||||
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
||||
$db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($row_database['databasename']) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"');
|
||||
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
|
||||
$db_root->query('DROP USER \'' . $db_root->escape($row_database['databasename']). '\'@\'' . $db_root->escape($host['Host']) . '\'', false, true);
|
||||
|
||||
}
|
||||
|
||||
$db_root->query('DROP DATABASE IF EXISTS `' . $db_root->escape($row_database['databasename']) . '`');
|
||||
@@ -170,13 +217,39 @@ if($page == 'customers'
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$domains_deleted = $db->affected_rows();
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$id . "' AND `adminsession` = '0'");
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$result2 = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name`='" . $row['username'] . "'");
|
||||
}
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_GROUPS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
|
||||
// Delete all waiting "create user" -tasks for this user, #276
|
||||
// Note: the WHERE selects part of a serialized array, but it should be safe this way
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '2' AND `data` LIKE '%:\"" . $db->escape($result['loginname']) . "\";%';");
|
||||
|
||||
// remove everything APS-related, #216
|
||||
$apsresult = $db->query("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
||||
while($apsrow = $db->fetch_array($apsresult))
|
||||
{
|
||||
// remove all package related settings
|
||||
$db->query("DELETE FROM `".TABLE_APS_SETTINGS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
||||
// maybe some leftovers in the tasks
|
||||
$db->query("DELETE FROM `".TABLE_APS_TASKS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
||||
}
|
||||
// now remove all user instances
|
||||
$db->query("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
||||
// eventually some temp-setting-leftovers
|
||||
$db->query("DELETE FROM `".TABLE_APS_TEMP_SETTINGS."` WHERE `CustomerID`='".(int)$id."'");
|
||||
// eof APS-related removings, #216
|
||||
|
||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` - 1 ";
|
||||
$admin_update_query.= ", `domains_used` = `domains_used` - 0" . (int)($domains_deleted - $result['subdomains_used']);
|
||||
|
||||
@@ -205,6 +278,11 @@ if($page == 'customers'
|
||||
$admin_update_query.= ", `email_quota_used` = `email_quota_used` - 0" . (int)$result['email_quota'];
|
||||
}
|
||||
|
||||
if($result['email_autoresponder'] != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` - 0" . (int)$result['email_autoresponder'];
|
||||
}
|
||||
|
||||
if($result['subdomains'] != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `subdomains_used` = `subdomains_used` - 0" . (int)$result['subdomains'];
|
||||
@@ -220,6 +298,11 @@ if($page == 'customers'
|
||||
$admin_update_query.= ", `tickets_used` = `tickets_used` - 0" . (int)$result['tickets'];
|
||||
}
|
||||
|
||||
if($result['aps_packages'] != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `aps_packages_used` = `aps_packages_used` - 0" . (int)$result['aps_packages'];
|
||||
}
|
||||
|
||||
if(($result['diskspace'] / 1024) != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `diskspace_used` = `diskspace_used` - 0" . (int)$result['diskspace'];
|
||||
@@ -229,14 +312,19 @@ if($page == 'customers'
|
||||
$db->query($admin_update_query);
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "deleted user '" . $result['loginname'] . "'");
|
||||
inserttask('1');
|
||||
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
|
||||
if(isset($_POST['delete_userfiles'])
|
||||
&& (int)$_POST['delete_userfiles'] == 1)
|
||||
{
|
||||
|
||||
if (isset($_POST['delete_userfiles'])
|
||||
&& (int)$_POST['delete_userfiles'] == 1
|
||||
) {
|
||||
inserttask('6', $result['loginname']);
|
||||
}
|
||||
|
||||
|
||||
// Using filesystem - quota, insert a task which cleans the filesystem - quota
|
||||
inserttask('10');
|
||||
|
||||
/*
|
||||
* move old tickets to archive
|
||||
*/
|
||||
@@ -254,8 +342,8 @@ if($page == 'customers'
|
||||
$mainticket->Archive();
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "archived ticket '" . $mainticket->Get('subject') . "'");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
@@ -284,6 +372,7 @@ if($page == 'customers'
|
||||
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
$gender = intval_ressource($_POST['gender']);
|
||||
|
||||
if(isset($_POST['diskspace_ul']))
|
||||
{
|
||||
@@ -339,9 +428,31 @@ if($page == 'customers'
|
||||
$email_quota = - 1;
|
||||
}
|
||||
|
||||
$email_imap = intval_ressource($_POST['email_imap']);
|
||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
if($settings['autoresponder']['autoresponder_active'] == '1')
|
||||
{
|
||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
||||
|
||||
if(isset($_POST['email_autoresponder_ul']))
|
||||
{
|
||||
$email_autoresponder = - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$email_autoresponder = 0;
|
||||
}
|
||||
|
||||
$email_imap = 0;
|
||||
if(isset($_POST['email_imap']))
|
||||
$email_imap = intval_ressource($_POST['email_imap']);
|
||||
|
||||
$email_pop3 = 0;
|
||||
if(isset($_POST['email_pop3']))
|
||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||
|
||||
$ftps = 0;
|
||||
if(isset($_POST['ftps']))
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
|
||||
if(isset($_POST['ftps_ul']))
|
||||
{
|
||||
@@ -377,10 +488,47 @@ if($page == 'customers'
|
||||
$number_of_aps_packages = 0;
|
||||
}
|
||||
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$password = validate($_POST['customer_password'], 'password');
|
||||
$sendpassword = intval($_POST['sendpassword']);
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
$createstdsubdomain = 0;
|
||||
if(isset($_POST['createstdsubdomain']))
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$password = validate($_POST['new_customer_password'], 'password');
|
||||
// only check if not empty,
|
||||
// cause empty == generate password automatically
|
||||
if($password != '')
|
||||
{
|
||||
$password = validatePassword($password);
|
||||
}
|
||||
|
||||
$backup_allowed = 0;
|
||||
if(isset($_POST['backup_allowed']))
|
||||
$backup_allowed = intval($_POST['backup_allowed']);
|
||||
|
||||
if ($backup_allowed != 0)
|
||||
{
|
||||
$backup_allowed = 1;
|
||||
}
|
||||
|
||||
// gender out of range? [0,2]
|
||||
if ($gender < 0 || $gender > 2) {
|
||||
$gender = 0;
|
||||
}
|
||||
|
||||
$sendpassword = 0;
|
||||
if(isset($_POST['sendpassword']))
|
||||
$sendpassword = intval($_POST['sendpassword']);
|
||||
|
||||
$phpenabled = 0;
|
||||
if(isset($_POST['phpenabled']))
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
|
||||
$perlenabled = 0;
|
||||
if(isset($_POST['perlenabled']))
|
||||
$perlenabled = intval($_POST['perlenabled']);
|
||||
|
||||
$store_defaultindex = 0;
|
||||
if(isset($_POST['store_defaultindex']))
|
||||
$store_defaultindex = intval($_POST['store_defaultindex']);
|
||||
|
||||
$diskspace = $diskspace * 1024;
|
||||
$traffic = $traffic * 1024 * 1024;
|
||||
|
||||
@@ -390,6 +538,7 @@ if($page == 'customers'
|
||||
|| ((($userinfo['email_accounts_used'] + $email_accounts) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|
||||
|| ((($userinfo['email_forwarders_used'] + $email_forwarders) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|
||||
|| ((($userinfo['email_quota_used'] + $email_quota) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||
|| ((($userinfo['email_autoresponder_used'] + $email_autoresponder) > $userinfo['email_autoresponder']) && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
||||
|| ((($userinfo['ftps_used'] + $ftps) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|
||||
|| ((($userinfo['tickets_used'] + $tickets) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|
||||
|| ((($userinfo['subdomains_used'] + $subdomains) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
|
||||
@@ -400,6 +549,7 @@ if($page == 'customers'
|
||||
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|
||||
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|
||||
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||
|| ($email_autoresponder == '-1' && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
||||
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|
||||
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|
||||
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
|
||||
@@ -431,11 +581,11 @@ if($page == 'customers'
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($_POST['loginname'])
|
||||
&& $_POST['loginname'] != '')
|
||||
if(isset($_POST['new_loginname'])
|
||||
&& $_POST['new_loginname'] != '')
|
||||
{
|
||||
$accountnumber = intval($settings['system']['lastaccountnumber']);
|
||||
$loginname = validate($_POST['loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
||||
$loginname = validate($_POST['new_loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
||||
|
||||
// Accounts which match systemaccounts are not allowed, filtering them
|
||||
|
||||
@@ -443,6 +593,11 @@ if($page == 'customers'
|
||||
{
|
||||
standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']);
|
||||
}
|
||||
|
||||
//Additional filtering for Bug #962
|
||||
if(function_exists('posix_getpwnam') && !in_array("posix_getpwnam",explode(",",ini_get('disable_functions'))) && posix_getpwnam($loginname)) {
|
||||
standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -483,12 +638,57 @@ if($page == 'customers'
|
||||
$phpenabled = '1';
|
||||
}
|
||||
|
||||
if($perlenabled != '0')
|
||||
{
|
||||
$perlenabled = '1';
|
||||
}
|
||||
|
||||
if($password == '')
|
||||
{
|
||||
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
||||
}
|
||||
|
||||
$result = $db->query("INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` (`adminid`, `loginname`, `password`, `name`, `firstname`, `company`, `street`, `zipcode`, `city`, `phone`, `fax`, `email`, `customernumber`, `def_language`, `documentroot`, `guid`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `standardsubdomain`, `phpenabled`, `imap`, `pop3`, `aps_packages`) VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($firstname) . "', '" . $db->escape($company) . "', '" . $db->escape($street) . "', '" . $db->escape($zipcode) . "', '" . $db->escape($city) . "', '" . $db->escape($phone) . "', '" . $db->escape($fax) . "', '" . $db->escape($email) . "', '" . $db->escape($customernumber) . "','" . $db->escape($def_language) . "', '" . $db->escape($documentroot) . "', '" . $db->escape($guid) . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '0', '" . $db->escape($phpenabled) . "', '" . $db->escape($email_imap) . "', '" . $db->escape($email_pop3) . "', '" . (int)$number_of_aps_packages . "')");
|
||||
$_theme = $settings['panel']['default_theme'];
|
||||
|
||||
$result = $db->query(
|
||||
"INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` SET
|
||||
`adminid` = '" . (int)$userinfo['adminid'] . "',
|
||||
`loginname` = '" . $db->escape($loginname) . "',
|
||||
`password` = '" . md5($password) . "',
|
||||
`name` = '" . $db->escape($name) . "',
|
||||
`firstname` = '" . $db->escape($firstname) . "',
|
||||
`gender` = '" . (int)$gender . "',
|
||||
`company` = '" . $db->escape($company) . "',
|
||||
`street` = '" . $db->escape($street) . "',
|
||||
`zipcode` = '" . $db->escape($zipcode) . "',
|
||||
`city` = '" . $db->escape($city) . "',
|
||||
`phone` = '" . $db->escape($phone) . "',
|
||||
`fax` = '" . $db->escape($fax) . "',
|
||||
`email` = '" . $db->escape($email) . "',
|
||||
`customernumber` = '" . $db->escape($customernumber) . "',
|
||||
`def_language` = '" . $db->escape($def_language) . "',
|
||||
`documentroot` = '" . $db->escape($documentroot) . "',
|
||||
`guid` = '" . $db->escape($guid) . "',
|
||||
`diskspace` = '" . $db->escape($diskspace) . "',
|
||||
`traffic` = '" . $db->escape($traffic) . "',
|
||||
`subdomains` = '" . $db->escape($subdomains) . "',
|
||||
`emails` = '" . $db->escape($emails) . "',
|
||||
`email_accounts` = '" . $db->escape($email_accounts) . "',
|
||||
`email_forwarders` = '" . $db->escape($email_forwarders) . "',
|
||||
`email_quota` = '" . $db->escape($email_quota) . "',
|
||||
`ftps` = '" . $db->escape($ftps) . "',
|
||||
`tickets` = '" . $db->escape($tickets) . "',
|
||||
`mysqls` = '" . $db->escape($mysqls) . "',
|
||||
`standardsubdomain` = '0',
|
||||
`phpenabled` = '" . $db->escape($phpenabled) . "',
|
||||
`imap` = '" . $db->escape($email_imap) . "',
|
||||
`pop3` = '" . $db->escape($email_pop3) . "',
|
||||
`aps_packages` = '" . (int)$number_of_aps_packages . "',
|
||||
`perlenabled` = '" . $db->escape($perlenabled) . "',
|
||||
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
|
||||
`backup_allowed` = '" . $db->escape($backup_allowed) . "',
|
||||
`theme` = '" . $db->escape($_theme) . "'"
|
||||
);
|
||||
$customerid = $db->insert_id();
|
||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` + 1";
|
||||
|
||||
@@ -517,6 +717,12 @@ if($page == 'customers'
|
||||
$admin_update_query.= ", `email_quota_used` = `email_quota_used` + 0" . (int)$email_quota;
|
||||
}
|
||||
|
||||
if($email_autoresponder != '-1'
|
||||
&& $settings['autoresponder']['autoresponder_active'] == 1)
|
||||
{
|
||||
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` + 0" . (int)$email_autoresponder;
|
||||
}
|
||||
|
||||
if($subdomains != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `subdomains_used` = `subdomains_used` + 0" . (int)$subdomains;
|
||||
@@ -553,10 +759,12 @@ if($page == 'customers'
|
||||
}
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "added user '" . $loginname . "'");
|
||||
inserttask('2', $loginname, $guid, $guid);
|
||||
inserttask('2', $loginname, $guid, $guid, $store_defaultindex);
|
||||
|
||||
// Using filesystem - quota, insert a task which cleans the filesystem - quota
|
||||
inserttask('10');
|
||||
|
||||
// Add htpasswd for the webalizer stats
|
||||
|
||||
if(CRYPT_STD_DES == 1)
|
||||
{
|
||||
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
|
||||
@@ -567,37 +775,56 @@ if($page == 'customers'
|
||||
$htpasswdPassword = crypt($password);
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
|
||||
|
||||
if($settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/awstats/')) . "')");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added awstats htpasswd for user '" . $loginname . "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
|
||||
}
|
||||
|
||||
inserttask('1');
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
|
||||
$cryptPassword = makeCryptPassword($password);
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($cryptPassword) . "', '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_GROUPS . "` " . "(`customerid`, `groupname`, `gid`, `members`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($guid) . "', '" . $db->escape($loginname) . "')");
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($loginname) . "', 'user', '0', '0', '0', '0', '0', '0')");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added ftp-account for user '" . $loginname . "'");
|
||||
|
||||
if($createstdsubdomain == '1')
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
|
||||
"`domain` = '". $db->escape($loginname . '.' . $settings['system']['hostname']) . "', " .
|
||||
if (isset($settings['system']['stdsubdomain'])
|
||||
&& $settings['system']['stdsubdomain'] != ''
|
||||
) {
|
||||
$_stdsubdomain = $loginname . '.' . $settings['system']['stdsubdomain'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$_stdsubdomain = $loginname . '.' . $settings['system']['hostname'];
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
|
||||
"`domain` = '". $db->escape($_stdsubdomain) . "', " .
|
||||
"`customerid` = '" . (int)$customerid . "', " .
|
||||
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
|
||||
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
|
||||
"`parentdomainid` = '-1', " .
|
||||
"`ipandport` = '" . $db->escape($settings['system']['defaultip']) . "', " .
|
||||
"`documentroot` = '" . $db->escape($documentroot) . "', " .
|
||||
"`documentroot` = '" . $db->escape($documentroot) . "', " .
|
||||
"`zonefile` = '', " .
|
||||
"`isemaildomain` = '0', " .
|
||||
"`caneditdomain` = '0', " .
|
||||
"`caneditdomain` = '0', " .
|
||||
"`openbasedir` = '1', " .
|
||||
"`safemode` = '1', " .
|
||||
"`speciallogfile` = '0', " .
|
||||
"`specialsettings` = ''");
|
||||
"`specialsettings` = '', " .
|
||||
"`add_date` = '".date('Y-m-d')."'");
|
||||
$domainid = $db->insert_id();
|
||||
// set ip <-> domain connection
|
||||
$db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET
|
||||
`id_domain` = '".$domainid."',
|
||||
`id_ipandports` = '".(int)$settings['system']['defaultip']."'"
|
||||
);
|
||||
|
||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$customerid . '\'');
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $loginname . "'");
|
||||
inserttask('1');
|
||||
@@ -608,7 +835,6 @@ if($page == 'customers'
|
||||
$replace_arr = array(
|
||||
'FIRSTNAME' => $firstname,
|
||||
'NAME' => $name,
|
||||
'TITLE' => $title,
|
||||
'COMPANY' => $company,
|
||||
'SALUTATION' => getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)),
|
||||
'USERNAME' => $loginname,
|
||||
@@ -655,7 +881,7 @@ if($page == 'customers'
|
||||
|
||||
while(list($language_file, $language_name) = each($languages))
|
||||
{
|
||||
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
|
||||
$language_options.= makeoption($language_name, $language_file, $settings['panel']['standardlanguage'], true);
|
||||
}
|
||||
|
||||
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
@@ -665,15 +891,22 @@ if($page == 'customers'
|
||||
$email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', '1');
|
||||
$email_imap = makeyesno('email_imap', '1', '0', '1');
|
||||
$email_pop3 = makeyesno('email_pop3', '1', '0', '1');
|
||||
$sendpassword = makeyesno('sendpassword', '1', '0', '1');
|
||||
$phpenabled = makeyesno('phpenabled', '1', '0', '1');
|
||||
|
||||
$gender_options = makeoption($lng['gender']['undef'], 0, true, true, true);
|
||||
$gender_options .= makeoption($lng['gender']['male'], 1, null, true, true);
|
||||
$gender_options .= makeoption($lng['gender']['female'], 2, null, true, true);
|
||||
|
||||
$customer_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_add.php';
|
||||
$customer_add_form = htmlform::genHTMLForm($customer_add_data);
|
||||
|
||||
$title = $customer_add_data['customer_add']['title'];
|
||||
$image = $customer_add_data['customer_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("customers/customers_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -699,8 +932,9 @@ if($page == 'customers'
|
||||
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
||||
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$password = validate($_POST['customer_password'], 'new password');
|
||||
$password = validate($_POST['new_customer_password'], 'new password');
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
$gender = intval_ressource($_POST['gender']);
|
||||
|
||||
if(isset($_POST['diskspace_ul']))
|
||||
{
|
||||
@@ -756,9 +990,31 @@ if($page == 'customers'
|
||||
$email_quota = - 1;
|
||||
}
|
||||
|
||||
$email_imap = intval_ressource($_POST['email_imap']);
|
||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
if($settings['autoresponder']['autoresponder_active'] == '1')
|
||||
{
|
||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
||||
|
||||
if(isset($_POST['email_autoresponder_ul']))
|
||||
{
|
||||
$email_autoresponder = - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$email_autoresponder = 0;
|
||||
}
|
||||
|
||||
$email_imap = 0;
|
||||
if(isset($_POST['email_imap']))
|
||||
$email_imap = intval_ressource($_POST['email_imap']);
|
||||
|
||||
$email_pop3 = 0;
|
||||
if(isset($_POST['email_pop3']))
|
||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||
|
||||
$ftps = 0;
|
||||
if(isset($_POST['ftps']))
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
|
||||
if(isset($_POST['ftps_ul']))
|
||||
{
|
||||
@@ -773,7 +1029,22 @@ if($page == 'customers'
|
||||
$tickets = - 1;
|
||||
}
|
||||
|
||||
$mysqls = intval_ressource($_POST['mysqls']);
|
||||
$backup_allowed = 0;
|
||||
if (isset($_POST['backup_allowed']))
|
||||
$backup_allowed = intval($_POST['backup_allowed']);
|
||||
|
||||
if($backup_allowed != '0'){
|
||||
$backup_allowed = 1;
|
||||
}
|
||||
|
||||
// gender out of range? [0,2]
|
||||
if ($gender < 0 || $gender > 2) {
|
||||
$gender = 0;
|
||||
}
|
||||
|
||||
$mysqls = 0;
|
||||
if(isset($_POST['mysqls']))
|
||||
$mysqls = intval_ressource($_POST['mysqls']);
|
||||
|
||||
if(isset($_POST['mysqls_ul']))
|
||||
{
|
||||
@@ -781,7 +1052,7 @@ if($page == 'customers'
|
||||
}
|
||||
|
||||
if($settings['aps']['aps_active'] == '1')
|
||||
{
|
||||
{
|
||||
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
|
||||
|
||||
if(isset($_POST['number_of_aps_packages_ul']))
|
||||
@@ -794,9 +1065,21 @@ if($page == 'customers'
|
||||
$number_of_aps_packages = 0;
|
||||
}
|
||||
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$deactivated = intval($_POST['deactivated']);
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
$createstdsubdomain = 0;
|
||||
if(isset($_POST['createstdsubdomain']))
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
|
||||
$deactivated = 0;
|
||||
if(isset($_POST['deactivated']))
|
||||
$deactivated = intval($_POST['deactivated']);
|
||||
|
||||
$phpenabled = 0;
|
||||
if(isset($_POST['phpenabled']))
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
|
||||
$perlenabled = 0;
|
||||
if(isset($_POST['perlenabled']))
|
||||
$perlenabled = intval($_POST['perlenabled']);
|
||||
$diskspace = $diskspace * 1024;
|
||||
$traffic = $traffic * 1024 * 1024;
|
||||
|
||||
@@ -806,6 +1089,7 @@ if($page == 'customers'
|
||||
|| ((($userinfo['email_accounts_used'] + $email_accounts - $result['email_accounts']) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|
||||
|| ((($userinfo['email_forwarders_used'] + $email_forwarders - $result['email_forwarders']) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|
||||
|| ((($userinfo['email_quota_used'] + $email_quota - $result['email_quota']) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||
|| ((($userinfo['email_autoresponder_used'] + $email_autoresponder - $result['email_autoresponder']) > $userinfo['email_autoresponder']) && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
||||
|| ((($userinfo['ftps_used'] + $ftps - $result['ftps']) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|
||||
|| ((($userinfo['tickets_used'] + $tickets - $result['tickets']) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|
||||
|| ((($userinfo['subdomains_used'] + $subdomains - $result['subdomains']) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
|
||||
@@ -816,6 +1100,7 @@ if($page == 'customers'
|
||||
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|
||||
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|
||||
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||
|| ($email_autoresponder == '-1' && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
||||
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|
||||
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|
||||
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
|
||||
@@ -849,6 +1134,7 @@ if($page == 'customers'
|
||||
{
|
||||
if($password != '')
|
||||
{
|
||||
$password = validatePassword($password);
|
||||
$password = md5($password);
|
||||
}
|
||||
else
|
||||
@@ -864,9 +1150,40 @@ if($page == 'customers'
|
||||
if($createstdsubdomain == '1'
|
||||
&& $result['standardsubdomain'] == '0')
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($result['loginname'] . '.' . $settings['system']['hostname']) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '')");
|
||||
if (isset($settings['system']['stdsubdomain'])
|
||||
&& $settings['system']['stdsubdomain'] != ''
|
||||
) {
|
||||
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['stdsubdomain'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET
|
||||
`domain` = '" . $db->escape($_stdsubdomain) . "',
|
||||
`customerid` = '" . (int)$result['customerid'] . "',
|
||||
`adminid` = '" . (int)$userinfo['adminid'] . "',
|
||||
`parentdomainid` = '-1',
|
||||
`documentroot` = '" . $db->escape($result['documentroot']) . "',
|
||||
`zonefile` = '',
|
||||
`isemaildomain` = '0',
|
||||
`caneditdomain` = '0',
|
||||
`openbasedir` = '1',
|
||||
`speciallogfile` = '0',
|
||||
`specialsettings` = '',
|
||||
`add_date` = '".date('Y-m-d')."'"
|
||||
);
|
||||
$domainid = $db->insert_id();
|
||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
|
||||
// set ip <-> domain connection
|
||||
$db->query("INSERT INTO `".TABLE_DOMAINTOIP."` SET
|
||||
`id_domain` = '".$domainid."',
|
||||
`id_ipandports` = '".(int)$settings['system']['defaultip']."'"
|
||||
);
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
|
||||
`standardsubdomain`='" . (int)$domainid . "'
|
||||
WHERE `customerid`='" . (int)$result['customerid'] . "'"
|
||||
);
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added standardsubdomain for user '" . $result['loginname'] . "'");
|
||||
inserttask('1');
|
||||
}
|
||||
@@ -874,8 +1191,12 @@ if($page == 'customers'
|
||||
if($createstdsubdomain == '0'
|
||||
&& $result['standardsubdomain'] != '0')
|
||||
{
|
||||
$db->query('DELETE FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `id`=\'' . (int)$result['standardsubdomain'] . '\'');
|
||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'0\' WHERE `customerid`=\'' . (int)$result['customerid'] . '\'');
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "`
|
||||
WHERE `id`='" . (int)$result['standardsubdomain'] . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_DOMAINTOIP . "`
|
||||
WHERE `id_domain`='" . (int)$result['standardsubdomain'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
|
||||
`standardsubdomain`= '0' WHERE `customerid`= '" . (int)$result['customerid'] . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically deleted standardsubdomain for user '" . $result['loginname'] . "'");
|
||||
inserttask('1');
|
||||
}
|
||||
@@ -890,16 +1211,61 @@ if($page == 'customers'
|
||||
$phpenabled = '1';
|
||||
}
|
||||
|
||||
if($phpenabled != $result['phpenabled'])
|
||||
if($perlenabled != '0')
|
||||
{
|
||||
$perlenabled = '1';
|
||||
}
|
||||
|
||||
if($phpenabled != $result['phpenabled']
|
||||
|| $perlenabled != $result['perlenabled'])
|
||||
{
|
||||
inserttask('1');
|
||||
}
|
||||
|
||||
if($deactivated != $result['deactivated'])
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `postfix`='" . (($deactivated) ? 'N' : 'Y') . "', `pop3`='" . (($deactivated) ? '0' : '1') . "', `imap`='" . (($deactivated) ? '0' : '1') . "' WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `postfix`='" . (($deactivated) ? 'N' : 'Y') . "', `pop3`='" . (($deactivated) ? '0' : (int)$result['pop3']) . "', `imap`='" . (($deactivated) ? '0' : (int)$result['imap']) . "' WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `login_enabled`='" . (($deactivated) ? 'N' : 'Y') . "' WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `deactivated`='" . (int)$deactivated . "' WHERE `customerid`='" . (int)$id . "'");
|
||||
|
||||
/* Retrieve customer's databases */
|
||||
$databases = $db->query("SELECT * FROM " . TABLE_PANEL_DATABASES . " WHERE customerid='" . (int)$id . "' ORDER BY `dbserver`");
|
||||
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
|
||||
$last_dbserver = 0;
|
||||
|
||||
/* For each of them */
|
||||
while($row_database = $db->fetch_array($databases))
|
||||
{
|
||||
if($last_dbserver != $row_database['dbserver'])
|
||||
{
|
||||
$db_root->query('FLUSH PRIVILEGES;');
|
||||
$db_root->close();
|
||||
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
|
||||
$last_dbserver = $row_database['dbserver'];
|
||||
}
|
||||
|
||||
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||
{
|
||||
$mysql_access_host = trim($mysql_access_host);
|
||||
|
||||
/* Prevent access, if deactivated */
|
||||
if($deactivated)
|
||||
{
|
||||
// failsafe if user has been deleted manually (requires MySQL 4.1.2+)
|
||||
$db_root->query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM \'' . $db_root->escape($row_database['databasename']) .'\'',false,true);
|
||||
}
|
||||
else /* Otherwise grant access */
|
||||
{
|
||||
$db_root->query('GRANT ALL PRIVILEGES ON `' . $db_root->escape($row_database['databasename']) .'`.* TO `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
||||
$db_root->query('GRANT ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($row_database['databasename'])) . '` . * TO `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* At last flush the new privileges */
|
||||
$db_root->query('FLUSH PRIVILEGES;');
|
||||
$db_root->close();
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "deactivated user '" . $result['loginname'] . "'");
|
||||
inserttask('1');
|
||||
}
|
||||
@@ -918,9 +1284,13 @@ if($page == 'customers'
|
||||
$db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `imap`='" . (int)$email_imap . "' WHERE `customerid`='" . (int)$id . "'");
|
||||
}
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "' WHERE `customerid`='" . (int)$id . "'");
|
||||
// $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "' WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `name`='" . $db->escape($name) . "', `firstname`='" . $db->escape($firstname) . "', `gender`='" . $db->escape($gender) . "', `company`='" . $db->escape($company) . "', `street`='" . $db->escape($street) . "', `zipcode`='" . $db->escape($zipcode) . "', `city`='" . $db->escape($city) . "', `phone`='" . $db->escape($phone) . "', `fax`='" . $db->escape($fax) . "', `email`='" . $db->escape($email) . "', `customernumber`='" . $db->escape($customernumber) . "', `def_language`='" . $db->escape($def_language) . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `deactivated`='" . $db->escape($deactivated) . "', `phpenabled`='" . $db->escape($phpenabled) . "', `email_quota`='" . $db->escape($email_quota) . "', `imap`='" . $db->escape($email_imap) . "', `pop3`='" . $db->escape($email_pop3) . "', `aps_packages`='" . (int)$number_of_aps_packages . "', `perlenabled`='" . $db->escape($perlenabled) . "', `email_autoresponder`='" . $db->escape($email_autoresponder) . "', `backup_allowed`='" . $db->escape($backup_allowed) . "' WHERE `customerid`='" . (int)$id . "'");
|
||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` ";
|
||||
|
||||
// Using filesystem - quota, insert a task which cleans the filesystem - quota
|
||||
inserttask('10');
|
||||
|
||||
if($mysqls != '-1'
|
||||
|| $result['mysqls'] != '-1')
|
||||
{
|
||||
@@ -1001,6 +1371,22 @@ if($page == 'customers'
|
||||
}
|
||||
}
|
||||
|
||||
if($email_autoresponder != '-1'
|
||||
|| $result['email_autoresponder'] != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` ";
|
||||
|
||||
if($email_autoresponder != '-1')
|
||||
{
|
||||
$admin_update_query.= " + 0" . (int)$email_autoresponder . " ";
|
||||
}
|
||||
|
||||
if($result['email_autoresponder'] != '-1')
|
||||
{
|
||||
$admin_update_query.= " - 0" . (int)$result['email_autoresponder'] . " ";
|
||||
}
|
||||
}
|
||||
|
||||
if($subdomains != '-1'
|
||||
|| $result['subdomains'] != '-1')
|
||||
{
|
||||
@@ -1153,6 +1539,13 @@ if($page == 'customers'
|
||||
$result['email_quota'] = '';
|
||||
}
|
||||
|
||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, $result['email_autoresponder'], true, true);
|
||||
|
||||
if($result['email_autoresponder'] == '-1')
|
||||
{
|
||||
$result['email_autoresponder'] = '';
|
||||
}
|
||||
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
||||
|
||||
if($result['ftps'] == '-1')
|
||||
@@ -1181,13 +1574,18 @@ if($page == 'customers'
|
||||
$result['aps_packages'] = '';
|
||||
}
|
||||
|
||||
$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', (($result['standardsubdomain'] != '0') ? '1' : '0'));
|
||||
$phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']);
|
||||
$deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']);
|
||||
$email_imap = makeyesno('email_imap', '1', '0', $result['imap']);
|
||||
$email_pop3 = makeyesno('email_pop3', '1', '0', $result['pop3']);
|
||||
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$gender_options = makeoption($lng['gender']['undef'], 0, ($result['gender'] == '0' ? true : false), true, true);
|
||||
$gender_options .= makeoption($lng['gender']['male'], 1, ($result['gender'] == '1' ? true : false), true, true);
|
||||
$gender_options .= makeoption($lng['gender']['female'], 2, ($result['gender'] == '2' ? true : false), true, true);
|
||||
|
||||
$customer_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/customer/formfield.customer_edit.php';
|
||||
$customer_edit_form = htmlform::genHTMLForm($customer_edit_data);
|
||||
|
||||
$title = $customer_edit_data['customer_edit']['title'];
|
||||
$image = $customer_edit_data['customer_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("customers/customers_edit") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -61,6 +61,7 @@ if($page == 'overview')
|
||||
SUM(`email_accounts_used`) AS `email_accounts_used`,
|
||||
SUM(`email_forwarders_used`) AS `email_forwarders_used`,
|
||||
SUM(`email_quota_used`) AS `email_quota_used`,
|
||||
SUM(`email_autoresponder_used`) AS `email_autoresponder_used`,
|
||||
SUM(`ftps_used`) AS `ftps_used`,
|
||||
SUM(`tickets_used`) AS `tickets_used`,
|
||||
SUM(`subdomains_used`) AS `subdomains_used`,
|
||||
@@ -100,14 +101,16 @@ if($page == 'overview')
|
||||
&& count($latestversion) >= 1)
|
||||
{
|
||||
$_version = $latestversion[0];
|
||||
$_message = $latestversion[1];
|
||||
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
|
||||
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
||||
|
||||
$lookfornewversion_lable = $_version;
|
||||
// add the branding so debian guys are not gettings confused
|
||||
// about their version-number
|
||||
$lookfornewversion_lable = $_version.$branding;
|
||||
$lookfornewversion_link = $_link;
|
||||
$lookfornewversion_addinfo = $_message;
|
||||
|
||||
if (version_compare($version, $_version) == -1) {
|
||||
|
||||
if (version_compare2($version, $_version) == -1) {
|
||||
$isnewerversion = 1;
|
||||
} else {
|
||||
$isnewerversion = 0;
|
||||
@@ -140,7 +143,7 @@ if($page == 'overview')
|
||||
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
|
||||
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains aps_packages');
|
||||
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps tickets subdomains aps_packages');
|
||||
|
||||
$cron_last_runs = getCronjobsLastRun();
|
||||
$outstanding_tasks = getOutstandingTasks();
|
||||
@@ -185,7 +188,7 @@ if($page == 'overview')
|
||||
}
|
||||
|
||||
// Try to get the uptime
|
||||
// First: With exec (let's hope it's enabled for the SysCP - vHost)
|
||||
// First: With exec (let's hope it's enabled for the Froxlor - vHost)
|
||||
|
||||
$uptime_array = explode(" ", @file_get_contents("/proc/uptime"));
|
||||
|
||||
@@ -281,13 +284,47 @@ elseif($page == 'change_language')
|
||||
{
|
||||
$language_options = '';
|
||||
|
||||
$default_lang = $settings['panel']['standardlanguage'];
|
||||
if($userinfo['def_language'] != '') {
|
||||
$default_lang = $userinfo['def_language'];
|
||||
}
|
||||
|
||||
while(list($language_file, $language_name) = each($languages))
|
||||
{
|
||||
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
|
||||
$language_options.= makeoption($language_name, $language_file, $default_lang, true);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($page == 'change_theme')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
$theme = validate($_POST['theme'], 'theme');
|
||||
|
||||
?>
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her theme to '" . $theme . "'");
|
||||
redirectTo($filename, Array('s' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
$theme_options = '';
|
||||
|
||||
$default_theme = $settings['panel']['default_theme'];
|
||||
if($userinfo['theme'] != '') {
|
||||
$default_theme = $userinfo['theme'];
|
||||
}
|
||||
|
||||
$themes_avail = getThemes();
|
||||
foreach($themes_avail as $t)
|
||||
{
|
||||
$theme_options.= makeoption($t, $t, $default_theme, true);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("index/change_theme") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -83,7 +83,7 @@ if($page == 'ipsandports'
|
||||
if(isset($result['id'])
|
||||
&& $result['id'] == $id)
|
||||
{
|
||||
$result_checkdomain = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `ipandport`='" . (int)$id . "'");
|
||||
$result_checkdomain = $db->query_first("SELECT `id_domain` as `id` FROM `" . TABLE_DOMAINTOIP . "` WHERE `id_ipandports`='" . (int)$id . "'");
|
||||
|
||||
if($result_checkdomain['id'] == '')
|
||||
{
|
||||
@@ -102,9 +102,16 @@ if($page == 'ipsandports'
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$id . "'");
|
||||
|
||||
// also, remove connections to domains (multi-stack)
|
||||
$db->query("DELETE FROM `".TABLE_DOMAINTOIP."` WHERE `id_ipandports`='".(int)$id."'");
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_WARNING, "deleted IP/port '" . $result['ip'] . ":" . $result['port'] . "'");
|
||||
inserttask('1');
|
||||
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
@@ -136,16 +143,27 @@ if($page == 'ipsandports'
|
||||
{
|
||||
$ip = validate_ip($_POST['ip']);
|
||||
$port = validate($_POST['port'], 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array('stringisempty', 'myport'));
|
||||
$listen_statement = intval($_POST['listen_statement']);
|
||||
$namevirtualhost_statement = intval($_POST['namevirtualhost_statement']);
|
||||
$vhostcontainer = intval($_POST['vhostcontainer']);
|
||||
$listen_statement = isset($_POST['listen_statement']) ? 1 : 0;
|
||||
$namevirtualhost_statement = isset($_POST['namevirtualhost_statement']) ? 1 : 0;
|
||||
$vhostcontainer = isset($_POST['vhostcontainer']) ? 1 : 0;
|
||||
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
|
||||
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
|
||||
$ssl = intval($_POST['ssl']);
|
||||
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
|
||||
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
|
||||
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
|
||||
$vhostcontainer_servername_statement = isset($_POST['vhostcontainer_servername_statement']) ? 1 : 0;
|
||||
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
|
||||
$docroot = validate($_POST['docroot'], 'docroot');
|
||||
if((int)$settings['system']['use_ssl'] == 1)
|
||||
{
|
||||
$ssl = intval($_POST['ssl']);
|
||||
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
|
||||
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
|
||||
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
|
||||
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
|
||||
} else {
|
||||
$ssl = 0;
|
||||
$ssl_cert_file = '';
|
||||
$ssl_key_file = '';
|
||||
$ssl_ca_file = '';
|
||||
$ssl_cert_chainfile = '';
|
||||
}
|
||||
|
||||
if($listen_statement != '1')
|
||||
{
|
||||
@@ -187,6 +205,20 @@ if($page == 'ipsandports'
|
||||
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
|
||||
}
|
||||
|
||||
if($ssl_cert_chainfile != '')
|
||||
{
|
||||
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
|
||||
}
|
||||
|
||||
if(strlen(trim($docroot)) > 0)
|
||||
{
|
||||
$docroot = makeCorrectDir($docroot);
|
||||
}
|
||||
else
|
||||
{
|
||||
$docroot = '';
|
||||
}
|
||||
|
||||
$result_checkfordouble = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($ip) . "' AND `port`='" . (int)$port . "'");
|
||||
|
||||
if($result_checkfordouble['id'] != '')
|
||||
@@ -195,7 +227,23 @@ if($page == 'ipsandports'
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "` (`ip`, `port`, `listen_statement`, `namevirtualhost_statement`, `vhostcontainer`, `vhostcontainer_servername_statement`, `specialsettings`, `ssl`, `ssl_cert_file`, `ssl_key_file`, `ssl_ca_file`, `default_vhostconf_domain`) VALUES ('" . $db->escape($ip) . "', '" . (int)$port . "', '" . (int)$listen_statement . "', '" . (int)$namevirtualhost_statement . "', '" . (int)$vhostcontainer . "', '" . (int)$vhostcontainer_servername_statement . "', '" . $db->escape($specialsettings) . "', '" . (int)$ssl . "', '" . $db->escape($ssl_cert_file) . "', '" . $db->escape($ssl_key_file) . "', '" . $db->escape($ssl_ca_file) . "', '" . $db->escape($default_vhostconf_domain) . "')");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "`
|
||||
SET
|
||||
`ip` = '" . $db->escape($ip) . "',
|
||||
`port` = '" . (int)$port . "',
|
||||
`listen_statement` = '" . (int)$listen_statement . "',
|
||||
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
|
||||
`vhostcontainer` = '" . (int)$vhostcontainer . "',
|
||||
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
|
||||
`specialsettings` = '" . $db->escape($specialsettings) . "',
|
||||
`ssl` = '" . (int)$ssl . "',
|
||||
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
|
||||
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
|
||||
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
|
||||
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
|
||||
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
|
||||
`docroot` = '" . $db->escape($docroot) . "';
|
||||
");
|
||||
|
||||
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
||||
{
|
||||
@@ -204,17 +252,29 @@ if($page == 'ipsandports'
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_WARNING, "added IP/port '" . $ip . ":" . $port . "'");
|
||||
inserttask('1');
|
||||
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
$enable_ssl = makeyesno('ssl', '1', '0', '0');
|
||||
$listen_statement = makeyesno('listen_statement', '1', '0', '1');
|
||||
$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', '1');
|
||||
$vhostcontainer = makeyesno('vhostcontainer', '1', '0', '1');
|
||||
$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', '1');
|
||||
*/
|
||||
|
||||
$ipsandports_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_add.php';
|
||||
$ipsandports_add_form = htmlform::genHTMLForm($ipsandports_add_data);
|
||||
|
||||
$title = $ipsandports_add_data['ipsandports_add']['title'];
|
||||
$image = $ipsandports_add_data['ipsandports_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("ipsandports/ipsandports_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -232,16 +292,34 @@ if($page == 'ipsandports'
|
||||
$port = validate($_POST['port'], 'port', '/^(([1-9])|([1-9][0-9])|([1-9][0-9][0-9])|([1-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9])|(6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9])|(655[0-2][0-9])|(6553[0-5]))$/Di', array('stringisempty', 'myport'));
|
||||
$result_checkfordouble = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($ip) . "' AND `port`='" . (int)$port . "'");
|
||||
$result_sameipotherport = $db->query_first("SELECT `id` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ip`='" . $db->escape($result['ip']) . "' AND `id`!='" . (int)$id . "'");
|
||||
$listen_statement = intval($_POST['listen_statement']);
|
||||
$namevirtualhost_statement = intval($_POST['namevirtualhost_statement']);
|
||||
$vhostcontainer = intval($_POST['vhostcontainer']);
|
||||
$listen_statement = isset($_POST['listen_statement']) ? 1 : 0;
|
||||
$namevirtualhost_statement = isset($_POST['namevirtualhost_statement']) ? 1 : 0;
|
||||
$vhostcontainer = isset($_POST['vhostcontainer']) ? 1 : 0;
|
||||
$specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/');
|
||||
$vhostcontainer_servername_statement = intval($_POST['vhostcontainer_servername_statement']);
|
||||
$ssl = intval($_POST['ssl']);
|
||||
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
|
||||
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
|
||||
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
|
||||
$vhostcontainer_servername_statement = isset($_POST['vhostcontainer_servername_statement']) ? 1 : 0;
|
||||
$default_vhostconf_domain = validate(str_replace("\r\n", "\n", $_POST['default_vhostconf_domain']), 'default_vhostconf_domain', '/^[^\0]*$/');
|
||||
$docroot = validate($_POST['docroot'], 'docroot');
|
||||
|
||||
if((int)$settings['system']['use_ssl'] == 1
|
||||
/*
|
||||
* check here if ssl is even checked, cause if not, we don't need
|
||||
* to validate and set all the $ssl_*_file vars
|
||||
*/
|
||||
&& isset($_POST['ssl'])
|
||||
&& $_POST['ssl'] != 0
|
||||
) {
|
||||
$ssl = 1;
|
||||
$ssl_cert_file = validate($_POST['ssl_cert_file'], 'ssl_cert_file');
|
||||
$ssl_key_file = validate($_POST['ssl_key_file'], 'ssl_key_file');
|
||||
$ssl_ca_file = validate($_POST['ssl_ca_file'], 'ssl_ca_file');
|
||||
$ssl_cert_chainfile = validate($_POST['ssl_cert_chainfile'], 'ssl_cert_chainfile');
|
||||
} else {
|
||||
$ssl = 0;
|
||||
$ssl_cert_file = '';
|
||||
$ssl_key_file = '';
|
||||
$ssl_ca_file = '';
|
||||
$ssl_cert_chainfile = '';
|
||||
}
|
||||
|
||||
if($listen_statement != '1')
|
||||
{
|
||||
@@ -283,6 +361,20 @@ if($page == 'ipsandports'
|
||||
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
|
||||
}
|
||||
|
||||
if($ssl_cert_chainfile != '')
|
||||
{
|
||||
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
|
||||
}
|
||||
|
||||
if(strlen(trim($docroot)) > 0)
|
||||
{
|
||||
$docroot = makeCorrectDir($docroot);
|
||||
}
|
||||
else
|
||||
{
|
||||
$docroot = '';
|
||||
}
|
||||
|
||||
if($result['ip'] != $ip
|
||||
&& $result['ip'] == $settings['system']['ipaddress']
|
||||
&& $result_sameipotherport['id'] == '')
|
||||
@@ -296,21 +388,52 @@ if($page == 'ipsandports'
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "` SET `ip`='" . $db->escape($ip) . "', `port`='" . (int)$port . "', `listen_statement`='" . (int)$listen_statement . "', `namevirtualhost_statement`='" . (int)$namevirtualhost_statement . "', `vhostcontainer`='" . (int)$vhostcontainer . "', `vhostcontainer_servername_statement`='" . (int)$vhostcontainer_servername_statement . "', `specialsettings`='" . $db->escape($specialsettings) . "', `ssl`='" . (int)$ssl . "', `ssl_cert_file`='" . $db->escape($ssl_cert_file) . "', `ssl_key_file`='" . $db->escape($ssl_key_file) . "', `ssl_ca_file`='" . $db->escape($ssl_ca_file) . "', `default_vhostconf_domain`='" . $db->escape($default_vhostconf_domain) . "' WHERE `id`='" . (int)$id . "'");
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "`
|
||||
SET
|
||||
`ip` = '" . $db->escape($ip) . "',
|
||||
`port` = '" . (int)$port . "',
|
||||
`listen_statement` = '" . (int)$listen_statement . "',
|
||||
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
|
||||
`vhostcontainer` = '" . (int)$vhostcontainer . "',
|
||||
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
|
||||
`specialsettings` = '" . $db->escape($specialsettings) . "',
|
||||
`ssl` = '" . (int)$ssl . "',
|
||||
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
|
||||
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
|
||||
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
|
||||
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
|
||||
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
|
||||
`docroot` = '" . $db->escape($docroot) . "'
|
||||
WHERE `id`='" . (int)$id . "'
|
||||
");
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
|
||||
inserttask('1');
|
||||
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
||||
$result = htmlentities_array($result);
|
||||
/*
|
||||
$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
||||
$listen_statement = makeyesno('listen_statement', '1', '0', $result['listen_statement']);
|
||||
$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', $result['namevirtualhost_statement']);
|
||||
$vhostcontainer = makeyesno('vhostcontainer', '1', '0', $result['vhostcontainer']);
|
||||
$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', $result['vhostcontainer_servername_statement']);
|
||||
*/
|
||||
|
||||
$ipsandports_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/ipsandports/formfield.ipsandports_edit.php';
|
||||
$ipsandports_edit_form = htmlform::genHTMLForm($ipsandports_edit_data);
|
||||
|
||||
$title = $ipsandports_edit_data['ipsandports_edit']['title'];
|
||||
$image = $ipsandports_edit_data['ipsandports_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("ipsandports/ipsandports_edit") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -22,19 +22,17 @@ define('AREA', 'admin');
|
||||
/**
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
require('./lib/init.php');
|
||||
|
||||
require ("./lib/init.php");
|
||||
|
||||
if($page == 'log'
|
||||
&& $userinfo['change_serversettings'] == '1')
|
||||
{
|
||||
if($action == '')
|
||||
{
|
||||
if ($page == 'log'
|
||||
&& $userinfo['change_serversettings'] == '1'
|
||||
) {
|
||||
if ($action == '') {
|
||||
$fields = array(
|
||||
'action' => $lng['logger']['action'],
|
||||
'date' => $lng['logger']['date'],
|
||||
'type' => $lng['logger']['type'],
|
||||
'user' => $lng['logger']['user']
|
||||
'user' => $lng['logger']['user'],
|
||||
'text' => $lng['logger']['action']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_LOG, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$paging->sortfield = 'date';
|
||||
@@ -47,24 +45,21 @@ if($page == 'log'
|
||||
$pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
$clog = array();
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if(!isset($clog[$row['action']])
|
||||
|| !is_array($clog[$row['action']]))
|
||||
{
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
if (!isset($clog[$row['action']])
|
||||
|| !is_array($clog[$row['action']])
|
||||
) {
|
||||
$clog[$row['action']] = array();
|
||||
}
|
||||
|
||||
$clog[$row['action']][$row['logid']] = $row;
|
||||
}
|
||||
|
||||
if($paging->sortfield == 'date'
|
||||
&& $paging->sortorder == 'desc')
|
||||
{
|
||||
if ($paging->sortfield == 'date'
|
||||
&& $paging->sortorder == 'desc'
|
||||
) {
|
||||
krsort($clog);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
ksort($clog);
|
||||
}
|
||||
|
||||
@@ -72,20 +67,15 @@ if($page == 'log'
|
||||
$count = 0;
|
||||
$log_count = 0;
|
||||
$log = '';
|
||||
foreach($clog as $action => $logrows)
|
||||
{
|
||||
foreach ($clog as $action => $logrows) {
|
||||
$_action = 0;
|
||||
foreach($logrows as $row)
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
foreach ($logrows as $row) {
|
||||
if ($paging->checkDisplay($i)) {
|
||||
$row = htmlentities_array($row);
|
||||
$row['date'] = date("d.m.y H:i:s", $row['date']);
|
||||
|
||||
if($_action != $action)
|
||||
{
|
||||
switch($action)
|
||||
{
|
||||
if ($_action != $action) {
|
||||
switch ($action) {
|
||||
case USR_ACTION:
|
||||
$_action = $lng['admin']['customer'];
|
||||
break;
|
||||
@@ -107,15 +97,14 @@ if($page == 'log'
|
||||
}
|
||||
|
||||
$row['action'] = $_action;
|
||||
eval("\$log.=\"" . getTemplate("logger/logger_action") . "\";");
|
||||
eval("\$log.=\"" . getTemplate('logger/logger_action') . "\";");
|
||||
}
|
||||
|
||||
$log_count++;
|
||||
$type = $row['type'];
|
||||
$_type = 'unknown';
|
||||
|
||||
switch($type)
|
||||
{
|
||||
switch ($type) {
|
||||
case LOG_INFO:
|
||||
$_type = 'Information';
|
||||
break;
|
||||
@@ -137,35 +126,28 @@ if($page == 'log'
|
||||
}
|
||||
|
||||
$row['type'] = $_type;
|
||||
eval("\$log.=\"" . getTemplate("logger/logger_log") . "\";");
|
||||
eval("\$log.=\"" . getTemplate('logger/logger_log') . "\";");
|
||||
$count++;
|
||||
$_action = $action;
|
||||
}
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("logger/logger") . "\";");
|
||||
}
|
||||
elseif($action == 'truncate')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
eval("echo \"" . getTemplate('logger/logger') . "\";");
|
||||
} elseif ($action == 'truncate') {
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
$yesterday = time() - (60 * 10);
|
||||
|
||||
/* (60*60*24); */
|
||||
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_LOG . "` WHERE `date` < '" . $yesterday . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_WARNING, "truncated the system-log (mysql)");
|
||||
$log->logAction(ADM_ACTION, LOG_WARNING, 'truncated the system-log (mysql)');
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
ask_yesno('logger_reallytruncate', $filename, array('page' => $page, 'action' => $action), TABLE_PANEL_LOG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -22,79 +22,60 @@ define('AREA', 'admin');
|
||||
/**
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
require('./lib/init.php');
|
||||
|
||||
require ("./lib/init.php");
|
||||
|
||||
if(isset($_POST['id']))
|
||||
{
|
||||
if (isset($_POST['id'])) {
|
||||
$id = intval($_POST['id']);
|
||||
}
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
} elseif (isset($_GET['id'])) {
|
||||
$id = intval($_GET['id']);
|
||||
}
|
||||
|
||||
if($page == 'message')
|
||||
{
|
||||
if($action == '')
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed panel_message");
|
||||
if ($page == 'message') {
|
||||
if ($action == '') {
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, 'viewed panel_message');
|
||||
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if($_POST['receipient'] == 0
|
||||
&& $userinfo['customers_see_all'] == '1')
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to admins");
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
if ($_POST['receipient'] == 0
|
||||
&& $userinfo['customers_see_all'] == '1'
|
||||
) {
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to admins');
|
||||
$result = $db->query('SELECT `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`");
|
||||
}
|
||||
elseif($_POST['receipient'] == 1)
|
||||
{
|
||||
if($userinfo['customers_see_all'] == "1")
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to ALL customers");
|
||||
} elseif ($_POST['receipient'] == 1) {
|
||||
if ($userinfo['customers_see_all'] == '1') {
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to ALL customers');
|
||||
$result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`");
|
||||
}
|
||||
else
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to customers");
|
||||
} else {
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, 'sending messages to customers');
|
||||
$result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "` WHERE `adminid`='" . $userinfo['adminid'] . "'");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
standard_error('noreceipientsgiven');
|
||||
}
|
||||
|
||||
$subject = $_POST['subject'];
|
||||
$message = wordwrap($_POST['message'], 70);
|
||||
|
||||
if(!empty($message))
|
||||
{
|
||||
if (!empty($message)) {
|
||||
$mailcounter = 0;
|
||||
$mail->Body = $message;
|
||||
$mail->Subject = $subject;
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
$mail->AddAddress($row['email'], (isset($row['firstname']) ? $row['firstname'] . ' ' : '') . $row['name']);
|
||||
$mail->From = $userinfo['email'];
|
||||
$mail->FromName = (isset($userinfo['firstname']) ? $userinfo['firstname'] . ' ' : '') . $userinfo['name'];
|
||||
|
||||
if(!$mail->Send())
|
||||
{
|
||||
if($mail->ErrorInfo != '')
|
||||
{
|
||||
if (!$mail->Send()) {
|
||||
if ($mail->ErrorInfo != '') {
|
||||
$mailerr_msg = $mail->ErrorInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mailerr_msg = $row["email"];
|
||||
} else {
|
||||
$mailerr_msg = $row['email'];
|
||||
}
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $row["email"]);
|
||||
$log->logAction(ADM_ACTION, LOG_ERR, 'Error sending mail: ' . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $row['email']);
|
||||
}
|
||||
|
||||
$mailcounter++;
|
||||
@@ -102,47 +83,34 @@ if($page == 'message')
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s, 'action' => 'showsuccess', 'sentitems' => $mailcounter));
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
standard_error('nomessagetosend');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($action == 'showsuccess')
|
||||
{
|
||||
if ($action == 'showsuccess') {
|
||||
$success = 1;
|
||||
$sentitems = isset($_GET['sentitems']) ? (int)$_GET['sentitems'] : 0;
|
||||
|
||||
if($sentitems == 0)
|
||||
{
|
||||
if ($sentitems == 0) {
|
||||
$successmessage = $lng['message']['noreceipients'];
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$successmessage = str_replace('%s', $sentitems, $lng['message']['success']);
|
||||
}
|
||||
|
||||
$action = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$success = 0;
|
||||
$sentitems = 0;
|
||||
$successmessage = '';
|
||||
$action = '';
|
||||
}
|
||||
$action = '';
|
||||
|
||||
$receipients = '';
|
||||
|
||||
if($userinfo['customers_see_all'] == "1")
|
||||
{
|
||||
if ($userinfo['customers_see_all'] == '1') {
|
||||
$receipients.= makeoption($lng['panel']['reseller'], 0);
|
||||
}
|
||||
|
||||
$receipients.= makeoption($lng['panel']['customer'], 1);
|
||||
eval("echo \"" . getTemplate("message/message") . "\";");
|
||||
$receipients .= makeoption($lng['panel']['customer'], 1);
|
||||
eval("echo \"" . getTemplate('message/message') . "\";");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -25,49 +25,58 @@ define('AREA', 'admin');
|
||||
|
||||
require ("./lib/init.php");
|
||||
|
||||
if(isset($_POST['id']))
|
||||
{
|
||||
if (isset($_POST['id'])) {
|
||||
$id = intval($_POST['id']);
|
||||
}
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
} elseif (isset($_GET['id'])) {
|
||||
$id = intval($_GET['id']);
|
||||
}
|
||||
|
||||
if($page == 'overview')
|
||||
{
|
||||
if($action == '')
|
||||
{
|
||||
if ($page == 'overview') {
|
||||
|
||||
if ($action == '') {
|
||||
|
||||
$tablecontent = '';
|
||||
$count = 0;
|
||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
|
||||
$domainresult = false;
|
||||
|
||||
if((int)$userinfo['domains_see_all'] == 0)
|
||||
{
|
||||
$domainresult = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `adminid` = " . (int)$userinfo['userid'] . " AND `phpsettingid` = " . (int)$row['id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$domainresult = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `phpsettingid` = " . (int)$row['id']);
|
||||
$query = "SELECT * FROM `".TABLE_PANEL_DOMAINS."`
|
||||
WHERE `phpsettingid` = '".(int)$row['id']."'
|
||||
AND `parentdomainid` = '0'";
|
||||
|
||||
if ((int)$userinfo['domains_see_all'] == 0) {
|
||||
$query .= " AND `adminid` = '".(int)$userinfo['userid']."'";
|
||||
}
|
||||
|
||||
$domains = '';
|
||||
|
||||
if($db->num_rows($domainresult) > 0)
|
||||
{
|
||||
while($row2 = $db->fetch_array($domainresult))
|
||||
{
|
||||
$domains.= $row2['domain'] . '<br/>';
|
||||
if ((int)$settings['panel']['phpconfigs_hidestdsubdomain'] == 1) {
|
||||
$query2 = "SELECT DISTINCT `standardsubdomain`
|
||||
FROM `".TABLE_PANEL_CUSTOMERS."`
|
||||
WHERE `standardsubdomain` > 0 ORDER BY `standardsubdomain` ASC;";
|
||||
$ssdids_res = $db->query($query2);
|
||||
$ssdids = array();
|
||||
while ($ssd = $db->fetch_array($ssdids_res)) {
|
||||
$ssdids[] = $ssd['standardsubdomain'];
|
||||
}
|
||||
if (count($ssdids) > 0) {
|
||||
$query .= " AND `id` NOT IN (".implode(', ', $ssdids).")";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$domainresult = $db->query($query);
|
||||
|
||||
$domains = '';
|
||||
if ($db->num_rows($domainresult) > 0) {
|
||||
while ($row2 = $db->fetch_array($domainresult)) {
|
||||
$domains.= $row2['domain'] . '<br/>';
|
||||
}
|
||||
} else {
|
||||
$domains = $lng['admin']['phpsettings']['notused'];
|
||||
}
|
||||
|
||||
$count ++;
|
||||
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
|
||||
}
|
||||
|
||||
@@ -97,12 +106,19 @@ if($page == 'overview')
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "'");
|
||||
inserttask('1');
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $value . "' has been created by '" . $userinfo['loginname'] . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been created by '" . $userinfo['loginname'] . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
|
||||
|
||||
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
|
||||
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
|
||||
|
||||
$title = $phpconfig_add_data['phpconfig_add']['title'];
|
||||
$image = $phpconfig_add_data['phpconfig_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -172,6 +188,12 @@ if($page == 'overview')
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpconfig_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_edit.php';
|
||||
$phpconfig_edit_form = htmlform::genHTMLForm($phpconfig_edit_data);
|
||||
|
||||
$title = $phpconfig_edit_data['phpconfig_edit']['title'];
|
||||
$image = $phpconfig_edit_data['phpconfig_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -31,22 +31,134 @@ if(($page == 'settings' || $page == 'overview')
|
||||
&& $userinfo['change_serversettings'] == '1')
|
||||
{
|
||||
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
|
||||
$settings = loadSettings(&$settings_data, &$db);
|
||||
|
||||
$settings = loadSettings($settings_data, $db);
|
||||
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if(processForm(&$settings_data, &$_POST, array('filename' => $filename, 'action' => $action, 'page' => $page)))
|
||||
$_part = isset($_GET['part']) ? $_GET['part'] : '';
|
||||
|
||||
if($_part == '')
|
||||
{
|
||||
$_part = isset($_POST['part']) ? $_POST['part'] : '';
|
||||
}
|
||||
|
||||
if($_part != '')
|
||||
{
|
||||
if($_part == 'all')
|
||||
{
|
||||
$settings_all = true;
|
||||
$settings_part = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings_all = false;
|
||||
$settings_part = true;
|
||||
}
|
||||
|
||||
$only_enabledisable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings_all = false;
|
||||
$settings_part = false;
|
||||
$only_enabledisable = true;
|
||||
}
|
||||
|
||||
// check if the session timeout is too low #815
|
||||
if (isset($_POST['session_sessiontimeout']) && $_POST['session_sessiontimeout'] <= 60) {
|
||||
standard_error($lng['error']['session_timeout'], $lng['error']['session_timeout_desc']);
|
||||
}
|
||||
|
||||
if(processFormEx(
|
||||
$settings_data,
|
||||
$_POST,
|
||||
array('filename' => $filename, 'action' => $action, 'page' => $page),
|
||||
$_part,
|
||||
$settings_all,
|
||||
$settings_part,
|
||||
$only_enabledisable
|
||||
)
|
||||
) {
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
||||
inserttask('1');
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
|
||||
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$fields = buildForm(&$settings_data);
|
||||
eval("echo \"" . getTemplate("settings/settings") . "\";");
|
||||
$_part = isset($_GET['part']) ? $_GET['part'] : '';
|
||||
|
||||
if($_part == '')
|
||||
{
|
||||
$_part = isset($_POST['part']) ? $_POST['part'] : '';
|
||||
}
|
||||
|
||||
$fields = buildFormEx($settings_data, $_part);
|
||||
|
||||
$settings_page = '';
|
||||
if($_part == '')
|
||||
{
|
||||
eval("\$settings_page .= \"" . getTemplate("settings/settings_overview") . "\";");
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("\$settings_page .= \"" . getTemplate("settings/settings") . "\";");
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("settings/settings_form_begin") . "\";");
|
||||
eval("echo \$settings_page;");
|
||||
eval("echo \"" . getTemplate("settings/settings_form_end") . "\";");
|
||||
|
||||
}
|
||||
}
|
||||
elseif($page == 'phpinfo'
|
||||
&& $userinfo['change_serversettings'] == '1'
|
||||
) {
|
||||
ob_start();
|
||||
phpinfo();
|
||||
$phpinfo = array('phpinfo' => array());
|
||||
if (preg_match_all(
|
||||
'#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s',
|
||||
ob_get_clean(), $matches, PREG_SET_ORDER
|
||||
)
|
||||
) {
|
||||
foreach ($matches as $match) {
|
||||
$end = array_keys($phpinfo);
|
||||
$end = end($end);
|
||||
if (strlen($match[1])) {
|
||||
$phpinfo[$match[1]] = array();
|
||||
} elseif (isset($match[3])) {
|
||||
$phpinfo[$end][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
|
||||
} else {
|
||||
$phpinfo[$end][] = $match[2];
|
||||
}
|
||||
}
|
||||
$phpinfohtml = '';
|
||||
foreach ($phpinfo as $name => $section) {
|
||||
$phpinfoentries = "";
|
||||
foreach ($section as $key => $val) {
|
||||
if (is_array($val)) {
|
||||
eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_3") . "\";");
|
||||
} elseif (is_string($key)) {
|
||||
eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_2") . "\";");
|
||||
} else {
|
||||
eval("\$phpinfoentries .= \"" . getTemplate("settings/phpinfo/phpinfo_1") . "\";");
|
||||
}
|
||||
}
|
||||
// first header -> show actual php version
|
||||
if (strtolower($name) == "phpinfo") {
|
||||
$name = "PHP ".PHP_VERSION;
|
||||
}
|
||||
eval("\$phpinfohtml .= \"" . getTemplate("settings/phpinfo/phpinfo_table") . "\";");
|
||||
}
|
||||
$phpinfo = $phpinfohtml;
|
||||
}
|
||||
eval("echo \"" . getTemplate("settings/phpinfo") . "\";");
|
||||
}
|
||||
elseif($page == 'rebuildconfigs'
|
||||
&& $userinfo['change_serversettings'] == '1')
|
||||
{
|
||||
@@ -55,9 +167,11 @@ elseif($page == 'rebuildconfigs'
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
|
||||
inserttask('1');
|
||||
inserttask('10');
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
inserttask('5');
|
||||
redirectTo('admin_index.php', array('s' => $s));
|
||||
|
||||
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -157,5 +271,3 @@ elseif($page == 'enforcequotas'
|
||||
ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -48,13 +48,28 @@ elseif(isset($_GET['id']))
|
||||
$available_templates = array(
|
||||
'createcustomer',
|
||||
'pop_success',
|
||||
'trafficninetypercent',
|
||||
'new_ticket_by_customer',
|
||||
'new_ticket_for_customer',
|
||||
'new_ticket_by_staff',
|
||||
'new_reply_ticket_by_customer',
|
||||
'new_reply_ticket_by_staff'
|
||||
'new_database_by_customer',
|
||||
'new_ftpaccount_by_customer',
|
||||
'password_reset'
|
||||
);
|
||||
|
||||
// only show templates of features that are enabled #1191
|
||||
if ((int)$settings['system']['report_enable'] == 1) {
|
||||
array_push($available_templates,
|
||||
'trafficmaxpercent',
|
||||
'diskmaxpercent'
|
||||
);
|
||||
}
|
||||
if ((int)$settings['ticket']['enabled'] == 1) {
|
||||
array_push($available_templates,
|
||||
'new_ticket_by_customer',
|
||||
'new_ticket_for_customer',
|
||||
'new_ticket_by_staff',
|
||||
'new_reply_ticket_by_customer',
|
||||
'new_reply_ticket_by_staff'
|
||||
);
|
||||
}
|
||||
|
||||
$file_templates = array(
|
||||
'index_html'
|
||||
);
|
||||
@@ -148,7 +163,7 @@ elseif($action == 'delete'
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
elseif($action == 'deletef'
|
||||
&& $id != 0)
|
||||
{
|
||||
//file templates
|
||||
@@ -205,6 +220,12 @@ elseif($action == 'add')
|
||||
$template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true);
|
||||
}
|
||||
|
||||
$template_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_add.php';
|
||||
$template_add_form = htmlform::genHTMLForm($template_add_data);
|
||||
|
||||
$title = $template_add_data['template_add']['title'];
|
||||
$image = $template_add_data['template_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("templates/templates_add_2") . "\";");
|
||||
}
|
||||
elseif(isset($_POST['send'])
|
||||
@@ -308,6 +329,12 @@ elseif($action == 'add')
|
||||
$free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true);
|
||||
}
|
||||
|
||||
$filetemplate_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_add.php';
|
||||
$filetemplate_add_form = htmlform::genHTMLForm($filetemplate_add_data);
|
||||
|
||||
$title = $filetemplate_add_data['filetemplate_add']['title'];
|
||||
$image = $filetemplate_add_data['filetemplate_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -340,11 +367,18 @@ elseif($action == 'edit'
|
||||
$result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `id`='$mailbodyid'");
|
||||
$result = htmlentities_array($result);
|
||||
$mailbody = $result['value'];
|
||||
|
||||
$template_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.template_edit.php';
|
||||
$template_edit_form = htmlform::genHTMLForm($template_edit_data);
|
||||
|
||||
$title = $template_edit_data['template_edit']['title'];
|
||||
$image = $template_edit_data['template_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("templates/templates_edit") . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'edit'
|
||||
elseif($action == 'editf'
|
||||
&& $id != 0)
|
||||
{
|
||||
//file templates
|
||||
@@ -368,6 +402,13 @@ elseif($action == 'edit'
|
||||
else
|
||||
{
|
||||
$row = htmlentities_array($row);
|
||||
|
||||
$filetemplate_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/templates/formfield.filetemplate_edit.php';
|
||||
$filetemplate_edit_form = htmlform::genHTMLForm($filetemplate_edit_data);
|
||||
|
||||
$title = $filetemplate_edit_data['filetemplate_edit']['title'];
|
||||
$image = $filetemplate_edit_data['filetemplate_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -377,5 +418,3 @@ elseif($action == 'edit'
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -32,6 +32,22 @@ if(isset($_POST['id']))
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
$id = intval($_GET['id']);
|
||||
|
||||
// only check if this is not a category-id
|
||||
if (!isset($_GET['page']) || (isset($_GET['page']) && $_GET['page'] != 'categories')) {
|
||||
if (!$userinfo['customers_see_all']) {
|
||||
/*
|
||||
* Check if the current user is allowed to see the current ticket.
|
||||
*/
|
||||
$sql = "SELECT `id` FROM `panel_tickets` WHERE `id` = '".$id."' AND `adminid` = '".$userinfo['admindid']."'";
|
||||
|
||||
$result = $db->query_first($sql);
|
||||
if ($result == null) {
|
||||
// no rights to see the requested ticket
|
||||
standard_error(array('ticketnotaccessible'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($page == 'tickets'
|
||||
@@ -41,7 +57,7 @@ if($page == 'tickets'
|
||||
|
||||
$countcustomers = $db->query_first("SELECT COUNT(`customerid`) as `countcustomers` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . "");
|
||||
$countcustomers = (int)$countcustomers['countcustomers'];
|
||||
|
||||
|
||||
if($action == '')
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets");
|
||||
@@ -56,7 +72,7 @@ if($page == 'tickets'
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$paging->sortfield = 'lastchange';
|
||||
$paging->sortorder = 'desc';
|
||||
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `adminid` = "' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" ' . ($userinfo['customers_see_all'] ? '' : ' AND `adminid` = "' . (int)$userinfo['adminid'] . '"') . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -102,15 +118,20 @@ if($page == 'tickets'
|
||||
if($_cid != $row['customerid'])
|
||||
{
|
||||
$cid = $row['customerid'];
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"');
|
||||
|
||||
if(isset($usr['loginname'])) {
|
||||
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||
} else {
|
||||
|
||||
if(isset($usr['loginname']))
|
||||
{
|
||||
$customer = getCorrectFullUserDetails($usr);
|
||||
$customerloginname = $usr['loginname'];
|
||||
$customerid = $usr['customerid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$customer = $lng['ticket']['nonexistingcustomer'];
|
||||
}
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
|
||||
}
|
||||
|
||||
$tickets_count++;
|
||||
@@ -139,12 +160,13 @@ if($page == 'tickets'
|
||||
$cananswer = 1;
|
||||
}
|
||||
|
||||
$row['subject'] = html_entity_decode($row['subject']);
|
||||
if(strlen($row['subject']) > 20)
|
||||
{
|
||||
$row['subject'] = substr($row['subject'], 0, 17) . '...';
|
||||
}
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";");
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/tickets_tickets") . "\";");
|
||||
$count++;
|
||||
$_cid = $row['customerid'];
|
||||
}
|
||||
@@ -153,7 +175,7 @@ if($page == 'tickets'
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
|
||||
}
|
||||
elseif($action == 'new')
|
||||
{
|
||||
@@ -167,8 +189,8 @@ if($page == 'tickets'
|
||||
$newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
|
||||
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
|
||||
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
|
||||
$newticket->Set('customer', validate($_POST['customer'], 'customer'), true, false);
|
||||
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
|
||||
$newticket->Set('customer', (int)$_POST['customer'], true, false);
|
||||
$newticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
|
||||
|
||||
if($newticket->Get('subject') == null)
|
||||
{
|
||||
@@ -197,12 +219,16 @@ if($page == 'tickets'
|
||||
else
|
||||
{
|
||||
$categories = '';
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `name` ASC');
|
||||
$where = '';
|
||||
if ($userinfo['tickets_see_all'] != '1') {
|
||||
$where = 'WHERE `adminid` = "' . $userinfo['adminid'] . '"';
|
||||
}
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` '.$where.' ORDER BY `logicalorder`, `name` ASC');
|
||||
|
||||
if(isset($result['name'])
|
||||
&& $result['name'] != '')
|
||||
{
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `name` ASC');
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` '.$where.' ORDER BY `logicalorder`, `name` ASC');
|
||||
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
@@ -219,28 +245,20 @@ if($page == 'tickets'
|
||||
|
||||
while($row_customer = $db->fetch_array($result_customers))
|
||||
{
|
||||
if($row_customer['company'] == '')
|
||||
{
|
||||
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($row_customer['name'] != ''
|
||||
&& $row_customer['firstname'] != '')
|
||||
{
|
||||
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' | ' . $row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$customers.= makeoption($row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
}
|
||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1');
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
|
||||
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
|
||||
|
||||
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_new.php';
|
||||
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
|
||||
|
||||
$title = $ticket_new_data['ticket_new']['title'];
|
||||
$image = $ticket_new_data['ticket_new']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_new") . "\";");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -257,7 +275,7 @@ if($page == 'tickets'
|
||||
$replyticket = ticket::getInstanceOf($userinfo, $db, $settings, -1);
|
||||
$replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
|
||||
$replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
|
||||
$replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
|
||||
$replyticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
|
||||
|
||||
if($replyticket->Get('message') == null)
|
||||
{
|
||||
@@ -308,18 +326,25 @@ if($page == 'tickets'
|
||||
$isclosed = 1;
|
||||
}
|
||||
|
||||
if($mainticket->Get('by') == '1')
|
||||
if ($mainticket->Get('by') == '1')
|
||||
{
|
||||
$by = $lng['ticket']['staff'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$by = $lng['ticket']['customer'];
|
||||
$cid = $mainticket->Get('customer');
|
||||
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"'
|
||||
);
|
||||
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
|
||||
$by .= getCorrectFullUserDetails($usr).'</a>';
|
||||
//$by = $lng['ticket']['customer'];
|
||||
}
|
||||
|
||||
$subject = $mainticket->Get('subject');
|
||||
$message = $mainticket->Get('message');
|
||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
|
||||
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
|
||||
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
|
||||
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
|
||||
$row = $db->fetch_array($result);
|
||||
@@ -336,12 +361,19 @@ if($page == 'tickets'
|
||||
}
|
||||
else
|
||||
{
|
||||
$by = $lng['ticket']['customer'];
|
||||
$cid = $subticket->Get('customer');
|
||||
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"'
|
||||
);
|
||||
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
|
||||
$by .= getCorrectFullUserDetails($usr).'</a>';
|
||||
//$by = $lng['ticket']['customer'];
|
||||
}
|
||||
|
||||
$subject = $subticket->Get('subject');
|
||||
$message = $subticket->Get('message');
|
||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
|
||||
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
|
||||
@@ -351,8 +383,13 @@ if($page == 'tickets'
|
||||
$ticket_replies_count = $db->num_rows($andere) + 1;
|
||||
|
||||
// don't forget the main-ticket!
|
||||
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_reply.php';
|
||||
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
|
||||
$title = $ticket_reply_data['ticket_reply']['title'];
|
||||
$image = $ticket_reply_data['ticket_reply']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_reply") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'close'
|
||||
@@ -435,13 +472,19 @@ elseif($page == 'categories'
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::categories");
|
||||
$fields = array(
|
||||
'name' => $lng['ticket']['category']
|
||||
'name' => $lng['ticket']['category'],
|
||||
'logicalorder' => $lng['ticket']['logicalorder']
|
||||
);
|
||||
|
||||
$where = '1'; // WHERE 1 is like no 'where-clause'
|
||||
if ($userinfo['tickets_see_all'] != '1') {
|
||||
$where = " `main`.`adminid` = '" . (int)$userinfo['adminid'] . "'";
|
||||
}
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKET_CATS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query("SELECT `main`.`id`, `main`.`name`, (
|
||||
$result = $db->query("SELECT `main`.`id`, `main`.`name`, `main`.`logicalorder`, (
|
||||
SELECT COUNT(`sub`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub`
|
||||
WHERE `sub`.`category` = `main`.`id`
|
||||
AND `sub`.`answerto` = '0' AND `sub`.`adminid` = '" . $userinfo['adminid'] . "')
|
||||
AND `sub`.`answerto` = '0' AND `sub`.`adminid` = '" . $userinfo['adminid'] . "')
|
||||
as `ticketcount`, (
|
||||
SELECT COUNT(`sub2`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub2`
|
||||
WHERE `sub2`.`category` = `main`.`id`
|
||||
@@ -449,7 +492,7 @@ elseif($page == 'categories'
|
||||
AND (`sub2`.`status` = '0' OR `sub2`.`status` = '1' OR `sub2`.`status` = '2')
|
||||
AND `sub2`.`adminid` = '" . $userinfo['adminid'] . "'
|
||||
) as `ticketcountnotclosed`
|
||||
FROM `" . TABLE_PANEL_TICKET_CATS . "` `main` WHERE `main`.`adminid` = '" . (int)$userinfo['adminid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
FROM `" . TABLE_PANEL_TICKET_CATS . "` `main` WHERE " . $where . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -466,14 +509,14 @@ elseif($page == 'categories'
|
||||
{
|
||||
$row = htmlentities_array($row);
|
||||
$closedtickets_count = ($row['ticketcount'] - $row['ticketcountnotclosed']);
|
||||
eval("\$ticketcategories.=\"" . getTemplate("ticket/tickets_categories") . "\";");
|
||||
eval("\$ticketcategories.=\"" . getTemplate("tickets/tickets_categories") . "\";");
|
||||
$count++;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/categories") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/categories") . "\";");
|
||||
}
|
||||
elseif($action == 'addcategory')
|
||||
{
|
||||
@@ -481,6 +524,13 @@ elseif($page == 'categories'
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$category = validate($_POST['category'], 'category');
|
||||
$order = validate($_POST['logicalorder'], 'logicalorder');
|
||||
|
||||
if($order < 1 || $order >= 1000)
|
||||
{
|
||||
// use the latest available
|
||||
$order = ticket::getHighestOrderNumber($db, $userinfo['adminid']) + 1;
|
||||
}
|
||||
|
||||
if($category == '')
|
||||
{
|
||||
@@ -488,14 +538,22 @@ elseif($page == 'categories'
|
||||
}
|
||||
else
|
||||
{
|
||||
ticket::addCategory($db, $category, $userinfo['adminid']);
|
||||
ticket::addCategory($db, $category, $userinfo['adminid'], $order);
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "added ticket-category '" . $category . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("echo \"" . getTemplate("ticket/tickets_newcategory") . "\";");
|
||||
$order = ticket::getHighestOrderNumber($db, $userinfo['adminid']) + 1;
|
||||
|
||||
$category_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_new.php';
|
||||
$category_new_form = htmlform::genHTMLForm($category_new_data);
|
||||
|
||||
$title = $category_new_data['category_new']['title'];
|
||||
$image = $category_new_data['category_new']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_newcategory") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'editcategory'
|
||||
@@ -505,6 +563,12 @@ elseif($page == 'categories'
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$category = validate($_POST['category'], 'category');
|
||||
$order = validate($_POST['logicalorder'], 'logicalorder');
|
||||
|
||||
if($order < 1 || $order >= 1000)
|
||||
{
|
||||
$order = 1;
|
||||
}
|
||||
|
||||
if($category == '')
|
||||
{
|
||||
@@ -512,7 +576,7 @@ elseif($page == 'categories'
|
||||
}
|
||||
else
|
||||
{
|
||||
ticket::editCategory($db, $category, $id);
|
||||
ticket::editCategory($db, $category, $id, $order);
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited ticket-category '" . $category . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
@@ -520,7 +584,14 @@ elseif($page == 'categories'
|
||||
else
|
||||
{
|
||||
$row = $db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$id . '"');
|
||||
eval("echo \"" . getTemplate("ticket/tickets_editcategory") . "\";");
|
||||
|
||||
$category_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_edit.php';
|
||||
$category_edit_form = htmlform::genHTMLForm($category_edit_data);
|
||||
|
||||
$title = $category_edit_data['category_edit']['title'];
|
||||
$image = $category_edit_data['category_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_editcategory") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'deletecategory'
|
||||
@@ -569,8 +640,7 @@ elseif($page == 'archive'
|
||||
{
|
||||
$categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
|
||||
}
|
||||
|
||||
$query = ticket::getArchiveSearchStatement($subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
|
||||
$query = ticket::getArchiveSearchStatement($db, $subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
|
||||
$fields = array(
|
||||
'lastchange' => $lng['ticket']['lastchange'],
|
||||
'ticket_answers' => $lng['ticket']['ticket_answers'],
|
||||
@@ -628,24 +698,39 @@ elseif($page == 'archive'
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
$ticket = htmlentities_array($ticket);
|
||||
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
|
||||
|
||||
if($_cid != $ticket['customerid'])
|
||||
{
|
||||
$cid = $ticket['customerid'];
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"');
|
||||
|
||||
if(isset($usr['loginname'])) {
|
||||
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||
} else {
|
||||
|
||||
if(isset($usr['loginname']))
|
||||
{
|
||||
$customer = getCorrectFullUserDetails($usr);
|
||||
$customerloginname = $usr['loginname'];
|
||||
$customerid = $usr['customerid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$customer = $lng['ticket']['nonexistingcustomer'];
|
||||
}
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
|
||||
}
|
||||
|
||||
$tickets_count++;
|
||||
switch ($ticket['priority'])
|
||||
{
|
||||
case 1: $ticket['display'] = 'high';
|
||||
break;
|
||||
case 2: $ticket['display'] = 'normal';
|
||||
break;
|
||||
case 3: $ticket['display'] = 'low';
|
||||
break;
|
||||
default: $ticket['display'] = 'unknown';
|
||||
}
|
||||
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
|
||||
|
||||
if($ticket['lastreplier'] == '1')
|
||||
@@ -661,8 +746,8 @@ elseif($page == 'archive'
|
||||
{
|
||||
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
|
||||
}
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
|
||||
$ticket = htmlentities_array($ticket);
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
|
||||
$count++;
|
||||
$_cid = $ticket['customerid'];
|
||||
}
|
||||
@@ -671,7 +756,7 @@ elseif($page == 'archive'
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/archivesearch") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/archivesearch") . "\";");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -700,13 +785,13 @@ elseif($page == 'archive'
|
||||
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
|
||||
}
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
$priorities_options = makecheckbox('priority1', $lng['ticket']['unf_high'], '1');
|
||||
$priorities_options.= makecheckbox('priority2', $lng['ticket']['unf_normal'], '2');
|
||||
$priorities_options.= makecheckbox('priority3', $lng['ticket']['unf_low'], '3');
|
||||
$priorities_options = makecheckbox('priority1', $lng['ticket']['high'], '1');
|
||||
$priorities_options.= makecheckbox('priority2', $lng['ticket']['normal'], '2');
|
||||
$priorities_options.= makecheckbox('priority3', $lng['ticket']['low'], '3');
|
||||
$category_options = '';
|
||||
$ccount = 0;
|
||||
$result = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||
@@ -718,21 +803,14 @@ elseif($page == 'archive'
|
||||
}
|
||||
|
||||
$customers = makeoption($lng['ticket']['nocustomer'], '-1', '-1');
|
||||
$result = $db->query_first('SELECT `customerid` FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . 'ORDER BY `name` ASC');
|
||||
$result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY `name` ASC");
|
||||
|
||||
if(isset($result['customerid'])
|
||||
&& $result['customerid'] != '')
|
||||
while($row_customer = $db->fetch_array($result_customers))
|
||||
{
|
||||
$result2 = $db->query('SELECT `customerid`, `loginname`, `firstname`, `name`
|
||||
FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . ' ORDER BY `name` ASC');
|
||||
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
$customers.= makeoption($row['name'] . ', ' . $row['firstname'] . ' (' . $row['loginname'] . ')', $row['customerid']);
|
||||
}
|
||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/archive") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/archive") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'view'
|
||||
@@ -752,12 +830,19 @@ elseif($page == 'archive'
|
||||
}
|
||||
else
|
||||
{
|
||||
$by = $lng['ticket']['customer'];
|
||||
$cid = $mainticket->Get('customer');
|
||||
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"'
|
||||
);
|
||||
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
|
||||
$by .= getCorrectFullUserDetails($usr).'</a>';
|
||||
//$by = $lng['ticket']['customer'];
|
||||
}
|
||||
|
||||
$subject = $mainticket->Get('subject');
|
||||
$message = $mainticket->Get('message');
|
||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
|
||||
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
|
||||
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
|
||||
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
|
||||
$row = $db->fetch_array($result);
|
||||
@@ -774,23 +859,29 @@ elseif($page == 'archive'
|
||||
}
|
||||
else
|
||||
{
|
||||
$by = $lng['ticket']['customer'];
|
||||
$cid = $subticket->Get('customer');
|
||||
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"'
|
||||
);
|
||||
$by = '<a href="'.$linker->getLink(array('section' => 'customers', 'page' => 'customers', 'action' => 'su', 'id' => $cid)).'" rel="external">';
|
||||
$by .= getCorrectFullUserDetails($usr).'</a>';
|
||||
//$by = $lng['ticket']['customer'];
|
||||
}
|
||||
|
||||
$subject = $subticket->Get('subject');
|
||||
$message = $subticket->Get('message');
|
||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
|
||||
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
|
||||
$priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true);
|
||||
$priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true);
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', htmlentities($mainticket->Get('priority')), true, true);
|
||||
$priorities.= makeoption($lng['ticket']['normal'], '2', htmlentities($mainticket->Get('priority')), true, true);
|
||||
$priorities.= makeoption($lng['ticket']['low'], '3', htmlentities($mainticket->Get('priority')), true, true);
|
||||
$subject = $mainticket->Get('subject');
|
||||
$ticket_replies_count = $db->num_rows($andere) + 1;
|
||||
|
||||
// don't forget the main-ticket!
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/tickets_view") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/tickets_view") . "\";");
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
&& $id != 0)
|
||||
@@ -809,6 +900,6 @@ elseif($page == 'archive'
|
||||
ask_yesno('ticket_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
standard_error('nocustomerforticket');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
148
admin_traffic.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Morton Jonuschat <m.jonuschat@chrome-it.de>
|
||||
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
|
||||
/**
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
|
||||
require ("./lib/init.php");
|
||||
|
||||
if($action == 'logout')
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['adminid'] . "' AND `adminsession` = '1'");
|
||||
redirectTo('index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if(isset($_POST['id']))
|
||||
{
|
||||
$id = intval($_POST['id']);
|
||||
}
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
$id = intval($_GET['id']);
|
||||
}
|
||||
|
||||
$months = array(
|
||||
'0' => 'empty',
|
||||
'1' => 'jan',
|
||||
'2' => 'feb',
|
||||
'3' => 'mar',
|
||||
'4' => 'apr',
|
||||
'5' => 'may',
|
||||
'6' => 'jun',
|
||||
'7' => 'jul',
|
||||
'8' => 'aug',
|
||||
'9' => 'sep',
|
||||
'10' => 'oct',
|
||||
'11' => 'nov',
|
||||
'12' => 'dec',
|
||||
);
|
||||
|
||||
if($page == 'overview' || $page == 'customers')
|
||||
{
|
||||
if($action == 'su' && $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$id . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' "));
|
||||
|
||||
if($result['loginname'] != '')
|
||||
{
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$userinfo['userid'] . "'");
|
||||
$s = md5(uniqid(microtime(), 1));
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$id . "', '" . $db->escape($result['ipaddress']) . "', '" . $db->escape($result['useragent']) . "', '" . time() . "', '" . $db->escape($result['language']) . "', '0')");
|
||||
redirectTo('customer_traffic.php', Array(
|
||||
's' => $s
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
redirectTo('index.php', Array(
|
||||
'action' => 'login'
|
||||
));
|
||||
}
|
||||
}
|
||||
$customerview = 1;
|
||||
$stats_tables = '';
|
||||
$minyear = $db->query_first("SELECT `year` FROM `". TABLE_PANEL_TRAFFIC . "` ORDER BY `year` ASC LIMIT 1");
|
||||
if (!isset($minyear['year']) || $minyear['year'] == 0)
|
||||
{
|
||||
$maxyears = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$maxyears = date("Y") - $minyear['year'];
|
||||
}
|
||||
for($years = 0; $years<=$maxyears; $years++) {
|
||||
$overview['year'] = date("Y")-$years;
|
||||
$overview['type'] = $lng['traffic']['customer'];
|
||||
$domain_list = '';
|
||||
$customer_name_list = $db->query("SELECT `customerid`,`company`,`name`,`firstname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `deactivated`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY name");
|
||||
$totals = array(
|
||||
'jan' => 0,
|
||||
'feb' => 0,
|
||||
'mar' => 0,
|
||||
'apr' => 0,
|
||||
'may' => 0,
|
||||
'jun' => 0,
|
||||
'jul' => 0,
|
||||
'aug' => 0,
|
||||
'sep' => 0,
|
||||
'oct' => 0,
|
||||
'nov' => 0,
|
||||
'dec' => 0,
|
||||
);
|
||||
while($customer_name = $db->fetch_array($customer_name_list)) {
|
||||
$virtual_host = array(
|
||||
'name' => ($customer_name['company'] == '' ? $customer_name['name'] . ", " . $customer_name['firstname'] : $customer_name['company']),
|
||||
'customerid' => $customer_name['customerid'],
|
||||
'jan' => '-',
|
||||
'feb' => '-',
|
||||
'mar' => '-',
|
||||
'apr' => '-',
|
||||
'may' => '-',
|
||||
'jun' => '-',
|
||||
'jul' => '-',
|
||||
'aug' => '-',
|
||||
'sep' => '-',
|
||||
'oct' => '-',
|
||||
'nov' => '-',
|
||||
'dec' => '-',
|
||||
);
|
||||
|
||||
$traffic_list = $db->query("SELECT month, SUM(http+ftp_up+ftp_down+mail)*1024 AS traffic FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE year = " . (date("Y")-$years) . " AND `customerid` = '" . $customer_name['customerid'] . "' GROUP BY month ORDER BY month");
|
||||
while($traffic_month = $db->fetch_array($traffic_list)) {
|
||||
$virtual_host[$months[(int)$traffic_month['month']]] = size_readable($traffic_month['traffic'], 'GiB', 'bi', '%01.'.(int)$settings['panel']['decimal_places'].'f %s');
|
||||
$totals[$months[(int)$traffic_month['month']]] += $traffic_month['traffic'];
|
||||
}
|
||||
eval("\$domain_list .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
|
||||
}
|
||||
// sum up totals
|
||||
$virtual_host = array(
|
||||
'name' => $lng['traffic']['months']['total'],
|
||||
);
|
||||
foreach($totals as $month => $bytes) {
|
||||
$virtual_host[$month] = ($bytes == 0 ? '-' : size_readable($bytes, 'GiB', 'bi', '%01.'.(int)$settings['panel']['decimal_places'].'f %s'));
|
||||
}
|
||||
$customerview = 0;
|
||||
eval("\$total_list = sprintf(\"%s\", \"" . getTemplate("traffic/index_table_row") . "\");");
|
||||
eval("\$stats_tables .= sprintf(\"%s\", \"" . getTemplate("traffic/index_table") . "\");");
|
||||
}
|
||||
eval("echo \"" . getTemplate("traffic/index") . "\";");
|
||||
}
|
||||
@@ -12,14 +12,13 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
require ("./lib/init.php");
|
||||
require('./lib/init.php');
|
||||
|
||||
if($page == 'overview')
|
||||
{
|
||||
if ($page == 'overview') {
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_updates");
|
||||
|
||||
/**
|
||||
@@ -29,13 +28,13 @@ if($page == 'overview')
|
||||
*/
|
||||
if (!isFroxlor()) {
|
||||
if (!isset($settings['panel']['version'])
|
||||
|| $settings['panel']['version'] == ''
|
||||
|| $settings['panel']['version'] == ''
|
||||
) {
|
||||
$settings['panel']['version'] = '1.4.2.1';
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel','version','".$settings['panel']['version']."')");
|
||||
}
|
||||
if (!isset($settings['system']['dbversion'])
|
||||
|| $settings['system']['dbversion'] == ''
|
||||
|| $settings['system']['dbversion'] == ''
|
||||
) {
|
||||
/**
|
||||
* for syscp-stable (1.4.2.1) this value has to be 0
|
||||
@@ -43,11 +42,9 @@ if($page == 'overview')
|
||||
* and the svn-version has its value in the database
|
||||
* -> bug #54
|
||||
*/
|
||||
|
||||
$result = $db->query_first("SELECT `value` FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `varname` = 'dbversion'");
|
||||
|
||||
if(isset($result['value']))
|
||||
{
|
||||
|
||||
if (isset($result['value'])) {
|
||||
$settings['system']['dbversion'] = (int)$result['value'];
|
||||
} else {
|
||||
$settings['system']['dbversion'] = 0;
|
||||
@@ -55,46 +52,60 @@ if($page == 'overview')
|
||||
}
|
||||
}
|
||||
|
||||
if(hasUpdates($version))
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if (hasUpdates($version)) {
|
||||
$successful_update = false;
|
||||
$message = '';
|
||||
|
||||
eval("echo \"" . getTemplate("update/update_start") . "\";");
|
||||
|
||||
include_once('./install/updatesql.php');
|
||||
|
||||
$redirect_url = 'admin_index.php';
|
||||
eval("echo \"" . getTemplate("update/update_end") . "\";");
|
||||
|
||||
updateCounters();
|
||||
inserttask('1');
|
||||
@chmod('./lib/userdata.inc.php', 0440);
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
if ((isset($_POST['update_preconfig'])
|
||||
&& isset($_POST['update_changesagreed'])
|
||||
&& intval($_POST['update_changesagreed']) != 0)
|
||||
|| !isset($_POST['update_preconfig'])
|
||||
) {
|
||||
eval("echo \"" . getTemplate('update/update_start') . "\";");
|
||||
|
||||
include_once './install/updatesql.php';
|
||||
|
||||
$redirect_url = 'admin_index.php?s=' . $s;
|
||||
eval("echo \"" . getTemplate('update/update_end') . "\";");
|
||||
|
||||
updateCounters();
|
||||
inserttask('1');
|
||||
@chmod('./lib/userdata.inc.php', 0440);
|
||||
|
||||
$successful_update = true;
|
||||
} else {
|
||||
$message = '<br /><strong style="color: red">You have to agree that you have read the update notifications.</strong>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (!$successful_update) {
|
||||
$current_version = $settings['panel']['version'];
|
||||
$new_version = $version;
|
||||
|
||||
$ui_text = $lng['update']['update_information'];
|
||||
$ui_text = $lng['update']['update_information']['part_a'];
|
||||
$ui_text = str_replace('%curversion', $current_version, $ui_text);
|
||||
$ui_text = str_replace('%newversion', $new_version, $ui_text);
|
||||
$update_information = $ui_text;
|
||||
|
||||
eval("echo \"" . getTemplate("update/index") . "\";");
|
||||
include_once './install/updates/preconfig.php';
|
||||
$preconfig = getPreConfig($current_version);
|
||||
if ($preconfig != '') {
|
||||
$update_information .= '<br />' . $preconfig . $message;
|
||||
}
|
||||
|
||||
$update_information .= $lng['update']['update_information']['part_b'];
|
||||
|
||||
eval("echo \"" . getTemplate('update/index') . "\";");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
/*
|
||||
* @TODO version-webcheck check here
|
||||
*/
|
||||
|
||||
$success_message = $lng['update']['noupdatesavail'];
|
||||
$redirect_url = 'admin_index.php';
|
||||
eval("echo \"" . getTemplate("update/noupdatesavail") . "\";");
|
||||
$redirect_url = 'admin_index.php?s=' . $s;
|
||||
eval("echo \"" . getTemplate('update/noupdatesavail') . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
1
cache/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*
|
||||
0
cache/.keep
vendored
Normal file
5
css/jquery-ui.min.css
vendored
Normal file
1
css/jquery.jqplot.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.jqplot-target{position:relative;color:#666;font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;font-size:1em}.jqplot-axis{font-size:.75em}.jqplot-xaxis{margin-top:10px}.jqplot-x2axis{margin-bottom:10px}.jqplot-yaxis{margin-right:10px}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis,.jqplot-yMidAxis{margin-left:10px;margin-right:10px}.jqplot-axis-tick,.jqplot-xaxis-tick,.jqplot-yaxis-tick,.jqplot-x2axis-tick,.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick,.jqplot-yMidAxis-tick{position:absolute;white-space:pre}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom}.jqplot-yaxis-tick{right:0;top:15px;text-align:right}.jqplot-yaxis-tick.jqplot-breakTick{right:-20px;margin-right:0;padding:1px 5px 1px 5px;z-index:2;font-size:1.5em}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left}.jqplot-yMidAxis-tick{text-align:center;white-space:nowrap}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute}.jqplot-yaxis-label{margin-right:10px;font-size:11pt;position:absolute}.jqplot-yMidAxis-label{font-size:11pt;position:absolute}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;margin-left:10px;position:absolute}.jqplot-meterGauge-tick{font-size:.75em;color:#999}.jqplot-meterGauge-label{font-size:1em;color:#999}table.jqplot-table-legend{margin-top:12px;margin-bottom:12px;margin-left:12px;margin-right:12px}table.jqplot-table-legend,table.jqplot-cursor-legend{background-color:rgba(255,255,255,0.6);border:1px solid #ccc;position:absolute;font-size:.75em}td.jqplot-table-legend{vertical-align:middle}td.jqplot-seriesToggle:hover,td.jqplot-seriesToggle:active{cursor:pointer}.jqplot-table-legend .jqplot-series-hidden{text-decoration:line-through}div.jqplot-table-legend-swatch-outline{border:1px solid #ccc;padding:1px}div.jqplot-table-legend-swatch{width:0;height:0;border-top-width:5px;border-bottom-width:5px;border-left-width:6px;border-right-width:6px;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em}.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-highlighter-tooltip,.jqplot-canvasOverlay-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px}.jqplot-point-label{font-size:.75em;z-index:2}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em}.jqplot-error{text-align:center}.jqplot-error-message{position:relative;top:46%;display:inline-block}div.jqplot-bubble-label{font-size:.8em;padding-left:2px;padding-right:2px;color:rgb(20%,20%,20%)}div.jqplot-bubble-label.jqplot-bubble-label-highlight{background:rgba(90%,90%,90%,0.7)}div.jqplot-noData-container{text-align:center;background-color:rgba(96%,96%,96%,0.3)}
|
||||
@@ -14,21 +14,21 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
// Required code
|
||||
|
||||
define('AREA', 'customer');
|
||||
require ("./lib/init.php");
|
||||
require ('./lib/init.php');
|
||||
|
||||
$Id = 0;
|
||||
if (isset($_GET['id'])) {
|
||||
$Id = (int)$_GET['id'];
|
||||
}
|
||||
if (isset($_POST['id'])) {
|
||||
$Id = (int)$_POST['id'];
|
||||
}
|
||||
|
||||
if(isset($_GET['id']))$Id = (int)$_GET['id'];
|
||||
|
||||
if(isset($_POST['id']))$Id = (int)$_POST['id'];
|
||||
eval("echo \"" . getTemplate("aps/header") . "\";");
|
||||
eval("echo \"" . getTemplate('aps/header') . "\";");
|
||||
$Aps = new ApsParser($userinfo, $settings, $db);
|
||||
$Aps->MainHandler($action);
|
||||
eval("echo \"" . getTemplate("aps/footer") . "\";");
|
||||
|
||||
?>
|
||||
eval("echo \"" . getTemplate('aps/footer') . "\";");
|
||||
|
||||
@@ -14,67 +14,55 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
// Required code
|
||||
|
||||
define('AREA', 'customer');
|
||||
require ("./lib/init.php");
|
||||
require('./lib/init.php');
|
||||
|
||||
// Create new autoresponder
|
||||
|
||||
if($action == "add")
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if ($action == 'add') {
|
||||
// Create new autoresponder
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
$account = trim($_POST['account']);
|
||||
$subject = trim($_POST['subject']);
|
||||
$message = trim($_POST['message']);
|
||||
|
||||
|
||||
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
|
||||
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
|
||||
|
||||
|
||||
/*
|
||||
* @TODO validate date (DD-MM-YYYY)
|
||||
*/
|
||||
* @TODO validate date (DD-MM-YYYY)
|
||||
*/
|
||||
$ts_from = -1;
|
||||
$ts_until = -1;
|
||||
|
||||
if($date_from_off > -1)
|
||||
{
|
||||
if ($date_from_off > -1) {
|
||||
$date_from = $_POST['date_from'];
|
||||
$ts_from = mktime(0, 0, 0, substr($date_from, 3, 2), substr($date_from, 0, 2), substr($date_from, 6, 4));
|
||||
}
|
||||
if($date_until_off > -1)
|
||||
{
|
||||
if ($date_until_off > -1) {
|
||||
$date_until = $_POST['date_until'];
|
||||
$ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4));
|
||||
}
|
||||
|
||||
if(empty($account)
|
||||
if (empty($account)
|
||||
|| empty($subject)
|
||||
|| empty($message))
|
||||
{
|
||||
|| empty($message)
|
||||
) {
|
||||
standard_error('missingfields');
|
||||
}
|
||||
|
||||
// Does account exist?
|
||||
|
||||
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
|
||||
|
||||
if($db->num_rows($result) == 0)
|
||||
{
|
||||
if ($db->num_rows($result) == 0) {
|
||||
standard_error('accountnotexisting');
|
||||
}
|
||||
|
||||
// Does autoresponder exist?
|
||||
|
||||
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
|
||||
|
||||
if($db->num_rows($result) == 1)
|
||||
{
|
||||
if ($db->num_rows($result) == 1) {
|
||||
standard_error('autoresponderalreadyexists');
|
||||
}
|
||||
|
||||
@@ -87,102 +75,87 @@ if($action == "add")
|
||||
`subject` = '" . $db->escape($subject) . "',
|
||||
`customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
|
||||
");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_autoresponder_used` = `email_autoresponder_used` + 1 WHERE `customerid` = '" . $db->escape((int)$userinfo['customerid']). "'");
|
||||
redirectTo($filename, Array('s' => $s));
|
||||
}
|
||||
|
||||
// Get accounts
|
||||
|
||||
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` NOT IN (SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "`) ORDER BY email ASC");
|
||||
|
||||
if($db->num_rows($result) == 0)
|
||||
{
|
||||
if ($db->num_rows($result) == 0) {
|
||||
standard_error('noemailaccount');
|
||||
}
|
||||
|
||||
$accounts = '';
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$accounts.= "<option value=\"" . $row['email'] . "\">" . $row['email'] . "</option>";
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
$accounts .= '<option value="' . $row['email'] . '">' . $row['email'] . '</option>';
|
||||
}
|
||||
|
||||
|
||||
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||
$date_until_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||
|
||||
eval("echo \"" . getTemplate("email/autoresponder_add") . "\";");
|
||||
}
|
||||
//$isactive = makeyesno('active', '1', '0', '1');
|
||||
|
||||
// Edit autoresponder
|
||||
$autoresponder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_add.php';
|
||||
$autoresponder_add_form = htmlform::genHTMLForm($autoresponder_add_data);
|
||||
|
||||
else
|
||||
$title = $autoresponder_add_data['autoresponder_add']['title'];
|
||||
$image = $autoresponder_add_data['autoresponder_add']['image'];
|
||||
|
||||
if($action == "edit")
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
eval("echo \"" . getTemplate('autoresponder/autoresponder_add') . "\";");
|
||||
} elseif ($action == 'edit') {
|
||||
// Edit autoresponder
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
$account = trim($_POST['account']);
|
||||
$subject = trim($_POST['subject']);
|
||||
$message = trim($_POST['message']);
|
||||
|
||||
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
|
||||
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
|
||||
|
||||
|
||||
/*
|
||||
* @TODO validate date (DD-MM-YYYY)
|
||||
*/
|
||||
* @TODO validate date (DD-MM-YYYY)
|
||||
*/
|
||||
$ts_from = -1;
|
||||
$ts_until = -1;
|
||||
|
||||
if($date_from_off > -1)
|
||||
{
|
||||
if ($date_from_off > -1) {
|
||||
$date_from = $_POST['date_from'];
|
||||
$ts_from = mktime(0, 0, 0, substr($date_from, 3, 2), substr($date_from, 0, 2), substr($date_from, 6, 4));
|
||||
}
|
||||
if($date_until_off > -1)
|
||||
{
|
||||
if ($date_until_off > -1) {
|
||||
$date_until = $_POST['date_until'];
|
||||
$ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4));
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($account)
|
||||
if (empty($account)
|
||||
|| empty($subject)
|
||||
|| empty($message))
|
||||
{
|
||||
|| empty($message)
|
||||
) {
|
||||
standard_error('missingfields');
|
||||
}
|
||||
|
||||
// Does account exist?
|
||||
|
||||
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
|
||||
|
||||
if($db->num_rows($result) == 0)
|
||||
if ($db->num_rows($result) == 0)
|
||||
{
|
||||
standard_error('accountnotexisting');
|
||||
}
|
||||
|
||||
// Does autoresponder exist?
|
||||
|
||||
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
|
||||
|
||||
if($db->num_rows($result) == 0)
|
||||
{
|
||||
if ($db->num_rows($result) == 0) {
|
||||
standard_error('invalidautoresponder');
|
||||
}
|
||||
|
||||
$ResponderActive = 0;
|
||||
|
||||
if(isset($_POST['active'])
|
||||
&& $_POST['active'] == '1')
|
||||
{
|
||||
$ResponderActive = 1;
|
||||
}
|
||||
$ResponderActive = (isset($_POST['active']) && $_POST['active'] == '1') ? 1 : 0;
|
||||
|
||||
$db->query("UPDATE `" . TABLE_MAIL_AUTORESPONDER . "`
|
||||
SET `message` = '" . $db->escape($message) . "',
|
||||
`enabled` = '" . (int)$ResponderActive . "',
|
||||
`date_from` = '" . (int)$ts_from . "',
|
||||
`date_until` = '" . (int)$ts_until . "',
|
||||
`date_until` = '" . (int)$ts_until . "',
|
||||
`subject` = '" . $db->escape($subject) . "'
|
||||
WHERE `email` = '" . $db->escape($account) . "'
|
||||
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
|
||||
@@ -193,71 +166,55 @@ if($action == "edit")
|
||||
$email = trim(htmlspecialchars($_GET['email']));
|
||||
|
||||
// Get account data
|
||||
|
||||
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($email) . "' LIMIT 0,1");
|
||||
|
||||
if($db->num_rows($result) == 0)
|
||||
{
|
||||
if ($db->num_rows($result) == 0) {
|
||||
standard_error('invalidautoresponder');
|
||||
}
|
||||
|
||||
$row = $db->fetch_array($result);
|
||||
$subject = htmlspecialchars($row['subject']);
|
||||
$message = htmlspecialchars($row['message']);
|
||||
|
||||
|
||||
$date_from = (int)$row['date_from'];
|
||||
$date_until = (int)$row['date_until'];
|
||||
|
||||
if($date_from == -1)
|
||||
{
|
||||
|
||||
if ($date_from == -1) {
|
||||
$deactivated = '-1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$date_from = '';
|
||||
} else {
|
||||
$deactivated = '0';
|
||||
$date_from = date('d-m-Y', $date_from);
|
||||
}
|
||||
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||
|
||||
if($date_until == -1)
|
||||
{
|
||||
|
||||
if ($date_until == -1) {
|
||||
$deactivated = '-1';
|
||||
$date_until = '-1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$date_until = '';
|
||||
} else {
|
||||
$deactivated = '0';
|
||||
$date_until = date('d-m-Y', $date_until);
|
||||
}
|
||||
$date_from_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||
|
||||
$checked = '';
|
||||
//$isactive = makeyesno('active', '1', '0', $row['enabled']);
|
||||
|
||||
if($row['enabled'] == 1)
|
||||
{
|
||||
$checked = "checked=\"checked\"";
|
||||
}
|
||||
$autoresponder_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_edit.php';
|
||||
$autoresponder_edit_form = htmlform::genHTMLForm($autoresponder_edit_data);
|
||||
|
||||
eval("echo \"" . getTemplate("email/autoresponder_edit") . "\";");
|
||||
}
|
||||
$title = $autoresponder_edit_data['autoresponder_edit']['title'];
|
||||
$image = $autoresponder_edit_data['autoresponder_edit']['image'];
|
||||
|
||||
// Delete autoresponder
|
||||
|
||||
else
|
||||
|
||||
if($action == "delete")
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
eval("echo \"" . getTemplate('autoresponder/autoresponder_edit') . "\";");
|
||||
} elseif ($action == 'delete') {
|
||||
// Delete autoresponder
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
$account = trim($_POST['account']);
|
||||
|
||||
// Does autoresponder exist?
|
||||
|
||||
$result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1");
|
||||
|
||||
if($db->num_rows($result) == 0)
|
||||
{
|
||||
if ($db->num_rows($result) == 0) {
|
||||
standard_error('invalidautoresponder');
|
||||
}
|
||||
|
||||
@@ -265,42 +222,31 @@ if($action == "delete")
|
||||
WHERE `email` = '" . $db->escape($account) . "'
|
||||
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
|
||||
");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_autoresponder_used` = `email_autoresponder_used` - 1 WHERE `customerid` = '" . $db->escape((int)$userinfo['customerid']). "'");
|
||||
redirectTo($filename, Array('s' => $s));
|
||||
}
|
||||
|
||||
$email = trim(htmlspecialchars($_GET['email']));
|
||||
ask_yesno('autoresponderdelete', $filename, array('action' => $action, 'account' => $email));
|
||||
}
|
||||
|
||||
// List existing autoresponders
|
||||
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// List existing autoresponders
|
||||
$autoresponder = '';
|
||||
$count = 0;
|
||||
$result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' ORDER BY email ASC");
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if($row['date_from'] == -1 && $row['date_until'] == -1)
|
||||
{
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
if ($row['date_from'] == -1 && $row['date_until'] == -1) {
|
||||
$activated_date = $lng['panel']['not_activated'];
|
||||
}
|
||||
elseif($row['date_from'] == -1 && $row['date_until'] != -1)
|
||||
{
|
||||
} elseif($row['date_from'] == -1 && $row['date_until'] != -1) {
|
||||
$activated_date = $lng['autoresponder']['date_until'].': '.date('d-m-Y', $row['date_until']);
|
||||
}
|
||||
elseif($row['date_from'] != -1 && $row['date_until'] == -1)
|
||||
{
|
||||
} elseif($row['date_from'] != -1 && $row['date_until'] == -1) {
|
||||
$activated_date = $lng['autoresponder']['date_from'].': '.date('d-m-Y', $row['date_from']);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$activated_date = date('d-m-Y', $row['date_from']) . ' - ' . date('d-m-Y', $row['date_until']);
|
||||
}
|
||||
eval("\$autoresponder.=\"" . getTemplate("email/autoresponder_autoresponder") . "\";");
|
||||
}
|
||||
eval("\$autoresponder.=\"" . getTemplate('autoresponder/autoresponder_autoresponder') . "\";");
|
||||
$count++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("email/autoresponder") . "\";");
|
||||
eval("echo \"" . getTemplate('autoresponder/autoresponder') . "\";");
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -45,9 +45,7 @@ elseif($page == 'domains')
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_domains::domains");
|
||||
$fields = array(
|
||||
'd.domain' => $lng['domains']['domainname'],
|
||||
'd.documentroot' => $lng['panel']['path'],
|
||||
'd.aliasdomain' => $lng['domains']['aliasdomain']
|
||||
'd.domain' => $lng['domains']['domainname']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_DOMAINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`caneditdomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `ad`.`id` AS `aliasdomainid`, `ad`.`domain` AS `aliasdomain`, `da`.`id` AS `domainaliasid`, `da`.`domain` AS `domainalias` FROM `" . TABLE_PANEL_DOMAINS . "` `d` LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id` LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `da` ON `da`.`aliasdomain`=`d`.`id` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`email_only`='0' AND `d`.`id` <> " . (int)$userinfo['standardsubdomain'] . " " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
@@ -68,22 +66,39 @@ elseif($page == 'domains')
|
||||
$row['domainalias'] = $idna_convert->decode($row['domainalias']);
|
||||
|
||||
if($row['parentdomainid'] == '0'
|
||||
&& $row['iswildcarddomain'] != '1'
|
||||
&& $row['caneditdomain'] == '1')
|
||||
{
|
||||
$parentdomains_count++;
|
||||
}
|
||||
|
||||
$domains_count++;
|
||||
$domainparts = explode('.', $row['domain']);
|
||||
$domainparts = array_reverse($domainparts);
|
||||
$sortkey = '';
|
||||
foreach($domainparts as $key => $part)
|
||||
{
|
||||
$sortkey.= $part . '.';
|
||||
/**
|
||||
* check for set ssl-certs to show different state-icons
|
||||
*/
|
||||
// nothing (ssl_global)
|
||||
$row['domain_hascert'] = 0;
|
||||
$ssl_result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` WHERE `domainid`='".(int)$row['id']."';");
|
||||
if (is_array($ssl_result)
|
||||
&& isset($ssl_result['ssl_cert_file'])
|
||||
&& $ssl_result['ssl_cert_file'] != ''
|
||||
) {
|
||||
// own certificate (ssl_customer_green)
|
||||
$row['domain_hascert'] = 1;
|
||||
} else {
|
||||
// check if it's parent has one set (shared)
|
||||
if ($row['parentdomainid'] != 0) {
|
||||
$ssl_result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` WHERE `domainid`='".(int)$row['parentdomainid']."';");
|
||||
if (is_array($ssl_result)
|
||||
&& isset($ssl_result['ssl_cert_file'])
|
||||
&& $ssl_result['ssl_cert_file'] != ''
|
||||
) {
|
||||
// parent has a certificate (ssl_shared)
|
||||
$row['domain_hascert'] = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$domain_array[$sortkey] = $row;
|
||||
$domains_count++;
|
||||
$domain_array[$row['domain']] = $row;
|
||||
}
|
||||
|
||||
ksort($domain_array);
|
||||
@@ -125,6 +140,11 @@ elseif($page == 'domains')
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
$row = htmlentities_array($domain_array[$sortkey]);
|
||||
if($settings['system']['awstats_enabled'] == '1') {
|
||||
$statsapp = 'awstats';
|
||||
} else {
|
||||
$statsapp = 'webalizer';
|
||||
}
|
||||
eval("\$domains.=\"" . getTemplate("domains/domains_delimiter") . "\";");
|
||||
|
||||
if($paging->sortfield == 'd.domain'
|
||||
@@ -145,6 +165,14 @@ elseif($page == 'domains')
|
||||
$row['documentroot'] = makeCorrectDir(substr($row['documentroot'], strlen($userinfo['documentroot'])));
|
||||
}
|
||||
|
||||
// get ssl-ips if activated
|
||||
$show_ssledit = false;
|
||||
if ($settings['system']['use_ssl'] == '1'
|
||||
&& domainHasSslIpPort($row['id'])
|
||||
&& $row['caneditdomain'] == '1'
|
||||
) {
|
||||
$show_ssledit = true;
|
||||
}
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$domains.=\"" . getTemplate("domains/domains_domain") . "\";");
|
||||
}
|
||||
@@ -178,11 +206,22 @@ elseif($page == 'domains')
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* check for APS packages used with this domain, #110
|
||||
*/
|
||||
if(domainHasApsInstances($id))
|
||||
{
|
||||
standard_error('domains_cantdeletedomainwithapsinstances');
|
||||
}
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted subdomain '" . $idna_convert->decode($result['domain']) . "'");
|
||||
$result = $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`-1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
inserttask('1');
|
||||
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
@@ -205,17 +244,19 @@ elseif($page == 'domains')
|
||||
{
|
||||
$subdomain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['subdomain'], 'subdomain', '', 'subdomainiswrong')));
|
||||
$domain = $idna_convert->encode($_POST['domain']);
|
||||
$domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' ");
|
||||
$domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ");
|
||||
$completedomain = $subdomain . '.' . $domain;
|
||||
$completedomain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($completedomain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `email_only`='0' AND `caneditdomain` = '1'");
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
$aliasdomain_check = array(
|
||||
'id' => 0
|
||||
);
|
||||
$_doredirect = false;
|
||||
|
||||
if($aliasdomain != 0)
|
||||
{
|
||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||
{
|
||||
// also check ip/port combination to be the same, #176
|
||||
$aliasdomain_check = $db->query_first("SELECT `d`.`id` FROM `" . TABLE_PANEL_DOMAINS . "` `d` , `" . TABLE_PANEL_CUSTOMERS . "` `c` , `".TABLE_DOMAINTOIP."` `dip` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id` = '".(int)$aliasdomain."' AND `c`.`standardsubdomain` <> `d`.`id` AND `d`.`customerid` = '" . (int)$userinfo['customerid'] . "' AND `c`.`customerid` = `d`.`customerid` AND `d`.`id` = `dip`.`id_domain` AND `dip`.`id_ipandports` IN (SELECT `id_ipandports` FROM `".TABLE_DOMAINTOIP."` WHERE `id_domain` = '".(int)$aliasdomain."') GROUP BY `d`.`domain` ORDER BY `d`.`domain` ASC;");
|
||||
}
|
||||
|
||||
if(isset($_POST['url'])
|
||||
@@ -223,6 +264,7 @@ elseif($page == 'domains')
|
||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||
{
|
||||
$path = $_POST['url'];
|
||||
$_doredirect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -232,8 +274,25 @@ elseif($page == 'domains')
|
||||
if(!preg_match('/^https?\:\/\//', $path)
|
||||
|| !validateUrl($idna_convert->encode($path)))
|
||||
{
|
||||
$path = $userinfo['documentroot'] . '/' . $path;
|
||||
$path = makeCorrectDir($path);
|
||||
// If path is empty or '/' and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
|
||||
// set default path to subdomain or domain name
|
||||
if((($path == '') || ($path == '/'))
|
||||
&& $settings['system']['documentroot_use_default_value'] == 1)
|
||||
{
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $completedomain);
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
}
|
||||
if (strstr($path, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_doredirect = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['openbasedir_path'])
|
||||
@@ -286,17 +345,51 @@ elseif($page == 'domains')
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`customerid`, `domain`, `documentroot`, `ipandport`, `aliasdomain`, `parentdomainid`, `isemaildomain`, `openbasedir`, `openbasedir_path`, `safemode`, `speciallogfile`, `specialsettings`, `ssl_redirect`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($completedomain) . "', '" . $db->escape($path) . "', '" . $db->escape($domain_check['ipandport']) . "', " . (($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") . ", '" . (int)$domain_check['id'] . "', '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "', '" . $db->escape($domain_check['openbasedir']) . "', '" . $db->escape($openbasedir_path) . "', '" . $db->escape($domain_check['safemode']) . "', '" . $db->escape($domain_check['speciallogfile']) . "', '" . $db->escape($domain_check['specialsettings']) . "', '" . $ssl_redirect . "')");
|
||||
// get the phpsettingid from parentdomain, #107
|
||||
$phpsid_result = $db->query_first("SELECT `phpsettingid` FROM `".TABLE_PANEL_DOMAINS."` WHERE `id` = '".(int)$domain_check['id']."'");
|
||||
if(!isset($phpsid_result['phpsettingid'])
|
||||
|| (int)$phpsid_result['phpsettingid'] <= 0
|
||||
) {
|
||||
// assign default config
|
||||
$phpsid_result['phpsettingid'] = 1;
|
||||
}
|
||||
|
||||
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET
|
||||
`customerid` = '" . (int)$userinfo['customerid'] . "',
|
||||
`domain` = '" . $db->escape($completedomain) . "',
|
||||
`documentroot` = '" . $db->escape($path) . "',
|
||||
`aliasdomain` = ".(($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") .",
|
||||
`parentdomainid` = '" . (int)$domain_check['id'] . "',
|
||||
`isemaildomain` = '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "',
|
||||
`openbasedir` = '" . $db->escape($domain_check['openbasedir']) . "',
|
||||
`openbasedir_path` = '" . $db->escape($openbasedir_path) . "',
|
||||
`speciallogfile` = '" . $db->escape($domain_check['speciallogfile']) . "',
|
||||
`specialsettings` = '" . $db->escape($domain_check['specialsettings']) . "',
|
||||
`ssl_redirect` = '" . $ssl_redirect . "',
|
||||
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
|
||||
|
||||
$result = $db->query("INSERT INTO `".TABLE_DOMAINTOIP."` (`id_domain`, `id_ipandports`) SELECT LAST_INSERT_ID(), `id_ipandports` FROM `".TABLE_DOMAINTOIP."` WHERE `id_domain` = '" . (int)$domain_check['id'] . "';");
|
||||
|
||||
if($_doredirect)
|
||||
{
|
||||
$did = $db->insert_id();
|
||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : $settings['customredirect']['default'];
|
||||
addRedirectToDomain($did, $redirect);
|
||||
}
|
||||
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
||||
inserttask('1');
|
||||
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC");
|
||||
$result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC");
|
||||
$domains = '';
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
@@ -312,9 +405,32 @@ elseif($page == 'domains')
|
||||
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$redirectcode = '';
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $settings['customredirect']['default']);
|
||||
}
|
||||
}
|
||||
|
||||
// check if we at least have one ssl-ip/port, #1179
|
||||
$ssl_ipsandports = '';
|
||||
$resultX = $db->query_first("SELECT COUNT(*) as countSSL FROM `panel_ipsandports` WHERE `ssl`='1'");
|
||||
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
|
||||
$ssl_ipsandports = 'notempty';
|
||||
}
|
||||
|
||||
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
|
||||
$subdomain_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_add.php';
|
||||
$subdomain_add_form = htmlform::genHTMLForm($subdomain_add_data);
|
||||
|
||||
$title = $subdomain_add_data['domain_add']['title'];
|
||||
$image = $subdomain_add_data['domain_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -322,9 +438,10 @@ elseif($page == 'domains')
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path` ,`pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`wwwserveralias`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir`, `d`.`openbasedir_path`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
|
||||
$alias_check = $alias_check['count'];
|
||||
$_doredirect = false;
|
||||
|
||||
if(isset($result['customerid'])
|
||||
&& $result['customerid'] == $userinfo['customerid'])
|
||||
@@ -337,6 +454,7 @@ elseif($page == 'domains')
|
||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||
{
|
||||
$path = $_POST['url'];
|
||||
$_doredirect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -346,30 +464,37 @@ elseif($page == 'domains')
|
||||
if(!preg_match('/^https?\:\/\//', $path)
|
||||
|| !validateUrl($idna_convert->encode($path)))
|
||||
{
|
||||
$path = $userinfo['documentroot'] . '/' . $path;
|
||||
$path = makeCorrectDir($path);
|
||||
// If path is empty or '/' and 'Use domain name as default value for DocumentRoot path' is enabled in settings,
|
||||
// set default path to subdomain or domain name
|
||||
if((($path == '') || ($path == '/'))
|
||||
&& $settings['system']['documentroot_use_default_value'] == 1)
|
||||
{
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $result['domain']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
}
|
||||
if (strstr($path, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_doredirect = true;
|
||||
}
|
||||
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
|
||||
if(isset($_POST['iswildcarddomain'])
|
||||
&& $_POST['iswildcarddomain'] == '1'
|
||||
if(isset($_POST['selectserveralias'])
|
||||
&& $result['parentdomainid'] == '0'
|
||||
&& $userinfo['subdomains'] != '0')
|
||||
{
|
||||
$wildcarddomaincheck = $db->query("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid` = '" . (int)$result['id'] . "'");
|
||||
|
||||
if($db->num_rows($wildcarddomaincheck) != '0')
|
||||
{
|
||||
standard_error('firstdeleteallsubdomains');
|
||||
exit;
|
||||
}
|
||||
|
||||
$iswildcarddomain = '1';
|
||||
}
|
||||
else
|
||||
{
|
||||
) {
|
||||
$iswildcarddomain = ($_POST['selectserveralias'] == '0') ? '1' : '0';
|
||||
$wwwserveralias = ($_POST['selectserveralias'] == '1') ? '1' : '0';
|
||||
} else {
|
||||
$iswildcarddomain = '0';
|
||||
$wwwserveralias = '0';
|
||||
}
|
||||
|
||||
if($result['parentdomainid'] != '0'
|
||||
@@ -431,17 +556,36 @@ elseif($page == 'domains')
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "automatically deleted mail-table entries for '" . $idna_convert->decode($result['domain']) . "'");
|
||||
}
|
||||
|
||||
if($_doredirect)
|
||||
{
|
||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : false;
|
||||
updateRedirectOfDomain($id, $redirect);
|
||||
}
|
||||
|
||||
if($path != $result['documentroot']
|
||||
|| $isemaildomain != $result['isemaildomain']
|
||||
|| $wwwserveralias != $result['wwwserveralias']
|
||||
|| $iswildcarddomain != $result['iswildcarddomain']
|
||||
|| $aliasdomain != $result['aliasdomain']
|
||||
|| $openbasedir_path != $result['openbasedir_path']
|
||||
|| $ssl_redirect != $result['ssl_redirect'])
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited domain '" . $idna_convert->decode($result['domain']) . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot`='" . $db->escape($path) . "', `isemaildomain`='" . (int)$isemaildomain . "', `iswildcarddomain`='" . (int)$iswildcarddomain . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",`openbasedir_path`='" . $db->escape($openbasedir_path) . "', `ssl_redirect`='" . $ssl_redirect . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET
|
||||
`documentroot`='" . $db->escape($path) . "',
|
||||
`isemaildomain`='" . (int)$isemaildomain . "',
|
||||
`wwwserveralias`='" . (int)$wwwserveralias . "',
|
||||
`iswildcarddomain`='" . (int)$iswildcarddomain . "',
|
||||
`aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",
|
||||
`openbasedir_path`='" . $db->escape($openbasedir_path) . "',
|
||||
`ssl_redirect`='" . $ssl_redirect . "'
|
||||
WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'"
|
||||
);
|
||||
inserttask('1');
|
||||
|
||||
// Using nameserver, insert a task which rebuilds the server config
|
||||
inserttask('4');
|
||||
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
@@ -450,8 +594,10 @@ elseif($page == 'domains')
|
||||
else
|
||||
{
|
||||
$result['domain'] = $idna_convert->decode($result['domain']);
|
||||
|
||||
$domains = makeoption($lng['domains']['noaliasdomain'], 0, $result['aliasdomain'], true);
|
||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC");
|
||||
// also check ip/port combination to be the same, #176
|
||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d` , `" . TABLE_PANEL_CUSTOMERS . "` `c` , `".TABLE_DOMAINTOIP."` `dip` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id` <> '".(int)$result['id']."' AND `c`.`standardsubdomain` <> `d`.`id` AND `d`.`customerid` = '" . (int)$userinfo['customerid'] . "' AND `c`.`customerid` = `d`.`customerid` AND `d`.`id` = `dip`.`id_domain` AND `dip`.`id_ipandports` IN (SELECT `id_ipandports` FROM `".TABLE_DOMAINTOIP."` WHERE `id_domain` = '".(int)$result['id']."') GROUP BY `d`.`domain` ORDER BY `d`.`domain` ASC");
|
||||
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
@@ -460,10 +606,17 @@ elseif($page == 'domains')
|
||||
|
||||
if(preg_match('/^https?\:\/\//', $result['documentroot'])
|
||||
&& validateUrl($idna_convert->encode($result['documentroot']))
|
||||
&& $settings['panel']['pathedit'] == 'Dropdown')
|
||||
{
|
||||
$urlvalue = $result['documentroot'];
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
) {
|
||||
if($settings['panel']['pathedit'] == 'Dropdown')
|
||||
{
|
||||
$urlvalue = $result['documentroot'];
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$urlvalue = '';
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot'], true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -471,15 +624,52 @@ elseif($page == 'domains')
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
||||
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||
$redirectcode = '';
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$def_code = getDomainRedirectId($id);
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $def_code);
|
||||
}
|
||||
}
|
||||
|
||||
// check if we at least have one ssl-ip/port, #1179
|
||||
$ssl_ipsandports = '';
|
||||
$resultX = $db->query_first("SELECT COUNT(*) as countSSL FROM `panel_ipsandports` WHERE `ssl`='1'");
|
||||
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
|
||||
$ssl_ipsandports = 'notempty';
|
||||
}
|
||||
|
||||
$openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true);
|
||||
|
||||
// create serveralias options
|
||||
$serveraliasoptions = "";
|
||||
$_value = '2';
|
||||
if ($result['iswildcarddomain'] == '1') {
|
||||
$_value = '0';
|
||||
} elseif ($result['wwwserveralias'] == '1') {
|
||||
$_value = '1';
|
||||
}
|
||||
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_wildcard'], '0', $_value, true, true);
|
||||
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_www'], '1', $_value, true, true);
|
||||
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_none'], '2', $_value, true, true);
|
||||
|
||||
$resultips = $db->query("SELECT `p`.`ip` AS `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` `p` LEFT JOIN `".TABLE_DOMAINTOIP."` `dip` ON ( `dip`.`id_ipandports` = `p`.`id` ) WHERE `dip`.`id_domain` = '".(int)$result['id']."' GROUP BY `p`.`ip`");
|
||||
$result_ipandport['ip'] = '';
|
||||
while ($rowip = $db->fetch_array($resultips)) {
|
||||
$result_ipandport['ip'] .= $rowip['ip'] . "<br />";
|
||||
}
|
||||
|
||||
$domainip = $result_ipandport['ip'];
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
if($settings['system']['use_ssl'] == "1")
|
||||
{
|
||||
}
|
||||
$subdomain_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_edit.php';
|
||||
$subdomain_edit_form = htmlform::genHTMLForm($subdomain_edit_data);
|
||||
|
||||
$title = $subdomain_edit_data['domain_edit']['title'];
|
||||
$image = $subdomain_edit_data['domain_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
|
||||
}
|
||||
@@ -490,5 +680,126 @@ elseif($page == 'domains')
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($page == 'domainssleditor') {
|
||||
|
||||
?>
|
||||
if ($action == ''
|
||||
|| $action == 'view'
|
||||
) {
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
|
||||
$ssl_cert_file = isset($_POST['ssl_cert_file']) ? $_POST['ssl_cert_file'] : '';
|
||||
$ssl_key_file = isset($_POST['ssl_key_file']) ? $_POST['ssl_key_file'] : '';
|
||||
$ssl_ca_file = isset($_POST['ssl_ca_file']) ? $_POST['ssl_ca_file'] : '';
|
||||
$ssl_cert_chainfile = isset($_POST['ssl_cert_chainfile']) ? $_POST['ssl_cert_chainfile'] : '';
|
||||
$do_insert = isset($_POST['do_insert']) ? (($_POST['do_insert'] == 1) ? true : false) : false;
|
||||
|
||||
if ($ssl_cert_file != '' && $ssl_key_file == '') {
|
||||
standard_error('sslcertificateismissingprivatekey');
|
||||
}
|
||||
|
||||
$do_verify = true;
|
||||
|
||||
// no cert-file given -> forget everything
|
||||
if ($ssl_cert_file == '') {
|
||||
$ssl_key_file = '';
|
||||
$ssl_ca_file = '';
|
||||
$ssl_cert_chainfile = '';
|
||||
$do_verify = false;
|
||||
}
|
||||
|
||||
// verify certificate content
|
||||
if ($do_verify) {
|
||||
// array openssl_x509_parse ( mixed $x509cert [, bool $shortnames = true ] )
|
||||
// openssl_x509_parse() returns information about the supplied x509cert, including fields such as
|
||||
// subject name, issuer name, purposes, valid from and valid to dates etc.
|
||||
$cert_content = openssl_x509_parse($ssl_cert_file);
|
||||
|
||||
if (is_array($cert_content)
|
||||
&& isset($cert_content['subject'])
|
||||
&& isset($cert_content['subject']['CN'])
|
||||
) {
|
||||
// TODO self-signed certs might differ and don't need/want this
|
||||
/*
|
||||
$domain = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAINS."` WHERE `id`='".(int)$id."'");
|
||||
if (strtolower($cert_content['subject']['CN']) != strtolower($idna_convert->decode($domain['domain']))) {
|
||||
standard_error('sslcertificatewrongdomain');
|
||||
}
|
||||
*/
|
||||
|
||||
// bool openssl_x509_check_private_key ( mixed $cert , mixed $key )
|
||||
// Checks whether the given key is the private key that corresponds to cert.
|
||||
if (openssl_x509_check_private_key($ssl_cert_file, $ssl_key_file) === false) {
|
||||
standard_error('sslcertificateinvalidcertkeypair');
|
||||
}
|
||||
|
||||
// check optional stuff
|
||||
if ($ssl_ca_file != '') {
|
||||
$ca_content = openssl_x509_parse($ssl_ca_file);
|
||||
if (!is_array($ca_content)) {
|
||||
// invalid
|
||||
standard_error('sslcertificateinvalidca');
|
||||
}
|
||||
}
|
||||
if ($ssl_cert_chainfile != '') {
|
||||
$chain_content = openssl_x509_parse($ssl_cert_chainfile);
|
||||
if (!is_array($chain_content)) {
|
||||
// invalid
|
||||
standard_error('sslcertificateinvalidchain');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
standard_error('sslcertificateinvalidcert');
|
||||
}
|
||||
}
|
||||
|
||||
// Add/Update database entry
|
||||
$qrystart = "UPDATE ";
|
||||
$qrywhere = "WHERE ";
|
||||
if ($do_insert) {
|
||||
$qrystart = "INSERT INTO ";
|
||||
$qrywhere = ", ";
|
||||
}
|
||||
$db->query($qrystart." `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."` SET
|
||||
`ssl_cert_file` = '".$db->escape($ssl_cert_file)."',
|
||||
`ssl_key_file` = '".$db->escape($ssl_key_file)."',
|
||||
`ssl_ca_file` = '".$db->escape($ssl_ca_file)."',
|
||||
`ssl_cert_chainfile` = '".$db->escape($ssl_cert_chainfile)."'
|
||||
".$qrywhere." `domainid`='".(int)$id."';"
|
||||
);
|
||||
|
||||
// insert task to re-generate webserver-configs (#1260)
|
||||
inserttask('1');
|
||||
|
||||
// back to domain overview
|
||||
redirectTo($filename, array('page' => 'domains', 's' => $s));
|
||||
}
|
||||
|
||||
$result = $db->query_first("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."`
|
||||
WHERE `domainid`='".(int)$id."';"
|
||||
);
|
||||
|
||||
$do_insert = false;
|
||||
// if no entry can be found, behave like we have empty values
|
||||
if (!is_array($result) || !isset($result['ssl_cert_file'])) {
|
||||
$result = array(
|
||||
'ssl_cert_file' => '',
|
||||
'ssl_key_file' => '',
|
||||
'ssl_ca_file' => '',
|
||||
'ssl_cert_chainfile' => ''
|
||||
);
|
||||
$do_insert = true;
|
||||
}
|
||||
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$ssleditor_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domain_ssleditor.php';
|
||||
$ssleditor_form = htmlform::genHTMLForm($ssleditor_data);
|
||||
|
||||
$title = $ssleditor_data['domain_ssleditor']['title'];
|
||||
$image = $ssleditor_data['domain_ssleditor']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domain_ssleditor") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -50,7 +50,7 @@ elseif($page == 'emails')
|
||||
'm.destination' => $lng['emails']['forwarders']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_MAIL_VIRTUAL, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query('SELECT `m`.`id`, `m`.`domainid`, `m`.`email`, `m`.`email_full`, `m`.`iscatchall`, `u`.`quota`, `m`.`destination`, `m`.`popaccountid`, `d`.`domain` FROM `' . TABLE_MAIL_VIRTUAL . '` `m` LEFT JOIN `' . TABLE_PANEL_DOMAINS . '` `d` ON (`m`.`domainid` = `d`.`id`) LEFT JOIN `' . TABLE_MAIL_USERS . '` `u` ON (`m`.`popaccountid` = `u`.`id`) WHERE `m`.`customerid`="' . $db->escape($userinfo['customerid']) . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query('SELECT `m`.`id`, `m`.`domainid`, `m`.`email`, `m`.`email_full`, `m`.`iscatchall`, `u`.`quota`, `m`.`destination`, `m`.`popaccountid`, `d`.`domain`, `u`.`mboxsize` FROM `' . TABLE_MAIL_VIRTUAL . '` `m` LEFT JOIN `' . TABLE_PANEL_DOMAINS . '` `d` ON (`m`.`domainid` = `d`.`id`) LEFT JOIN `' . TABLE_MAIL_USERS . '` `u` ON (`m`.`popaccountid` = `u`.`id`) WHERE `m`.`customerid`="' . $db->escape($userinfo['customerid']) . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -66,6 +66,7 @@ elseif($page == 'emails')
|
||||
$emails[$row['domain']] = array();
|
||||
}
|
||||
|
||||
$row['mboxsize'] = size_readable($row['mboxsize']);
|
||||
$emails[$row['domain']][$row['email_full']] = $row;
|
||||
}
|
||||
|
||||
@@ -139,8 +140,10 @@ elseif($page == 'emails')
|
||||
}
|
||||
}
|
||||
|
||||
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
||||
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
||||
$emaildomains_count = $emaildomains_count['count'];
|
||||
|
||||
$emailscount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("email/emails") . "\";");
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
@@ -182,6 +185,12 @@ elseif($page == 'emails')
|
||||
$number_forwarders = 0;
|
||||
}
|
||||
|
||||
if(isset($_POST['delete_userfiles'])
|
||||
&& (int)$_POST['delete_userfiles'] == 1)
|
||||
{
|
||||
inserttask('7', $userinfo['loginname'], $result['email_full']);
|
||||
}
|
||||
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `emails_used`=`emails_used` - 1 , `email_forwarders_used` = `email_forwarders_used` - " . (int)$number_forwarders . " $update_users_query_addon WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted email address '" . $result['email'] . "'");
|
||||
@@ -189,7 +198,12 @@ elseif($page == 'emails')
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno('email_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
||||
if(maildirExists($result)) {
|
||||
$show_checkbox = true;
|
||||
} else {
|
||||
$show_checkbox = false;
|
||||
}
|
||||
ask_yesno_withcheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']), $show_checkbox);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,7 +238,7 @@ elseif($page == 'emails')
|
||||
standard_error('emailiswrong', $email_full);
|
||||
}
|
||||
|
||||
$email_check = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE ( `email`='" . $db->escape($email) . "' OR `email_full` = '" . $db->escape($email_full) . "' ) AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$email_check = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE (`email` = '" . strtolower($db->escape($email)) . "' OR `email_full` = '" . strtolower($db->escape($email_full)) . "') AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
if($email == ''
|
||||
|| $email_full == ''
|
||||
@@ -240,7 +254,7 @@ elseif($page == 'emails')
|
||||
{
|
||||
standard_error('maindomainnonexist', $domain);
|
||||
}
|
||||
elseif($email_check['email_full'] == $email_full)
|
||||
elseif(strtolower($email_check['email_full']) == strtolower($email_full))
|
||||
{
|
||||
standard_error('emailexistalready', $email_full);
|
||||
}
|
||||
@@ -268,7 +282,20 @@ elseif($page == 'emails')
|
||||
$domains.= makeoption($idna_convert->decode($row['domain']), $row['domain']);
|
||||
}
|
||||
|
||||
$iscatchall = makeyesno('iscatchall', '1', '0', '0');
|
||||
//$iscatchall = makeyesno('iscatchall', '1', '0', '0');
|
||||
|
||||
$email_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_add.php';
|
||||
|
||||
if ( $settings['catchall']['catchall_enabled'] != '1' )
|
||||
{
|
||||
unset($email_add_data['emails_add']['sections']['section_a']['fields']['iscatchall']);
|
||||
}
|
||||
|
||||
$email_add_form = htmlform::genHTMLForm($email_add_data);
|
||||
|
||||
$title = $email_add_data['emails_add']['title'];
|
||||
$image = $email_add_data['emails_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("email/emails_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -308,40 +335,60 @@ elseif($page == 'emails')
|
||||
|
||||
$destinations_count = count($result['destination']);
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$email_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_edit.php';
|
||||
|
||||
if ( $settings['catchall']['catchall_enabled'] != '1' )
|
||||
{
|
||||
unset($email_edit_data['emails_edit']['sections']['section_a']['fields']['mail_catchall']);
|
||||
}
|
||||
|
||||
$email_edit_form = htmlform::genHTMLForm($email_edit_data);
|
||||
|
||||
$title = $email_edit_data['emails_edit']['title'];
|
||||
$image = $email_edit_data['emails_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("email/emails_edit") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'togglecatchall'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid`, `popaccountid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
|
||||
if(isset($result['email'])
|
||||
&& $result['email'] != '')
|
||||
if ( $settings['catchall']['catchall_enabled'] == '1' )
|
||||
{
|
||||
if($result['iscatchall'] == '1')
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `email` = '" . $db->escape($result['email_full']) . "', `iscatchall` = '0' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['id'] . "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$email_parts = explode('@', $result['email_full']);
|
||||
$email = '@' . $email_parts[1];
|
||||
$email_check = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `email`='" . $db->escape($email) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$result = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid`, `popaccountid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
|
||||
if($email_check['email'] == $email)
|
||||
if(isset($result['email'])
|
||||
&& $result['email'] != '')
|
||||
{
|
||||
if($result['iscatchall'] == '1')
|
||||
{
|
||||
standard_error('youhavealreadyacatchallforthisdomain');
|
||||
exit;
|
||||
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `email` = '" . $db->escape($result['email_full']) . "', `iscatchall` = '0' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['id'] . "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `email` = '$email' , `iscatchall` = '1' WHERE `customerid`='" . $userinfo['customerid'] . "' AND `id`='" . $result['id'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited email address '" . $email . "'");
|
||||
}
|
||||
}
|
||||
$email_parts = explode('@', $result['email_full']);
|
||||
$email = '@' . $email_parts[1];
|
||||
$email_check = $db->query_first("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid` FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `email`='" . $db->escape($email) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||
if($email_check['email'] == $email)
|
||||
{
|
||||
standard_error('youhavealreadyacatchallforthisdomain');
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `email` = '$email' , `iscatchall` = '1' WHERE `customerid`='" . $userinfo['customerid'] . "' AND `id`='" . $result['id'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited email address '" . $email . "'");
|
||||
}
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error(array('operationnotpermitted', 'featureisdisabled'), 'Catchall');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -372,6 +419,7 @@ elseif($page == 'accounts')
|
||||
$email_full = $result['email_full'];
|
||||
$username = $idna_convert->decode($email_full);
|
||||
$password = validate($_POST['email_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
if($settings['panel']['sendalternativemail'] == 1)
|
||||
{
|
||||
@@ -411,11 +459,42 @@ elseif($page == 'accounts')
|
||||
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_MAIL_USERS . "` (`customerid`, `email`, `username`, " . ($settings['system']['mailpwcleartext'] == '1' ? '`password`, ' : '') . " `password_enc`, `homedir`, `maildir`, `uid`, `gid`, `domainid`, `postfix`, `quota`, `imap`, `pop3`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($email_full) . "', '" . $db->escape($username) . "', " . ($settings['system']['mailpwcleartext'] == '1' ? "'" . $db->escape($password) . "'," : '') . " ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($settings['system']['vmail_homedir']) . "', '" . $db->escape($userinfo['loginname'] . '/' . $email_full . '/') . "', '" . (int)$settings['system']['vmail_uid'] . "', '" . (int)$settings['system']['vmail_gid'] . "', '" . (int)$result['domainid'] . "', 'y', '" . (int)$quota . "', '" . (int)$userinfo['imap'] . "', '" . (int)$userinfo['pop3'] . "')");
|
||||
$cryptPassword = makeCryptPassword($password);
|
||||
|
||||
$email_user=substr($email_full,0,strrpos($email_full,"@"));
|
||||
$email_domain=substr($email_full,strrpos($email_full,"@")+1);
|
||||
$maildirname=trim($settings['system']['vmail_maildirname']);
|
||||
// Add trailing slash to Maildir if needed
|
||||
$maildirpath=$maildirname;
|
||||
if (!empty($maildirname) and substr($maildirname,-1) != "/") $maildirpath.="/";
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_MAIL_USERS .
|
||||
"` (`customerid`, `email`, `username`, " . ($settings['system']['mailpwcleartext'] == '1' ? '`password`, ' : '') . " `password_enc`, `homedir`, `maildir`, `uid`, `gid`, `domainid`, `postfix`, `quota`, `imap`, `pop3`) ".
|
||||
"VALUES (".
|
||||
"'" . (int)$userinfo['customerid'] . "', ".
|
||||
"'" . $db->escape($email_full) . "', ".
|
||||
"'" . $db->escape($username) . "', " .
|
||||
($settings['system']['mailpwcleartext'] == '1' ? "'" . $db->escape($password) . "', " : '') .
|
||||
"'" . $db->escape($cryptPassword) . "', ".
|
||||
"'" . $db->escape($settings['system']['vmail_homedir']) . "', '" . $db->escape($userinfo['loginname'] . '/' . $email_domain . "/" . $email_user . "/" . $maildirpath) . "', ".
|
||||
"'" . (int)$settings['system']['vmail_uid'] . "', ".
|
||||
"'" . (int)$settings['system']['vmail_gid'] . "', ".
|
||||
"'" . (int)$result['domainid'] . "', ".
|
||||
"'y', ".
|
||||
"'" . (int)$quota . "', ".
|
||||
"'" . (int)$userinfo['imap'] . "', ".
|
||||
"'" . (int)$userinfo['pop3'] . "')");
|
||||
|
||||
$popaccountid = $db->insert_id();
|
||||
$result['destination'].= ' ' . $email_full;
|
||||
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `destination` = '" . $db->escape(makeCorrectDestination($result['destination'])) . "', `popaccountid` = '" . (int)$popaccountid . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_accounts_used`=`email_accounts_used`+1, `email_quota_used`=`email_quota_used`+" . (int)$quota . " WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET ".
|
||||
"`destination` = '" . $db->escape(makeCorrectDestination($result['destination'])) . "', ".
|
||||
"`popaccountid` = '" . (int)$popaccountid . "' ".
|
||||
"WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET ".
|
||||
"`email_accounts_used`=`email_accounts_used`+1, ".
|
||||
"`email_quota_used`=`email_quota_used`+" . (int)$quota . " ".
|
||||
"WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added email account for '" . $email_full . "'");
|
||||
$replace_arr = array(
|
||||
'EMAIL' => $email_full,
|
||||
@@ -434,7 +513,7 @@ elseif($page == 'accounts')
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($email_full, getCorrectUserSalutation($userinfo));
|
||||
$mail->AddAddress($email_full);
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
@@ -446,7 +525,7 @@ elseif($page == 'accounts')
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $email);
|
||||
standard_error('errorsendingmail', $email_full);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
@@ -491,6 +570,13 @@ elseif($page == 'accounts')
|
||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||
$result = htmlentities_array($result);
|
||||
$quota = $settings['system']['mail_quota'];
|
||||
|
||||
$account_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addaccount.php';
|
||||
$account_add_form = htmlform::genHTMLForm($account_add_data);
|
||||
|
||||
$title = $account_add_data['emails_addaccount']['title'];
|
||||
$image = $account_add_data['emails_addaccount']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("email/account_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -518,17 +604,25 @@ elseif($page == 'accounts')
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed email password for '" . $result['email_full'] . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'");
|
||||
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||
}
|
||||
|
||||
$password = validatePassword($password);
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed email password for '" . $result['email_full'] . "'");
|
||||
$cryptPassword = makeCryptPassword($password);
|
||||
$result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'");
|
||||
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$account_changepw_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php';
|
||||
$account_changepw_form = htmlform::genHTMLForm($account_changepw_data);
|
||||
|
||||
$title = $account_changepw_data['emails_accountchangepasswd']['title'];
|
||||
$image = $account_changepw_data['emails_accountchangepasswd']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("email/account_changepw") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -570,6 +664,13 @@ elseif($page == 'accounts')
|
||||
{
|
||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$quota_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangequota.php';
|
||||
$quota_edit_form = htmlform::genHTMLForm($quota_edit_data);
|
||||
|
||||
$title = $quota_edit_data['emails_accountchangequota']['title'];
|
||||
$image = $quota_edit_data['emails_accountchangequota']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("email/account_changequota") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -599,13 +700,19 @@ elseif($page == 'accounts')
|
||||
$quota = 0;
|
||||
}
|
||||
|
||||
if(isset($_POST['delete_userfiles'])
|
||||
&& (int)$_POST['delete_userfiles'] == 1)
|
||||
{
|
||||
inserttask('7', $userinfo['loginname'], $result['email_full']);
|
||||
}
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_accounts_used` = `email_accounts_used` - 1, `email_quota_used` = `email_quota_used` - " . (int)$quota . " WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted email account for '" . $result['email_full'] . "'");
|
||||
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno('email_reallydelete_account', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
||||
ask_yesno_withcheckbox('email_reallydelete_account', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -658,6 +765,13 @@ elseif($page == 'forwarders')
|
||||
{
|
||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$forwarder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_addforwarder.php';
|
||||
$forwarder_add_form = htmlform::genHTMLForm($forwarder_add_data);
|
||||
|
||||
$title = $forwarder_add_data['emails_addforwarder']['title'];
|
||||
$image = $forwarder_add_data['emails_addforwarder']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("email/forwarder_add") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -39,6 +39,30 @@ if($page == 'overview')
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras");
|
||||
eval("echo \"" . getTemplate("extras/extras") . "\";");
|
||||
}
|
||||
elseif($page == 'backup')
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras_backup");
|
||||
|
||||
$result = $db->query("SELECT `backup_enabled` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$row = $db->fetch_array($result);
|
||||
|
||||
$backup_enabled = makeyesno('backup_enabled', '1', '0', $row['backup_enabled']);
|
||||
|
||||
if(isset($_POST['send']) && $_POST['send'] == 'send'){
|
||||
$backup_enabled = ($_POST['backup_enabled'] == '1' ? '1' : '0');
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `backup_enabled`='" . $backup_enabled . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
|
||||
$backup_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.backup.php';
|
||||
$backup_form = htmlform::genHTMLForm($backup_data);
|
||||
|
||||
$title = $backup_data['backup']['title'];
|
||||
$image = $backup_data['backup']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("extras/backup") . "\";");
|
||||
}
|
||||
elseif($page == 'htpasswds')
|
||||
{
|
||||
if($action == '')
|
||||
@@ -49,7 +73,7 @@ elseif($page == 'htpasswds')
|
||||
'path' => $lng['panel']['path']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_HTPASSWDS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -81,7 +105,7 @@ elseif($page == 'htpasswds')
|
||||
elseif($action == 'delete'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `id`, `customerid`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
|
||||
if(isset($result['username'])
|
||||
&& $result['username'] != '')
|
||||
@@ -114,6 +138,7 @@ elseif($page == 'htpasswds')
|
||||
$userpath = $path;
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
$username = validate($_POST['username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
||||
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
|
||||
validate($_POST['directory_password'], 'password');
|
||||
$username_path_check = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `username`='" . $db->escape($username) . "' AND `path`='" . $db->escape($path) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
@@ -151,7 +176,7 @@ elseif($page == 'htpasswds')
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` (`customerid`, `username`, `password`, `path`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($password) . "', '" . $db->escape($path) . "')");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` (`customerid`, `username`, `password`, `path`, `authname`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($password) . "', '" . $db->escape($path) . "', '" . $db->escape($authname) . "')");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added htpasswd for '" . $username . " (" . $path . ")'");
|
||||
inserttask('1');
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
@@ -160,13 +185,20 @@ elseif($page == 'htpasswds')
|
||||
else
|
||||
{
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
|
||||
$htpasswd_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_add.php';
|
||||
$htpasswd_add_form = htmlform::genHTMLForm($htpasswd_add_data);
|
||||
|
||||
$title = $htpasswd_add_data['htpasswd_add']['title'];
|
||||
$image = $htpasswd_add_data['htpasswd_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("extras/htpasswds_add") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `id`, `username`, `path` FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
|
||||
if(isset($result['username'])
|
||||
&& $result['username'] != '')
|
||||
@@ -175,6 +207,7 @@ elseif($page == 'htpasswds')
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
validate($_POST['directory_password'], 'password');
|
||||
$authname = validate($_POST['directory_authname'], 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/');
|
||||
|
||||
if(CRYPT_STD_DES == 1)
|
||||
{
|
||||
@@ -186,13 +219,25 @@ elseif($page == 'htpasswds')
|
||||
$password = crypt($_POST['directory_password']);
|
||||
}
|
||||
|
||||
if($_POST['directory_password'] == '')
|
||||
$pwd_sql = '';
|
||||
if($_POST['directory_password'] != '')
|
||||
{
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
$pwd_sql = "`password`='" . $db->escape($password) . "' ";
|
||||
}
|
||||
else
|
||||
|
||||
$auth_sql = '';
|
||||
if($authname != $result['authname'])
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `password`='" . $db->escape($password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$auth_sql = "`authname`='" . $db->escape($authname) . "' ";
|
||||
}
|
||||
|
||||
if($pwd_sql != '' || $auth_sql != '')
|
||||
{
|
||||
if($pwd_sql !='' && $auth_sql != '') {
|
||||
$pwd_sql.= ', ';
|
||||
}
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET ".$pwd_sql.$auth_sql." WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited htpasswd for '" . $result['username'] . " (" . $result['path'] . ")'");
|
||||
inserttask('1');
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
@@ -206,6 +251,13 @@ elseif($page == 'htpasswds')
|
||||
}
|
||||
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$htpasswd_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htpasswd_edit.php';
|
||||
$htpasswd_edit_form = htmlform::genHTMLForm($htpasswd_edit_data);
|
||||
|
||||
$title = $htpasswd_edit_data['htpasswd_edit']['title'];
|
||||
$image = $htpasswd_edit_data['htpasswd_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("extras/htpasswds_edit") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -221,10 +273,11 @@ elseif($page == 'htaccess')
|
||||
'options_indexes' => $lng['extras']['view_directory'],
|
||||
'error404path' => $lng['extras']['error404path'],
|
||||
'error403path' => $lng['extras']['error403path'],
|
||||
'error500path' => $lng['extras']['error500path']
|
||||
'error500path' => $lng['extras']['error500path'],
|
||||
'options_cgi' => $lng['extras']['execute_perl']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_HTACCESS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query("SELECT `id`, `path`, `options_indexes`, `error404path`, `error403path`, `error500path` FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -234,6 +287,8 @@ elseif($page == 'htaccess')
|
||||
$count = 0;
|
||||
$htaccess = '';
|
||||
|
||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
@@ -241,10 +296,14 @@ elseif($page == 'htaccess')
|
||||
if(strpos($row['path'], $userinfo['documentroot']) === 0)
|
||||
{
|
||||
$row['path'] = substr($row['path'], strlen($userinfo['documentroot']));
|
||||
// don't show nothing wehn it's the docroot, show slash
|
||||
if ($row['path'] == '') { $row['path'] = '/'; }
|
||||
}
|
||||
|
||||
$row['options_indexes'] = str_replace('1', $lng['panel']['yes'], $row['options_indexes']);
|
||||
$row['options_indexes'] = str_replace('0', $lng['panel']['no'], $row['options_indexes']);
|
||||
$row['options_cgi'] = str_replace('1', $lng['panel']['yes'], $row['options_cgi']);
|
||||
$row['options_cgi'] = str_replace('0', $lng['panel']['no'], $row['options_cgi']);
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$htaccess.=\"" . getTemplate("extras/htaccess_htaccess") . "\";");
|
||||
$count++;
|
||||
@@ -293,34 +352,27 @@ elseif($page == 'htaccess')
|
||||
standard_error('invalidpath');
|
||||
}
|
||||
|
||||
if(($_POST['error404path'] === '')
|
||||
|| (validateUrl($idna_convert->encode($_POST['error404path']))))
|
||||
{
|
||||
$error404path = $_POST['error404path'];
|
||||
if(isset($_POST['options_cgi'])
|
||||
&& (int)$_POST['options_cgi'] != 0
|
||||
) {
|
||||
$options_cgi = '1';
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error('mustbeurl');
|
||||
}
|
||||
$options_cgi = '0';
|
||||
}
|
||||
|
||||
if(($_POST['error403path'] === '')
|
||||
|| (validateUrl($idna_convert->encode($_POST['error403path']))))
|
||||
{
|
||||
$error403path = $_POST['error403path'];
|
||||
$error404path = '';
|
||||
if (isset($_POST['error404path'])) {
|
||||
$error404path = correctErrorDocument($_POST['error404path']);
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error('mustbeurl');
|
||||
$error403path = '';
|
||||
if (isset($_POST['error403path'])) {
|
||||
$error403path = correctErrorDocument($_POST['error403path']);
|
||||
}
|
||||
|
||||
if(($_POST['error500path'] === '')
|
||||
|| (validateUrl($idna_convert->encode($_POST['error500path']))))
|
||||
{
|
||||
$error500path = $_POST['error500path'];
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error('mustbeurl');
|
||||
$error500path = '';
|
||||
if (isset($_POST['error500path'])) {
|
||||
$error500path = correctErrorDocument($_POST['error500path']);
|
||||
}
|
||||
|
||||
if($path_dupe_check['path'] == $path)
|
||||
@@ -333,7 +385,15 @@ elseif($page == 'htaccess')
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query('INSERT INTO `' . TABLE_PANEL_HTACCESS . '` (`customerid`, `path`, `options_indexes`, `error404path`, `error403path`, `error500path` ) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($path) . '", "' . $db->escape($_POST['options_indexes'] == '1' ? '1' : '0') . '", "' . $db->escape($error404path) . '", "' . $db->escape($error403path) . '", "' . $db->escape($error500path) . '" )');
|
||||
$db->query('INSERT INTO `' . TABLE_PANEL_HTACCESS . '` SET
|
||||
`customerid` = "'.(int)$userinfo['customerid'].'",
|
||||
`path` = "'.$db->escape($path).'",
|
||||
`options_indexes` = "'.$db->escape($_POST['options_indexes'] == '1' ? '1' : '0').'",
|
||||
`error404path` = "'.$db->escape($error404path).'",
|
||||
`error403path` = "'.$db->escape($error403path).'",
|
||||
`error500path` = "'.$db->escape($error500path).'",
|
||||
`options_cgi` = "'.$db->escape($options_cgi).'"');
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added htaccess for '" . $path . "'");
|
||||
inserttask('1');
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
@@ -342,7 +402,18 @@ elseif($page == 'htaccess')
|
||||
else
|
||||
{
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
$options_indexes = makeyesno('options_indexes', '1', '0', '1');
|
||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
||||
/*
|
||||
$options_indexes = makeyesno('options_indexes', '1', '0', '0');
|
||||
$options_cgi = makeyesno('options_cgi', '1', '0', '0');
|
||||
*/
|
||||
|
||||
$htaccess_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_add.php';
|
||||
$htaccess_add_form = htmlform::genHTMLForm($htaccess_add_data);
|
||||
|
||||
$title = $htaccess_add_data['htaccess_add']['title'];
|
||||
$image = $htaccess_add_data['htaccess_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -359,49 +430,30 @@ elseif($page == 'htaccess')
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$option_indexes = intval($_POST['options_indexes']);
|
||||
$options_cgi = isset($_POST['options_cgi']) ? intval($_POST['options_cgi']) : 0;
|
||||
|
||||
if($option_indexes != '1')
|
||||
{
|
||||
$option_indexes = '0';
|
||||
}
|
||||
|
||||
if(($_POST['error404path'] === '')
|
||||
|| (validateUrl($idna_convert->encode($_POST['error404path']))))
|
||||
if($options_cgi != '1')
|
||||
{
|
||||
$error404path = $_POST['error404path'];
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error('mustbeurl');
|
||||
$options_cgi = '0';
|
||||
}
|
||||
|
||||
if(($_POST['error403path'] === '')
|
||||
|| (validateUrl($idna_convert->encode($_POST['error403path']))))
|
||||
{
|
||||
$error403path = $_POST['error403path'];
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error('mustbeurl');
|
||||
}
|
||||
|
||||
if(($_POST['error500path'] === '')
|
||||
|| (validateUrl($idna_convert->encode($_POST['error500path']))))
|
||||
{
|
||||
$error500path = $_POST['error500path'];
|
||||
}
|
||||
else
|
||||
{
|
||||
standard_error('mustbeurl');
|
||||
}
|
||||
$error404path = correctErrorDocument($_POST['error404path']);
|
||||
$error403path = correctErrorDocument($_POST['error403path']);
|
||||
$error500path = correctErrorDocument($_POST['error500path']);
|
||||
|
||||
if(($option_indexes != $result['options_indexes'])
|
||||
|| ($error404path != $result['error404path'])
|
||||
|| ($error403path != $result['error403path'])
|
||||
|| ($error500path != $result['error500path']))
|
||||
|| ($error500path != $result['error500path'])
|
||||
|| ($options_cgi != $result['options_cgi']))
|
||||
{
|
||||
inserttask('1');
|
||||
$db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `options_indexes` = "' . $db->escape($option_indexes) . '", `error404path` = "' . $db->escape($error404path) . '", `error403path` = "' . $db->escape($error403path) . '", `error500path` = "' . $db->escape($error500path) . '" WHERE `customerid` = "' . (int)$userinfo['customerid'] . '" AND `id` = "' . (int)$id . '"');
|
||||
$db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `options_indexes` = "' . $db->escape($option_indexes) . '", `error404path` = "' . $db->escape($error404path) . '", `error403path` = "' . $db->escape($error403path) . '", `error500path` = "' . $db->escape($error500path) . '", `options_cgi` = "' . $db->escape($options_cgi) . '" WHERE `customerid` = "' . (int)$userinfo['customerid'] . '" AND `id` = "' . (int)$id . '"');
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited htaccess for '" . str_replace($userinfo['documentroot'], '', $result['path']) . "'");
|
||||
}
|
||||
|
||||
@@ -412,13 +464,26 @@ elseif($page == 'htaccess')
|
||||
if(strpos($result['path'], $userinfo['documentroot']) === 0)
|
||||
{
|
||||
$result['path'] = substr($result['path'], strlen($userinfo['documentroot']));
|
||||
// don't show nothing wehn it's the docroot, show slash
|
||||
if ($result['path'] == '') { $result['path'] = '/'; }
|
||||
}
|
||||
|
||||
$result['error404path'] = $result['error404path'];
|
||||
$result['error403path'] = $result['error403path'];
|
||||
$result['error500path'] = $result['error500path'];
|
||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
||||
/*
|
||||
$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
|
||||
$options_cgi = makeyesno('options_cgi', '1', '0', $result['options_cgi']);
|
||||
*/
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$htaccess_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/extras/formfield.htaccess_edit.php';
|
||||
$htaccess_edit_form = htmlform::genHTMLForm($htaccess_edit_data);
|
||||
|
||||
$title = $htaccess_edit_data['htaccess_edit']['title'];
|
||||
$image = $htaccess_edit_data['htaccess_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("extras/htaccess_edit") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
325
customer_ftp.php
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -22,34 +22,27 @@ define('AREA', 'customer');
|
||||
/**
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
require('./lib/init.php');
|
||||
|
||||
require ("./lib/init.php");
|
||||
|
||||
if(isset($_POST['id']))
|
||||
{
|
||||
$id = 0;
|
||||
if (isset($_POST['id'])) {
|
||||
$id = intval($_POST['id']);
|
||||
}
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
} elseif(isset($_GET['id'])) {
|
||||
$id = intval($_GET['id']);
|
||||
}
|
||||
|
||||
if($page == 'overview')
|
||||
{
|
||||
if ($page == 'overview') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_ftp");
|
||||
eval("echo \"" . getTemplate("ftp/ftp") . "\";");
|
||||
}
|
||||
elseif($page == 'accounts')
|
||||
{
|
||||
if($action == '')
|
||||
{
|
||||
eval("echo \"" . getTemplate('ftp/ftp') . "\";");
|
||||
} elseif ($page == 'accounts') {
|
||||
if ($action == '') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_ftp::accounts");
|
||||
$fields = array(
|
||||
'username' => $lng['login']['username'],
|
||||
'homedir' => $lng['panel']['path']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_FTP_USERS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' AND `username` NOT LIKE '%_backup'" . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -59,23 +52,18 @@ elseif($page == 'accounts')
|
||||
$count = 0;
|
||||
$accounts = '';
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
if(strpos($row['homedir'], $userinfo['documentroot']) === 0)
|
||||
{
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
if ($paging->checkDisplay($i)) {
|
||||
if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
|
||||
$row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']));
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$row['documentroot'] = $row['homedir'];
|
||||
}
|
||||
|
||||
$row['documentroot'] = makeCorrectDir($row['documentroot']);
|
||||
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$accounts.=\"" . getTemplate("ftp/accounts_account") . "\";");
|
||||
eval("\$accounts.=\"" . getTemplate('ftp/accounts_account') . "\";");
|
||||
$count++;
|
||||
}
|
||||
|
||||
@@ -83,163 +71,246 @@ elseif($page == 'accounts')
|
||||
}
|
||||
|
||||
$ftps_count = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("ftp/accounts") . "\";");
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
&& $id != 0)
|
||||
{
|
||||
eval("echo \"" . getTemplate('ftp/accounts') . "\";");
|
||||
} elseif ($action == 'delete' && $id != 0) {
|
||||
$result = $db->query_first("SELECT `id`, `username`, `homedir`, `up_count`, `up_bytes`, `down_count`, `down_bytes` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
|
||||
if(isset($result['username'])
|
||||
&& $result['username'] != $userinfo['loginname'])
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if (isset($result['username'])
|
||||
&& $result['username'] != $userinfo['loginname']
|
||||
) {
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `up_count`=`up_count`+'" . (int)$result['up_count'] . "', `up_bytes`=`up_bytes`+'" . (int)$result['up_bytes'] . "', `down_count`=`down_count`+'" . (int)$result['down_count'] . "', `down_bytes`=`down_bytes`+'" . (int)$result['down_bytes'] . "' WHERE `username`='" . $db->escape($userinfo['loginname']) . "'");
|
||||
$result = $db->query_first("SELECT `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($result['username']) . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted ftp-account '" . $result['username'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=REPLACE(`members`,'," . $db->escape($result['username']) . "','') WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
// $db->query("DELETE FROM `".TABLE_FTP_GROUPS."` WHERE `customerid`='".$userinfo['customerid']."' AND `id`='$id'");
|
||||
$resetaccnumber = ($userinfo['ftps_used'] == '1') ? " , `ftp_lastaccountnumber`='0'" : '';
|
||||
|
||||
if($userinfo['ftps_used'] == '1')
|
||||
{
|
||||
$resetaccnumber = " , `ftp_lastaccountnumber`='0'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$resetaccnumber = '';
|
||||
// refs #293
|
||||
if (isset($_POST['delete_userfiles'])
|
||||
&& (int)$_POST['delete_userfiles'] == 1
|
||||
) {
|
||||
inserttask('8', $userinfo['loginname'], $result['homedir']);
|
||||
}
|
||||
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`-1 $resetaccnumber WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
} else {
|
||||
ask_yesno_withcheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno('ftp_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
standard_error('ftp_cantdeletemainaccount');
|
||||
}
|
||||
}
|
||||
elseif($action == 'add')
|
||||
{
|
||||
if($userinfo['ftps_used'] < $userinfo['ftps']
|
||||
|| $userinfo['ftps'] == '-1')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
} elseif ($action == 'add') {
|
||||
if ($userinfo['ftps_used'] < $userinfo['ftps']
|
||||
|| $userinfo['ftps'] == '-1'
|
||||
) {
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
// @FIXME use a good path-validating regex here (refs #1231)
|
||||
$path = validate($_POST['path'], 'path');
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
if($settings['customer']['ftpatdomain'] == '1')
|
||||
{
|
||||
$sendinfomail = isset($_POST['sendinfomail']) ? 1 : 0;
|
||||
if ($sendinfomail != 1) {
|
||||
$sendinfomail = 0;
|
||||
}
|
||||
|
||||
if ($settings['customer']['ftpatdomain'] == '1') {
|
||||
$ftpusername = validate($_POST['ftp_username'], 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/');
|
||||
if($ftpusername == '')
|
||||
{
|
||||
if ($ftpusername == '') {
|
||||
standard_error(array('stringisempty', 'username'));
|
||||
}
|
||||
$ftpdomain = $idna_convert->encode(validate($_POST['ftp_domain'], 'domain'));
|
||||
$ftpdomain_check = $db->query_first("SELECT `id`, `domain`, `customerid` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($ftpdomain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
if($ftpdomain_check['domain'] != $ftpdomain)
|
||||
{
|
||||
if ($ftpdomain_check['domain'] != $ftpdomain) {
|
||||
standard_error('maindomainnonexist', $domain);
|
||||
}
|
||||
$username = $ftpusername . "@" . $ftpdomain;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$username = $userinfo['loginname'] . $settings['customer']['ftpprefix'] . (intval($userinfo['ftp_lastaccountnumber']) + 1);
|
||||
}
|
||||
|
||||
$username_check = $db->query_first('SELECT * FROM `' . TABLE_FTP_USERS .'` WHERE `username` = \'' . $db->escape($username) . '\'');
|
||||
|
||||
if(!empty($username_check) && $username_check['username'] = $username)
|
||||
{
|
||||
if (!empty($username_check) && $username_check['username'] = $username) {
|
||||
standard_error('usernamealreadyexists', $username);
|
||||
}
|
||||
elseif($password == '')
|
||||
{
|
||||
} elseif ($password == '') {
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
}
|
||||
elseif($path == '')
|
||||
{
|
||||
} elseif ($path == '') {
|
||||
standard_error('patherror');
|
||||
}
|
||||
else
|
||||
{
|
||||
$userpath = makeCorrectDir($path);
|
||||
} else {
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($path) . "', 'y', '" . (int)$userinfo['guid'] . "', '" . (int)$userinfo['guid'] . "')");
|
||||
|
||||
$cryptPassword = makeCryptPassword($password);
|
||||
$db->query("INSERT INTO `" . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', '" . $db->escape($cryptPassword) . "', '" . $db->escape($path) . "', 'y', '" . (int)$userinfo['guid'] . "', '" . (int)$userinfo['guid'] . "')");
|
||||
$result = $db->query("SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $userinfo['loginname'] . "'");
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
$db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($username) . "', 'user', '" . $db->escape($row['bytes_in_used']) . "', '0', '0', '0', '0', '0')");
|
||||
}
|
||||
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
|
||||
|
||||
// $db->query("INSERT INTO `".TABLE_FTP_GROUPS."` (`customerid`, `groupname`, `gid`, `members`) VALUES ('".$userinfo['customerid']."', '$username', '$uid', '$username')");
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
// $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value`='$uid' WHERE settinggroup='ftp' AND varname='lastguid'");
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
|
||||
inserttask(5);
|
||||
|
||||
if ($sendinfomail == 1) {
|
||||
$replace_arr = array(
|
||||
'SALUTATION' => getCorrectUserSalutation($userinfo),
|
||||
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
|
||||
'USR_NAME' => $username,
|
||||
'USR_PASS' => $password,
|
||||
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
|
||||
);
|
||||
|
||||
$def_language = $userinfo['def_language'];
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_subject\'');
|
||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_subject']), $replace_arr));
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_mailbody\'');
|
||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_body']['main']), $replace_arr));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $userinfo['email']);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
} else {
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], '/');
|
||||
|
||||
if($settings['customer']['ftpatdomain'] == '1')
|
||||
{
|
||||
if ($settings['customer']['ftpatdomain'] == '1') {
|
||||
$domainlist = array();
|
||||
$domains = '';
|
||||
|
||||
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
|
||||
while ($row_domain = $db->fetch_array($result_domains)) {
|
||||
$domainlist[] = $row_domain['domain'];
|
||||
}
|
||||
|
||||
sort($domainlist);
|
||||
|
||||
if (isset($domainlist[0]) && $domainlist[0] != '') {
|
||||
foreach ($domainlist as $dom) {
|
||||
$domains .= makeoption($idna_convert->decode($dom), $dom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
|
||||
//$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
||||
|
||||
$ftp_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_add.php';
|
||||
$ftp_add_form = htmlform::genHTMLForm($ftp_add_data);
|
||||
|
||||
$title = $ftp_add_data['ftp_add']['title'];
|
||||
$image = $ftp_add_data['ftp_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate('ftp/accounts_add') . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
} elseif ($action == 'edit' && $id != 0) {
|
||||
$result = $db->query_first("SELECT `id`, `username`, `homedir`, `uid`, `gid` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
|
||||
if(isset($result['username'])
|
||||
&& $result['username'] != '')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
if (isset($result['username'])
|
||||
&& $result['username'] != ''
|
||||
) {
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
// @FIXME use a good path-validating regex here (refs #1231)
|
||||
$path = validate($_POST['path'], 'path');
|
||||
|
||||
$_setnewpass = false;
|
||||
if (isset($_POST['ftp_password']) && $_POST['ftp_password'] != '') {
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$_setnewpass = true;
|
||||
}
|
||||
|
||||
if($password == '')
|
||||
{
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
exit;
|
||||
if ($_setnewpass) {
|
||||
if ($password == '') {
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
exit;
|
||||
}
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'");
|
||||
$cryptPassword = makeCryptPassword($password);
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
|
||||
// also update customers backup user password if password of main ftp user is changed
|
||||
if(!preg_match('/' . $settings['customer']['ftpprefix'] . '/', $result['username'])){
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $result['username'] . "_backup'");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited ftp-account '" . $result['username'] . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
|
||||
if ($path != '') {
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
|
||||
if ($path != $result['homedir']) {
|
||||
if (!file_exists($path)) {
|
||||
// it's the task for "new ftp" but that will
|
||||
// create all directories and correct their permissions
|
||||
inserttask(5);
|
||||
}
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account homdir for '" . $result['username'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `homedir`= '" . $db->escape($path) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("echo \"" . getTemplate("ftp/accounts_edit") . "\";");
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
} else {
|
||||
if (strpos($result['homedir'], $userinfo['documentroot']) === 0) {
|
||||
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
|
||||
} else {
|
||||
$homedir = $result['homedir'];
|
||||
}
|
||||
$homedir = makeCorrectDir($homedir);
|
||||
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $homedir);
|
||||
|
||||
if ($settings['customer']['ftpatdomain'] == '1') {
|
||||
$domains = '';
|
||||
|
||||
$result_domains = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
while ($row_domain = $db->fetch_array($result_domains)) {
|
||||
$domains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['domain']);
|
||||
}
|
||||
}
|
||||
|
||||
$ftp_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_edit.php';
|
||||
$ftp_edit_form = htmlform::genHTMLForm($ftp_edit_data);
|
||||
|
||||
$title = $ftp_edit_data['ftp_edit']['title'];
|
||||
$image = $ftp_edit_data['ftp_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate('ftp/accounts_edit') . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -22,40 +22,32 @@ define('AREA', 'customer');
|
||||
/**
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
require('./lib/init.php');
|
||||
|
||||
require ("./lib/init.php");
|
||||
if ($action == 'logout') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, 'logged out');
|
||||
|
||||
if($action == 'logout')
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "logged out");
|
||||
|
||||
if($settings['session']['allow_multiple_login'] == '1')
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0' AND `hash` = '" . $s . "'");
|
||||
$query = "DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0'";
|
||||
if ($settings['session']['allow_multiple_login'] == '1') {
|
||||
$query .= " AND `hash` = '" . $s . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0'");
|
||||
}
|
||||
|
||||
$db->query($query);
|
||||
redirectTo('index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if($page == 'overview')
|
||||
{
|
||||
if ($page == 'overview') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_index");
|
||||
$domains = '';
|
||||
$result = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `id` <> '" . (int)$userinfo['standardsubdomain'] . "' ");
|
||||
$domainArray = array();
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
$domainArray[] = $idna_convert->decode($row['domain']);
|
||||
}
|
||||
|
||||
natsort($domainArray);
|
||||
$domains = implode(', ', $domainArray);
|
||||
$domains = implode(',<br />', $domainArray);
|
||||
$userinfo['email'] = $idna_convert->decode($userinfo['email']);
|
||||
$yesterday = time() - (60 * 60 * 24);
|
||||
$month = date('M Y', $yesterday);
|
||||
@@ -67,7 +59,7 @@ if($page == 'overview')
|
||||
$userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
|
||||
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains aps_packages');
|
||||
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps tickets subdomains aps_packages');
|
||||
$opentickets = 0;
|
||||
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
|
||||
WHERE `customerid` = "' . $userinfo['customerid'] . '"
|
||||
@@ -77,67 +69,49 @@ if($page == 'overview')
|
||||
$awaitingtickets = $opentickets['count'];
|
||||
$awaitingtickets_text = '';
|
||||
|
||||
if($opentickets > 0)
|
||||
{
|
||||
if ($opentickets > 0) {
|
||||
$awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '<a href="customer_tickets.php?page=tickets&s=' . $s . '">' . $opentickets['count'] . '</a>'));
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("index/index") . "\";");
|
||||
}
|
||||
elseif($page == 'change_password')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
eval("echo \"" . getTemplate('index/index') . "\";");
|
||||
} elseif ($page == 'change_password') {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$old_password = validate($_POST['old_password'], 'old password');
|
||||
|
||||
if(md5($old_password) != $userinfo['password'])
|
||||
{
|
||||
if (md5($old_password) != $userinfo['password']) {
|
||||
standard_error('oldpasswordnotcorrect');
|
||||
exit;
|
||||
}
|
||||
|
||||
$new_password = validate($_POST['new_password'], 'new password');
|
||||
$new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm');
|
||||
$new_password = validatePassword($_POST['new_password'], 'new password');
|
||||
$new_password_confirm = validatePassword($_POST['new_password_confirm'], 'new password confirm');
|
||||
|
||||
if($old_password == '')
|
||||
{
|
||||
if ($old_password == '') {
|
||||
standard_error(array('stringisempty', 'oldpassword'));
|
||||
}
|
||||
elseif($new_password == '')
|
||||
{
|
||||
} elseif($new_password == '') {
|
||||
standard_error(array('stringisempty', 'newpassword'));
|
||||
}
|
||||
elseif($new_password_confirm == '')
|
||||
{
|
||||
} elseif($new_password_confirm == '') {
|
||||
standard_error(array('stringisempty', 'newpasswordconfirm'));
|
||||
}
|
||||
elseif($new_password != $new_password_confirm)
|
||||
{
|
||||
} elseif($new_password != $new_password_confirm) {
|
||||
standard_error('newpasswordconfirmerror');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `password`='" . md5($new_password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `password`='" . md5($old_password) . "'");
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, 'changed password');
|
||||
|
||||
if(isset($_POST['change_main_ftp'])
|
||||
&& $_POST['change_main_ftp'] == 'true')
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($new_password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'");
|
||||
if (isset($_POST['change_main_ftp'])
|
||||
&& $_POST['change_main_ftp'] == 'true'
|
||||
) {
|
||||
$cryptPassword = makeCryptPassword($new_password);
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`='" . $db->escape($cryptPassword) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'");
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, 'changed main ftp password');
|
||||
}
|
||||
|
||||
if(isset($_POST['change_webalizer'])
|
||||
&& $_POST['change_webalizer'] == 'true')
|
||||
{
|
||||
if(CRYPT_STD_DES == 1)
|
||||
{
|
||||
if (isset($_POST['change_webalizer'])
|
||||
&& $_POST['change_webalizer'] == 'true'
|
||||
) {
|
||||
if (CRYPT_STD_DES == 1) {
|
||||
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);
|
||||
$new_webalizer_password = crypt($new_password, $saltfordescrypt);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$new_webalizer_password = crypt($new_password);
|
||||
}
|
||||
|
||||
@@ -146,39 +120,52 @@ elseif($page == 'change_password')
|
||||
|
||||
redirectTo($filename, Array('s' => $s));
|
||||
}
|
||||
} else {
|
||||
eval("echo \"" . getTemplate('index/change_password') . "\";");
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("echo \"" . getTemplate("index/change_password") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($page == 'change_language')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
} elseif ($page == 'change_language') {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
|
||||
if(isset($languages[$def_language]))
|
||||
{
|
||||
if (isset($languages[$def_language])) {
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `def_language`='" . $db->escape($def_language) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `language`='" . $db->escape($def_language) . "' WHERE `hash`='" . $db->escape($s) . "'");
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'");
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('s' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
$language_options = '';
|
||||
|
||||
while(list($language_file, $language_name) = each($languages))
|
||||
{
|
||||
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
|
||||
} else {
|
||||
$default_lang = $settings['panel']['standardlanguage'];
|
||||
if ($userinfo['def_language'] != '') {
|
||||
$default_lang = $userinfo['def_language'];
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("index/change_language") . "\";");
|
||||
$language_options = '';
|
||||
while (list($language_file, $language_name) = each($languages)) {
|
||||
$language_options .= makeoption($language_name, $language_file, $default_lang, true);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate('index/change_language') . "\";");
|
||||
}
|
||||
} elseif ($page == 'change_theme') {
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||
$theme = validate($_POST['theme'], 'theme');
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `theme`='" . $db->escape($theme) . "' WHERE `hash`='" . $db->escape($s) . "'");
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed default theme to '" . $theme . "'");
|
||||
redirectTo($filename, Array('s' => $s));
|
||||
} else {
|
||||
$default_theme = $settings['panel']['default_theme'];
|
||||
if ($userinfo['theme'] != '') {
|
||||
$default_theme = $userinfo['theme'];
|
||||
}
|
||||
|
||||
$theme_options = '';
|
||||
$themes_avail = getThemes();
|
||||
foreach ($themes_avail as $t) {
|
||||
$theme_options .= makeoption($t, $t, $default_theme, true);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate('index/change_theme') . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -22,37 +22,29 @@ define('AREA', 'customer');
|
||||
/**
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
|
||||
$need_db_sql_data = true;
|
||||
$need_root_db_sql_data = true;
|
||||
require ("./lib/init.php");
|
||||
require('./lib/init.php');
|
||||
|
||||
if(isset($_POST['id']))
|
||||
{
|
||||
if (isset($_POST['id'])) {
|
||||
$id = intval($_POST['id']);
|
||||
}
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
} elseif(isset($_GET['id'])) {
|
||||
$id = intval($_GET['id']);
|
||||
}
|
||||
|
||||
if($page == 'overview')
|
||||
{
|
||||
if ($page == 'overview') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql");
|
||||
$lng['mysql']['description'] = str_replace('<SQL_HOST>', $sql['host'], $lng['mysql']['description']);
|
||||
eval("echo \"" . getTemplate("mysql/mysql") . "\";");
|
||||
}
|
||||
elseif($page == 'mysqls')
|
||||
{
|
||||
if($action == '')
|
||||
{
|
||||
eval("echo \"" . getTemplate('mysql/mysql') . "\";");
|
||||
} elseif($page == 'mysqls') {
|
||||
if ($action == '') {
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_mysql::mysqls");
|
||||
$fields = array(
|
||||
'databasename' => $lng['mysql']['databasename'],
|
||||
'description' => $lng['mysql']['databasedescription']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_DATABASES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query("SELECT `id`, `databasename`, `description`, `dbserver` FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -62,114 +54,117 @@ elseif($page == 'mysqls')
|
||||
$count = 0;
|
||||
$mysqls = '';
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
// Begin root-session
|
||||
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
if ($paging->checkDisplay($i)) {
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$mysqls.=\"" . getTemplate("mysql/mysqls_database") . "\";");
|
||||
$mbdata = $db_root->query_first("SELECT SUM( data_length + index_length) / 1024 / 1024 'MB' FROM information_schema.TABLES WHERE table_schema = '" . $db_root->escape($row['databasename']) . "' GROUP BY table_schema ;");
|
||||
$row['size'] = number_format($mbdata['MB'], 3, '.', '');
|
||||
eval("\$mysqls.=\"" . getTemplate('mysql/mysqls_database') . "\";");
|
||||
$count++;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
$db_root->close();
|
||||
// End root-session
|
||||
|
||||
$mysqls_count = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("mysql/mysqls") . "\";");
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first('SELECT `id`, `databasename`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
||||
eval("echo \"" . getTemplate('mysql/mysqls') . "\";");
|
||||
} elseif($action == 'delete' && $id != 0) {
|
||||
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
||||
|
||||
if(isset($result['databasename'])
|
||||
&& $result['databasename'] != '')
|
||||
{
|
||||
if(!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']]))
|
||||
{
|
||||
if (isset($result['databasename'])
|
||||
&& $result['databasename'] != ''
|
||||
) {
|
||||
if (!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']])) {
|
||||
$result['dbserver'] = 0;
|
||||
}
|
||||
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
// Begin root-session
|
||||
|
||||
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
|
||||
unset($db_root->password);
|
||||
foreach(array_map('trim', array_unique(explode(',', $settings['system']['mysql_access_host']))) as $mysql_access_host)
|
||||
{
|
||||
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
||||
$db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($result['databasename'])) . '` . * FROM `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
||||
$db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($result['databasename']) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"');
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted database '" . $result['databasename'] . "'");
|
||||
if (mysql_get_server_info() < '5.0.2') {
|
||||
// Revoke privileges (only required for MySQL 4.1.2 - 5.0.1)
|
||||
$db_root->query('REVOKE ALL PRIVILEGES, GRANT OPTION FROM \'' . $db_root->escape($result['databasename']) .'\'',false,true);
|
||||
}
|
||||
|
||||
$host_res = $db_root->query("SELECT `Host` FROM `mysql`.`user` WHERE `User`='" . $db_root->escape($result['databasename']) . "'");
|
||||
while ($host = $db_root->fetch_array($host_res)) {
|
||||
// as of MySQL 5.0.2 this also revokes privileges. (requires MySQL 4.1.2+)
|
||||
$db_root->query('DROP USER \'' . $db_root->escape($result['databasename']). '\'@\'' . $db_root->escape($host['Host']) . '\'', false, true);
|
||||
}
|
||||
|
||||
$db_root->query('DROP DATABASE IF EXISTS `' . $db_root->escape($result['databasename']) . '`');
|
||||
$db_root->query('FLUSH PRIVILEGES');
|
||||
$db_root->close();
|
||||
|
||||
// End root-session
|
||||
|
||||
$db->query('DELETE FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
||||
|
||||
if($userinfo['mysqls_used'] == '1')
|
||||
{
|
||||
$resetaccnumber = " , `mysql_lastaccountnumber`='0' ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$resetaccnumber = '';
|
||||
}
|
||||
$resetaccnumber = ($userinfo['mysqls_used'] == '1') ? " , `mysql_lastaccountnumber`='0' " : '';
|
||||
|
||||
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`-1 ' . $resetaccnumber . 'WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['databasename']);
|
||||
} else {
|
||||
$dbnamedesc = $result['databasename'];
|
||||
if (isset($result['description']) && $result['description'] != '') {
|
||||
$dbnamedesc .= ' ('.$result['description'].')';
|
||||
}
|
||||
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $dbnamedesc);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'add')
|
||||
{
|
||||
if($userinfo['mysqls_used'] < $userinfo['mysqls']
|
||||
|| $userinfo['mysqls'] == '-1')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
} elseif ($action == 'add') {
|
||||
if ($userinfo['mysqls_used'] < $userinfo['mysqls']
|
||||
|| $userinfo['mysqls'] == '-1'
|
||||
) {
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
$password = validate($_POST['mysql_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
if($password == '')
|
||||
{
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
$sendinfomail = isset($_POST['sendinfomail']) ? 1 : 0;
|
||||
if ($sendinfomail != 1) {
|
||||
$sendinfomail = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$username = $userinfo['loginname'] . $settings['customer']['mysqlprefix'] . (intval($userinfo['mysql_lastaccountnumber']) + 1);
|
||||
|
||||
if(count($sql_root) > 1)
|
||||
{
|
||||
if ($password == '') {
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
} else {
|
||||
$dbserver = 0;
|
||||
if (count($sql_root) > 1) {
|
||||
$dbserver = validate($_POST['mysql_server'], html_entity_decode($lng['mysql']['mysql_server']), '', '', 0);
|
||||
|
||||
if(!isset($sql_root[$dbserver]) || !is_array($sql_root[$dbserver]))
|
||||
{
|
||||
if (!isset($sql_root[$dbserver]) || !is_array($sql_root[$dbserver])) {
|
||||
$dbserver = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$dbserver = 0;
|
||||
}
|
||||
|
||||
// validate description before actual adding the database, #1052
|
||||
$databasedescription = validate(trim($_POST['description']), 'description');
|
||||
|
||||
// Begin root-session
|
||||
|
||||
$db_root = new db($sql_root[$dbserver]['host'], $sql_root[$dbserver]['user'], $sql_root[$dbserver]['password'], '');
|
||||
unset($db_root->password);
|
||||
|
||||
if (strtoupper($settings['customer']['mysqlprefix']) == 'RANDOM') {
|
||||
$result = $db_root->query('SELECT `User` FROM mysql.user');
|
||||
while ($row = $db_root->fetch_array($result)) {
|
||||
$allsqlusers[] = $row[User];
|
||||
}
|
||||
$username = $userinfo['loginname'] . '-' . substr(md5(uniqid(microtime(), 1)), 20, 3);
|
||||
while (in_array($username , $allsqlusers)) {
|
||||
$username = $userinfo['loginname'] . '-' . substr(md5(uniqid(microtime(), 1)), 20, 3);
|
||||
}
|
||||
} else {
|
||||
$username = $userinfo['loginname'] . $settings['customer']['mysqlprefix'] . (intval($userinfo['mysql_lastaccountnumber']) + 1);
|
||||
}
|
||||
|
||||
$db_root->query('CREATE DATABASE `' . $db_root->escape($username) . '`');
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "created database '" . $username . "'");
|
||||
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||
{
|
||||
foreach (array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host) {
|
||||
$db_root->query('GRANT ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($username)) . '`.* TO `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` IDENTIFIED BY \'password\'');
|
||||
$db_root->query('SET PASSWORD FOR `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` = PASSWORD(\'' . $db_root->escape($password) . '\')');
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "grant all privileges for '" . $username . "'@'" . $mysql_access_host . "'");
|
||||
@@ -177,79 +172,121 @@ elseif($page == 'mysqls')
|
||||
|
||||
$db_root->query('FLUSH PRIVILEGES');
|
||||
$db_root->close();
|
||||
|
||||
// End root-session
|
||||
// Statement modifyed for Database description -- PH 2004-11-29
|
||||
|
||||
$databasedescription = validate($_POST['description'], 'description');
|
||||
// Statement modified for Database description -- PH 2004-11-29
|
||||
$result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($username) . '", "' . $db->escape($databasedescription) . '", "' . $db->escape($dbserver) . '")');
|
||||
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1, `mysql_lastaccountnumber`=`mysql_lastaccountnumber`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
|
||||
|
||||
if ($sendinfomail == 1) {
|
||||
$pma = $lng['admin']['notgiven'];
|
||||
if ($settings['panel']['phpmyadmin_url'] != '') {
|
||||
$pma = $settings['panel']['phpmyadmin_url'];
|
||||
}
|
||||
|
||||
$replace_arr = array(
|
||||
'SALUTATION' => getCorrectUserSalutation($userinfo),
|
||||
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
|
||||
'DB_NAME' => $username,
|
||||
'DB_PASS' => $password,
|
||||
'DB_DESC' => $databasedescription,
|
||||
'DB_SRV' => $sql_root[$dbserver]['host'],
|
||||
'PMA_URI' => $pma
|
||||
);
|
||||
|
||||
$def_language = $userinfo['def_language'];
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_subject\'');
|
||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_subject']), $replace_arr));
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_mailbody\'');
|
||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_body']['main']), $replace_arr));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $userinfo['email']);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$mysql_servers = '';
|
||||
|
||||
foreach($sql_root as $mysql_server => $mysql_server_details)
|
||||
{
|
||||
foreach ($sql_root as $mysql_server => $mysql_server_details) {
|
||||
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("mysql/mysqls_add") . "\";");
|
||||
//$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
||||
|
||||
$mysql_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_add.php';
|
||||
$mysql_add_form = htmlform::genHTMLForm($mysql_add_data);
|
||||
|
||||
$title = $mysql_add_data['mysql_add']['title'];
|
||||
$image = $mysql_add_data['mysql_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate('mysql/mysqls_add') . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
} elseif ($action == 'edit' && $id != 0) {
|
||||
$result = $db->query_first('SELECT `id`, `databasename`, `description`, `dbserver` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . $userinfo['customerid'] . '" AND `id`="' . $id . '"');
|
||||
|
||||
if(isset($result['databasename'])
|
||||
&& $result['databasename'] != '')
|
||||
{
|
||||
if(!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']]))
|
||||
{
|
||||
if (isset($result['databasename'])
|
||||
&& $result['databasename'] != ''
|
||||
) {
|
||||
if (!isset($sql_root[$result['dbserver']]) || !is_array($sql_root[$result['dbserver']])) {
|
||||
$result['dbserver'] = 0;
|
||||
}
|
||||
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
// Only change Password if it is set, do nothing if it is empty! -- PH 2004-11-29
|
||||
|
||||
$password = validate($_POST['mysql_password'], 'password');
|
||||
if ($password != '') {
|
||||
// validate password
|
||||
$password = validatePassword($password);
|
||||
|
||||
if($password != '')
|
||||
{
|
||||
// Begin root-session
|
||||
|
||||
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
|
||||
unset($db_root->password);
|
||||
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||
{
|
||||
foreach (array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host) {
|
||||
$db_root->query('SET PASSWORD FOR `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '` = PASSWORD(\'' . $db_root->escape($password) . '\')');
|
||||
}
|
||||
|
||||
$db_root->query('FLUSH PRIVILEGES');
|
||||
$db_root->close();
|
||||
|
||||
// End root-session
|
||||
}
|
||||
|
||||
// Update the Database description -- PH 2004-11-29
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited database '" . $result['databasename'] . "'");
|
||||
$databasedescription = validate($_POST['description'], 'description');
|
||||
$result = $db->query('UPDATE `' . TABLE_PANEL_DATABASES . '` SET `description`="' . $db->escape($databasedescription) . '" WHERE `customerid`="' . (int)$userinfo['customerid'] . '" AND `id`="' . (int)$id . '"');
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("echo \"" . getTemplate("mysql/mysqls_edit") . "\";");
|
||||
} else {
|
||||
$mysql_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/mysql/formfield.mysql_edit.php';
|
||||
$mysql_edit_form = htmlform::genHTMLForm($mysql_edit_data);
|
||||
|
||||
$title = $mysql_edit_data['mysql_edit']['title'];
|
||||
$image = $mysql_edit_data['mysql_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate('mysql/mysqls_edit') . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -28,6 +28,17 @@ require ("./lib/init.php");
|
||||
if(isset($_POST['id']))
|
||||
{
|
||||
$id = intval($_POST['id']);
|
||||
|
||||
/*
|
||||
* Check if the current user is allowed to see the current ticket.
|
||||
*/
|
||||
$sql = "SELECT `id` FROM `panel_tickets` WHERE `id` = '".$id."' AND `customerid` = '".$userinfo['customerid']."'";
|
||||
|
||||
$result = $db->query_first($sql);
|
||||
if ($result == null) {
|
||||
// no rights to see the requested ticket
|
||||
standard_error(array('ticketnotaccessible'));
|
||||
}
|
||||
}
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
@@ -37,7 +48,7 @@ elseif(isset($_GET['id']))
|
||||
if($page == 'overview')
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets");
|
||||
eval("echo \"" . getTemplate("ticket/ticket") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/ticket") . "\";");
|
||||
}
|
||||
elseif($page == 'tickets')
|
||||
{
|
||||
@@ -55,7 +66,7 @@ elseif($page == 'tickets')
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$paging->sortfield = 'lastchange';
|
||||
$paging->sortorder = 'desc';
|
||||
$result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int)$userinfo['customerid'] . '" AND `adminid`="' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int)$userinfo['customerid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -98,12 +109,13 @@ elseif($page == 'tickets')
|
||||
$cananswer = 0;
|
||||
}
|
||||
|
||||
$row['subject'] = html_entity_decode($row['subject']);
|
||||
if(strlen($row['subject']) > 20)
|
||||
{
|
||||
$row['subject'] = substr($row['subject'], 0, 17) . '...';
|
||||
}
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";");
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/tickets_tickets") . "\";");
|
||||
$count++;
|
||||
}
|
||||
|
||||
@@ -156,7 +168,7 @@ elseif($page == 'tickets')
|
||||
}
|
||||
|
||||
$ticketsopen = (int)$opentickets['count'];
|
||||
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
|
||||
}
|
||||
elseif($action == 'new')
|
||||
{
|
||||
@@ -209,12 +221,12 @@ elseif($page == 'tickets')
|
||||
else
|
||||
{
|
||||
$categories = '';
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
|
||||
|
||||
if(isset($result['name'])
|
||||
&& $result['name'] != '')
|
||||
{
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
|
||||
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
@@ -226,9 +238,9 @@ elseif($page == 'tickets')
|
||||
$categories = makeoption($lng['ticket']['no_cat'], '0');
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1');
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
|
||||
$ticketsopen = 0;
|
||||
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
|
||||
WHERE `customerid` = "' . $userinfo['customerid'] . '"
|
||||
@@ -246,7 +258,14 @@ elseif($page == 'tickets')
|
||||
}
|
||||
|
||||
$ticketsopen = (int)$opentickets['count'];
|
||||
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
||||
|
||||
$ticket_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/tickets/formfield.ticket_add.php';
|
||||
$ticket_add_form = htmlform::genHTMLForm($ticket_add_data);
|
||||
|
||||
$title = $ticket_add_data['ticket_add']['title'];
|
||||
$image = $ticket_add_data['ticket_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_new") . "\";");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -321,12 +340,18 @@ elseif($page == 'tickets')
|
||||
}
|
||||
else
|
||||
{
|
||||
$by = $lng['ticket']['customer'];
|
||||
$cid = $mainticket->Get('customer');
|
||||
$usr = $db->query_first('SELECT `customerid`, `firstname`, `name`, `company`, `loginname`
|
||||
FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"'
|
||||
);
|
||||
$by = getCorrectFullUserDetails($usr);
|
||||
//$by = $lng['ticket']['customer'];
|
||||
}
|
||||
|
||||
$subject = $mainticket->Get('subject');
|
||||
$message = $mainticket->Get('message');
|
||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
|
||||
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_main") . "\";");
|
||||
$result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '`
|
||||
WHERE `id`="' . (int)$mainticket->Get('category') . '"');
|
||||
$row = $db->fetch_array($result);
|
||||
@@ -343,12 +368,13 @@ elseif($page == 'tickets')
|
||||
}
|
||||
else
|
||||
{
|
||||
$by = $lng['ticket']['customer'];
|
||||
$by = getCorrectFullUserDetails($usr);
|
||||
//$by = $lng['ticket']['customer'];
|
||||
}
|
||||
|
||||
$subject = $subticket->Get('subject');
|
||||
$message = $subticket->Get('message');
|
||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
|
||||
eval("\$ticket_replies.=\"" . getTemplate("tickets/tickets_tickets_list") . "\";");
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true);
|
||||
@@ -359,7 +385,13 @@ elseif($page == 'tickets')
|
||||
|
||||
// don't forget the main-ticket!
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
|
||||
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/customer/tickets/formfield.ticket_reply.php';
|
||||
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
|
||||
|
||||
$title = $ticket_reply_data['ticket_reply']['title'];
|
||||
$image = $ticket_reply_data['ticket_reply']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_reply") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'close'
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -22,21 +22,20 @@ define('AREA', 'customer');
|
||||
/**
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
|
||||
require ("./lib/init.php");
|
||||
$intrafficpage = 1;
|
||||
require('./lib/init.php');
|
||||
$traffic = '';
|
||||
$month = null;
|
||||
$year = null;
|
||||
|
||||
if(isset($_POST['month'])
|
||||
&& isset($_POST['year']))
|
||||
{
|
||||
if (isset($_POST['month'])
|
||||
&& isset($_POST['year'])
|
||||
) {
|
||||
$month = intval($_POST['month']);
|
||||
$year = intval($_POST['year']);
|
||||
}
|
||||
elseif(isset($_GET['month'])
|
||||
&& isset($_GET['year']))
|
||||
{
|
||||
} elseif (isset($_GET['month'])
|
||||
&& isset($_GET['year'])
|
||||
) {
|
||||
$month = intval($_GET['month']);
|
||||
$year = intval($_GET['year']);
|
||||
}
|
||||
@@ -44,40 +43,25 @@ elseif(isset($_GET['month'])
|
||||
//BAM! $_GET???
|
||||
|
||||
elseif (isset($_GET['page'])
|
||||
&& $_GET['page'] == "current")
|
||||
{
|
||||
if(date('d') != '01')
|
||||
{
|
||||
&& $_GET['page'] == 'current'
|
||||
) {
|
||||
if (date('d') != '01') {
|
||||
$month = date('m');
|
||||
$year = date('Y');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(date('m') == '01')
|
||||
{
|
||||
} else {
|
||||
if (date('m') == '01') {
|
||||
$month = 12;
|
||||
$year = date('Y') - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$month = date('m') - 1;
|
||||
$year = date('Y');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!is_null($month)
|
||||
&& !is_null($year))
|
||||
{
|
||||
if (!is_null($month)
|
||||
&& !is_null($year)) {
|
||||
$traf['byte'] = 0;
|
||||
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
|
||||
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||
WHERE `customerid`='" . $userinfo['customerid'] . "'
|
||||
AND `month` = '" . $month . "'
|
||||
AND `year` = '" . $year . "'");
|
||||
$row = mysql_fetch_row($result);
|
||||
rsort($row);
|
||||
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));;
|
||||
$result = $db->query("SELECT
|
||||
SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail',
|
||||
`day`, `month`, `year`
|
||||
@@ -90,97 +74,50 @@ if(!is_null($month)
|
||||
$traffic_complete['mail'] = 0;
|
||||
$show = '';
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
$http = $row['http'];
|
||||
$ftp = $row['ftp_up'] + $row['ftp_down'];
|
||||
$mail = $row['mail'];
|
||||
$traf['byte'] = $http + $ftp + $mail;
|
||||
$traffic_complete['http']+= $http;
|
||||
$traffic_complete['ftp']+= $ftp;
|
||||
$traffic_complete['mail']+= $mail;
|
||||
$traf['day'] = $row['day'];
|
||||
$traffic_complete['http'] += $http;
|
||||
$traffic_complete['ftp'] += $ftp;
|
||||
$traffic_complete['mail'] += $mail;
|
||||
$traf['day'] = $row['day'] . '.';
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
if (extension_loaded('bcmath')) {
|
||||
$traf['ftptext'] = bcdiv($row['ftp_up'], 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($row['ftp_down'], 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
|
||||
$traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
|
||||
$traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['ftp'] = bcdiv($ftp, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']);
|
||||
} else {
|
||||
$traf['ftptext'] = round($row['ftp_up'] / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($row['ftp_down'] / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
|
||||
$traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
|
||||
$traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
|
||||
}
|
||||
|
||||
if($traf['byte'] != 0
|
||||
&& $traf['max'] != 0)
|
||||
{
|
||||
$proz = $traf['max'] / 100;
|
||||
$traf['http'] = round($http / $proz, 0);
|
||||
$traf['ftp'] = round($ftp / $proz, 0);
|
||||
$traf['mail'] = round($mail / $proz, 0);
|
||||
|
||||
if($traf['http'] == 0)
|
||||
{
|
||||
$traf['http'] = 1;
|
||||
}
|
||||
|
||||
if($traf['ftp'] == 0)
|
||||
{
|
||||
$traf['ftp'] = 1;
|
||||
}
|
||||
|
||||
if($traf['mail'] == 0)
|
||||
{
|
||||
$traf['mail'] = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['http'] = 0;
|
||||
$traf['ftp'] = 0;
|
||||
$traf['mail'] = 0;
|
||||
}
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
$traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['http'] = round($http, $settings['panel']['decimal_places']);
|
||||
$traf['ftp'] = round($ftp, $settings['panel']['decimal_places']);
|
||||
$traf['mail'] = round($mail, $settings['panel']['decimal_places']);
|
||||
$traf['byte'] = round($traf['byte'] / 1024, $settings['panel']['decimal_places']);
|
||||
}
|
||||
|
||||
eval("\$traffic.=\"" . getTemplate("traffic/traffic_month") . "\";");
|
||||
$show = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year'];
|
||||
eval("\$traffic.=\"" . getTemplate('traffic/traffic_month') . "\";");
|
||||
$show = $lng['traffic']['months'][intval($row['month'])] . ' ' . $row['year'];
|
||||
}
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
if (extension_loaded('bcmath')) {
|
||||
$traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024, $settings['panel']['decimal_places']);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$traffic_complete['http'] = round($traffic_complete['http'] / 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['mail'] = round($traffic_complete['mail'] / 1024, $settings['panel']['decimal_places']);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("traffic/traffic_details") . "\";");
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
|
||||
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||
WHERE `customerid`='" . $userinfo['customerid'] . "'
|
||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||
$row = mysql_fetch_row($result);
|
||||
rsort($row);
|
||||
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
|
||||
eval("echo \"" . getTemplate('traffic/traffic_details') . "\";");
|
||||
} else {
|
||||
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
||||
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||
@@ -188,88 +125,49 @@ else
|
||||
$traffic_complete['ftp'] = 0;
|
||||
$traffic_complete['mail'] = 0;
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
while ($row = $db->fetch_array($result)) {
|
||||
$http = $row['http'];
|
||||
$ftp_up = $row['ftp_up'];
|
||||
$ftp_down = $row['ftp_down'];
|
||||
$mail = $row['mail'];
|
||||
$traffic_complete['http']+= $http;
|
||||
$traffic_complete['ftp']+= $ftp_up + $ftp_down;
|
||||
$traffic_complete['mail']+= $mail;
|
||||
$traffic_complete['http'] += $http;
|
||||
$traffic_complete['ftp'] += $ftp_up + $ftp_down;
|
||||
$traffic_complete['mail'] += $mail;
|
||||
$traf['month'] = $row['month'];
|
||||
$traf['year'] = $row['year'];
|
||||
$traf['monthname'] = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year'];
|
||||
$traf['byte'] = $http + $ftp_up + $ftp_down + $mail;
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
$traf['ftptext'] = bcdiv($ftp_up, 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . bcdiv($ftp_down, 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)";
|
||||
$traf['httptext'] = bcdiv($http, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)";
|
||||
$traf['mailtext'] = bcdiv($mail, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)";
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['ftptext'] = round($ftp_up / 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . round($ftp_down / 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)";
|
||||
$traf['httptext'] = round($http / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)";
|
||||
$traf['mailtext'] = round($mail / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)";
|
||||
if (extension_loaded('bcmath')) {
|
||||
$traf['ftptext'] = bcdiv($ftp_up, 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($ftp_down, 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
|
||||
$traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
|
||||
$traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
|
||||
$traf['ftp'] = bcdiv(($ftp_up + $ftp_down), 1024, $settings['panel']['decimal_places']);
|
||||
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['byte'] = bcdiv($traf['byte'], 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
} else {
|
||||
$traf['ftptext'] = round($ftp_up / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($ftp_down / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
|
||||
$traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
|
||||
$traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
|
||||
$traf['ftp'] = round(($ftp_up + $ftp_down) / 1024, $settings['panel']['decimal_places']);
|
||||
$traf['http'] = round($http / 1024, $settings['panel']['decimal_places']);
|
||||
$traf['mail'] = round($mail / 1024, $settings['panel']['decimal_places']);
|
||||
$traf['byte'] = round($traf['byte'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
}
|
||||
|
||||
if($traf['max'] != 0)
|
||||
{
|
||||
$proz = $traf['max'] / 100;
|
||||
$traf['ftp'] = round(($ftp_up + $ftp_down) / $proz, 0);
|
||||
$traf['http'] = round($http / $proz, 0);
|
||||
$traf['mail'] = round($mail / $proz, 0);
|
||||
|
||||
if($traf['http'] == 0)
|
||||
{
|
||||
$traf['http'] = 1;
|
||||
}
|
||||
|
||||
if($traf['ftp'] == 0)
|
||||
{
|
||||
$traf['ftp'] = 1;
|
||||
}
|
||||
|
||||
if($traf['mail'] == 0)
|
||||
{
|
||||
$traf['mail'] = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['ftp'] = 0;
|
||||
$traf['http'] = 0;
|
||||
$traf['mail'] = 0;
|
||||
}
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
$traf['byte'] = bcadd($traf['byte'] / (1024 * 1024), 0.0000, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['byte'] = round($traf['byte'] + (1024 * 1024), 4);
|
||||
}
|
||||
|
||||
eval("\$traffic.=\"" . getTemplate("traffic/traffic_traffic") . "\";");
|
||||
eval("\$traffic.=\"" . getTemplate('traffic/traffic_traffic') . "\";");
|
||||
}
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
if (extension_loaded('bcmath')) {
|
||||
$traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$traffic_complete['http'] = round($traffic_complete['http'] / 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['mail'] = round($traffic_complete['mail'] / 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
} else {
|
||||
$traffic_complete['http'] = round($traffic_complete['http'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$traffic_complete['mail'] = round($traffic_complete['mail'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("traffic/traffic") . "\";");
|
||||
eval("echo \"" . getTemplate('traffic/traffic') . "\";");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
BIN
images/ball.gif
|
Before Width: | Height: | Size: 51 B |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
BIN
images/error.gif
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
images/error.png
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
BIN
images/info.png
|
Before Width: | Height: | Size: 2.9 KiB |
BIN
images/login.gif
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 62 B |
|
Before Width: | Height: | Size: 60 B |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 3.6 KiB |
BIN
images/title.gif
|
Before Width: | Height: | Size: 69 B |
364
index.php
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'login');
|
||||
@@ -22,69 +22,74 @@ define('AREA', 'login');
|
||||
/**
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
require ('./lib/init.php');
|
||||
|
||||
require ("./lib/init.php");
|
||||
|
||||
if($action == '')
|
||||
{
|
||||
if ($action == '') {
|
||||
$action = 'login';
|
||||
}
|
||||
|
||||
if($action == 'login')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if ($action == 'login') {
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
$loginname = validate($_POST['loginname'], 'loginname');
|
||||
$password = validate($_POST['password'], 'password');
|
||||
|
||||
$row = $db->query_first("SELECT `loginname` AS `customer` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `loginname`='" . $db->escape($loginname) . "'");
|
||||
|
||||
if($row['customer'] == $loginname)
|
||||
{
|
||||
if ($row['customer'] == $loginname) {
|
||||
$table = "`" . TABLE_PANEL_CUSTOMERS . "`";
|
||||
$uid = 'customerid';
|
||||
$adminsession = '0';
|
||||
$is_admin = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$is_admin = true;
|
||||
if ((int)$settings['login']['domain_login'] == 1) {
|
||||
/**
|
||||
* check if the customer tries to login with a domain, #374
|
||||
*/
|
||||
$domainname = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', $loginname));
|
||||
$row2 = $db->query_first("SELECT `customerid` FROM `".TABLE_PANEL_DOMAINS."` WHERE `domain` = '".$db->escape($domainname)."'");
|
||||
|
||||
if (isset($row2['customerid']) && $row2['customerid'] > 0) {
|
||||
$loginname = getCustomerDetail($row2['customerid'], 'loginname');
|
||||
if ($loginname !== false) {
|
||||
$row3 = $db->query_first("SELECT `loginname` AS `customer` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `loginname`='" . $db->escape($loginname) . "'");
|
||||
if ($row3['customer'] == $loginname) {
|
||||
$table = "`" . TABLE_PANEL_CUSTOMERS . "`";
|
||||
$uid = 'customerid';
|
||||
$adminsession = '0';
|
||||
$is_admin = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(hasUpdates($version) && $is_admin == false)
|
||||
{
|
||||
if (hasUpdates($version) && $is_admin == false) {
|
||||
redirectTo('index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
if($is_admin)
|
||||
{
|
||||
if(hasUpdates($version))
|
||||
{
|
||||
if ($is_admin) {
|
||||
if (hasUpdates($version)) {
|
||||
$row = $db->query_first("SELECT `loginname` AS `admin` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `loginname`='" . $db->escape($loginname) . "' AND `change_serversettings` = '1'");
|
||||
/*
|
||||
* not an admin who can see updates
|
||||
*/
|
||||
if(!isset($row['admin']))
|
||||
{
|
||||
if (!isset($row['admin'])) {
|
||||
redirectTo('index.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$row = $db->query_first("SELECT `loginname` AS `admin` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `loginname`='" . $db->escape($loginname) . "'");
|
||||
}
|
||||
|
||||
if($row['admin'] == $loginname)
|
||||
{
|
||||
if ($row['admin'] == $loginname) {
|
||||
$table = "`" . TABLE_PANEL_ADMINS . "`";
|
||||
$uid = 'adminid';
|
||||
$adminsession = '1';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
redirectTo('index.php', Array('showmessage' => '2'), true);
|
||||
exit;
|
||||
}
|
||||
@@ -92,235 +97,240 @@ if($action == 'login')
|
||||
|
||||
$userinfo = $db->query_first("SELECT * FROM $table WHERE `loginname`='" . $db->escape($loginname) . "'");
|
||||
|
||||
if($userinfo['loginfail_count'] >= $settings['login']['maxloginattempts']
|
||||
&& $userinfo['lastlogin_fail'] > (time() - $settings['login']['deactivatetime']))
|
||||
{
|
||||
if ($userinfo['loginfail_count'] >= $settings['login']['maxloginattempts']
|
||||
&& $userinfo['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
|
||||
) {
|
||||
redirectTo('index.php', Array('showmessage' => '3'), true);
|
||||
exit;
|
||||
}
|
||||
elseif($userinfo['password'] == md5($password))
|
||||
{
|
||||
} elseif($userinfo['password'] == md5($password)) {
|
||||
// login correct
|
||||
// reset loginfail_counter, set lastlogin_succ
|
||||
|
||||
$db->query("UPDATE $table SET `lastlogin_succ`='" . time() . "', `loginfail_count`='0' WHERE `$uid`='" . (int)$userinfo[$uid] . "'");
|
||||
$userinfo['userid'] = $userinfo[$uid];
|
||||
$userinfo['adminsession'] = $adminsession;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// login incorrect
|
||||
|
||||
$db->query("UPDATE $table SET `lastlogin_fail`='" . time() . "', `loginfail_count`=`loginfail_count`+1 WHERE `$uid`='" . (int)$userinfo[$uid] . "'");
|
||||
unset($userinfo);
|
||||
redirectTo('index.php', Array('showmessage' => '2'), true);
|
||||
exit;
|
||||
}
|
||||
|
||||
if(isset($userinfo['userid'])
|
||||
&& $userinfo['userid'] != '')
|
||||
{
|
||||
if (isset($userinfo['userid'])
|
||||
&& $userinfo['userid'] != ''
|
||||
) {
|
||||
$s = md5(uniqid(microtime(), 1));
|
||||
|
||||
if(isset($_POST['language']))
|
||||
{
|
||||
if (isset($_POST['language'])) {
|
||||
$language = validate($_POST['language'], 'language');
|
||||
|
||||
if($language == 'profile')
|
||||
{
|
||||
if ($language == 'profile') {
|
||||
$language = $userinfo['def_language'];
|
||||
}
|
||||
elseif(!isset($languages[$language]))
|
||||
{
|
||||
} elseif(!isset($languages[$language])) {
|
||||
$language = $settings['panel']['standardlanguage'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$language = $settings['panel']['standardlanguage'];
|
||||
}
|
||||
|
||||
if($settings['session']['allow_multiple_login'] != '1')
|
||||
{
|
||||
if (isset($userinfo['theme']) && $userinfo['theme'] != '') {
|
||||
$theme = $userinfo['theme'];
|
||||
} else {
|
||||
$theme = $settings['panel']['default_theme'];
|
||||
}
|
||||
|
||||
if ($settings['session']['allow_multiple_login'] != '1') {
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['userid'] . "' AND `adminsession` = '" . $db->escape($userinfo['adminsession']) . "'");
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$userinfo['userid'] . "', '" . $db->escape($remote_addr) . "', '" . $db->escape($http_user_agent) . "', '" . time() . "', '" . $db->escape($language) . "', '" . $db->escape($userinfo['adminsession']) . "')");
|
||||
// check for field 'theme' in session-table, refs #607
|
||||
$fields = mysql_list_fields($db->getDbName(), TABLE_PANEL_SESSIONS);
|
||||
$columns = mysql_num_fields($fields);
|
||||
$field_array = array();
|
||||
for ($i = 0; $i < $columns; $i++) {
|
||||
$field_array[] = mysql_field_name($fields, $i);
|
||||
}
|
||||
|
||||
if($userinfo['adminsession'] == '1')
|
||||
{
|
||||
if(hasUpdates($version))
|
||||
{
|
||||
if (!in_array('theme', $field_array)) {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$userinfo['userid'] . "', '" . $db->escape($remote_addr) . "', '" . $db->escape($http_user_agent) . "', '" . time() . "', '" . $db->escape($language) . "', '" . $db->escape($userinfo['adminsession']) . "')");
|
||||
} else {
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`, `theme`) VALUES ('" . $db->escape($s) . "', '" . (int)$userinfo['userid'] . "', '" . $db->escape($remote_addr) . "', '" . $db->escape($http_user_agent) . "', '" . time() . "', '" . $db->escape($language) . "', '" . $db->escape($userinfo['adminsession']) . "', '" . $db->escape($theme) . "')");
|
||||
}
|
||||
|
||||
if ($userinfo['adminsession'] == '1') {
|
||||
if (hasUpdates($version)) {
|
||||
redirectTo('admin_updates.php', Array('s' => $s), true);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
redirectTo('admin_index.php', Array('s' => $s), true);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
redirectTo('customer_index.php', Array('s' => $s), true);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
redirectTo('index.php', Array('showmessage' => '2'), true);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
exit;
|
||||
} else {
|
||||
$language_options = '';
|
||||
$language_options.= makeoption($lng['login']['profile_lng'], 'profile', 'profile', true, true);
|
||||
$language_options .= makeoption($lng['login']['profile_lng'], 'profile', 'profile', true, true);
|
||||
|
||||
while(list($language_file, $language_name) = each($languages))
|
||||
{
|
||||
$language_options.= makeoption($language_name, $language_file, 'profile', true);
|
||||
while (list($language_file, $language_name) = each($languages)) {
|
||||
$language_options .= makeoption($language_name, $language_file, 'profile', true);
|
||||
}
|
||||
|
||||
$smessage = isset($_GET['showmessage']) ? (int)$_GET['showmessage'] : 0;
|
||||
$message = '';
|
||||
$successmessage = '';
|
||||
|
||||
switch($smessage)
|
||||
{
|
||||
switch ($smessage) {
|
||||
case 1:
|
||||
$message = $lng['pwdreminder']['success'];
|
||||
$successmessage = $lng['pwdreminder']['success'];
|
||||
break;
|
||||
case 2:
|
||||
$message = $lng['error']['login'];
|
||||
break;
|
||||
case 3:
|
||||
$message = $lng['error']['login_blocked'];
|
||||
$message = sprintf($lng['error']['login_blocked'],$settings['login']['deactivatetime']);
|
||||
break;
|
||||
case 4:
|
||||
$message = $lng['error']['errorsendingmail'];
|
||||
$cmail = isset($_GET['customermail']) ? $_GET['customermail'] : 'unknown';
|
||||
$message = str_replace('%s', $cmail, $lng['error']['errorsendingmail']);
|
||||
break;
|
||||
case 5:
|
||||
$message = $lng['error']['user_banned'];
|
||||
break;
|
||||
}
|
||||
|
||||
$update_in_progress = '';
|
||||
if(hasUpdates($version))
|
||||
{
|
||||
if (hasUpdates($version)) {
|
||||
$update_in_progress = $lng['update']['updateinprogress_onlyadmincanlogin'];
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("login") . "\";");
|
||||
eval("echo \"" . getTemplate('login') . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
if($action == 'forgotpwd')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$adminchecked = false;
|
||||
if ($action == 'forgotpwd') {
|
||||
$adminchecked = false;
|
||||
$message = '';
|
||||
|
||||
if (isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send'
|
||||
) {
|
||||
$loginname = validate($_POST['loginname'], 'loginname');
|
||||
$email = validateEmail($_POST['loginemail'], 'email');
|
||||
$sql = "SELECT `customerid`, `firstname`, `name`, `email`, `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
||||
$sql = "SELECT `adminid`, `customerid`, `firstname`, `name`, `company`, `email`, `loginname`, `def_language`, `deactivated` FROM `" . TABLE_PANEL_CUSTOMERS . "`
|
||||
WHERE `loginname`='" . $db->escape($loginname) . "'
|
||||
AND `email`='" . $db->escape($email) . "'";
|
||||
$result = $db->query($sql);
|
||||
|
||||
if($db->num_rows() == 0)
|
||||
{
|
||||
$sql = "SELECT `adminid`, `name`, `email`, `loginname` FROM `" . TABLE_PANEL_ADMINS . "`
|
||||
if ($db->num_rows() == 0) {
|
||||
$sql = "SELECT `adminid`, `name`, `email`, `loginname`, `def_language` FROM `" . TABLE_PANEL_ADMINS . "`
|
||||
WHERE `loginname`='" . $db->escape($loginname) . "'
|
||||
AND `email`='" . $db->escape($email) . "'";
|
||||
$result = $db->query($sql);
|
||||
$adminchecked = true;
|
||||
}
|
||||
|
||||
$user = $db->fetch_array($result);
|
||||
|
||||
if(($adminchecked && $settings['panel']['allow_preset_admin'] == '1')
|
||||
|| $adminchecked == false)
|
||||
{
|
||||
if($user !== false)
|
||||
{
|
||||
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
||||
|
||||
if($adminchecked)
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `password`='" . md5($password) . "'
|
||||
WHERE `loginname`='" . $user['loginname'] . "'
|
||||
AND `email`='" . $user['email'] . "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `password`='" . md5($password) . "'
|
||||
WHERE `loginname`='" . $user['loginname'] . "'
|
||||
AND `email`='" . $user['email'] . "'");
|
||||
}
|
||||
|
||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||
$rstlog->logAction(USR_ACTION, LOG_WARNING, "Password for user '" . $user['loginname'] . "' has been reset!");
|
||||
$body = strtr($lng['pwdreminder']['body'], array('%s' => $user['firstname'] . ' ' . $user['name'], '%p' => $password));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $lng['pwdreminder']['subject'];
|
||||
$mail->AltBody = $body;
|
||||
$mail->MsgHTML(str_replace("\\n", "<br />", $body));
|
||||
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
if ($db->num_rows() > 0) {
|
||||
$adminchecked = true;
|
||||
} else {
|
||||
$result = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($result !== null) {
|
||||
$user = $db->fetch_array($result);
|
||||
|
||||
/* Check whether user is banned */
|
||||
if ($user['deactivated']) {
|
||||
$message = $lng['pwdreminder']['notallowed'];
|
||||
redirectTo('index.php', Array('showmessage' => '5'), true);
|
||||
}
|
||||
|
||||
if (($adminchecked && $settings['panel']['allow_preset_admin'] == '1')
|
||||
|| $adminchecked == false
|
||||
) {
|
||||
if ($user !== false) {
|
||||
if ($settings['panel']['password_min_length'] <= 6) {
|
||||
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
||||
} else {
|
||||
// make it two times larger than password_min_length
|
||||
$rnd = '';
|
||||
$minlength = $settings['panel']['password_min_length'];
|
||||
while (strlen($rnd) < ($minlength * 2)) {
|
||||
$rnd .= md5(uniqid(microtime(), 1));
|
||||
}
|
||||
$password = substr($rnd, (int)($minlength / 2), $minlength);
|
||||
}
|
||||
|
||||
$passwordTable = $adminchecked ? TABLE_PANEL_ADMINS : TABLE_PANEL_CUSTOMERS;
|
||||
$db->query("UPDATE `" . $passwordTable . "` SET `password`='" . md5($password) . "'
|
||||
WHERE `loginname`='" . $user['loginname'] . "'
|
||||
AND `email`='" . $user['email'] . "'");
|
||||
|
||||
if ($_mailerror) {
|
||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
redirectTo('index.php', Array('showmessage' => '4'), true);
|
||||
$rstlog->logAction(USR_ACTION, LOG_WARNING, "Password for user '" . $user['loginname'] . "' has been reset!");
|
||||
|
||||
$replace_arr = array(
|
||||
'SALUTATION' => getCorrectUserSalutation($user),
|
||||
'USERNAME' => $user['loginname'],
|
||||
'PASSWORD' => $password
|
||||
);
|
||||
|
||||
$body = strtr($lng['pwdreminder']['body'], array('%s' => $user['firstname'] . ' ' . $user['name'], '%p' => $password));
|
||||
|
||||
$def_language = ($user['def_language'] != '') ? $user['def_language'] : $settings['panel']['standardlanguage'];
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$user['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'password_reset_subject\'');
|
||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['pwdreminder']['subject']), $replace_arr));
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$user['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'password_reset_mailbody\'');
|
||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $body), $replace_arr));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($user['email'], $user['firstname'] . ' ' . $user['name']);
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
redirectTo('index.php', Array('showmessage' => '4', 'customermail' => $user['email']), true);
|
||||
exit;
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
redirectTo('index.php', Array('showmessage' => '1'), true);
|
||||
exit;
|
||||
} else {
|
||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||
$rstlog->logAction(USR_ACTION, LOG_WARNING, "User '" . $loginname . "' tried to reset pwd but wasn't found in database!");
|
||||
$message = $lng['login']['combination_not_found'];
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
redirectTo('index.php', Array('showmessage' => '1'), true);
|
||||
exit;
|
||||
unset($user);
|
||||
}
|
||||
else
|
||||
{
|
||||
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'password_reset'), $db, $settings);
|
||||
$rstlog->logAction(USR_ACTION, LOG_WARNING, "User '" . $loginname . "' tried to reset pwd but wasn't found in database!");
|
||||
$message = $lng['login']['usernotfound'];
|
||||
}
|
||||
|
||||
unset($user);
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = '';
|
||||
} else {
|
||||
$message = $lng['login']['usernotfound'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = '';
|
||||
}
|
||||
|
||||
if($adminchecked)
|
||||
{
|
||||
if($settings['panel']['allow_preset_admin'] != '1')
|
||||
{
|
||||
if ($adminchecked) {
|
||||
if ($settings['panel']['allow_preset_admin'] != '1') {
|
||||
$message = $lng['pwdreminder']['notallowed'];
|
||||
unset ($adminchecked);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($settings['panel']['allow_preset'] != '1')
|
||||
{
|
||||
} else {
|
||||
if ($settings['panel']['allow_preset'] != '1') {
|
||||
$message = $lng['pwdreminder']['notallowed'];
|
||||
}
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("fpwd") . "\";");
|
||||
eval("echo \"" . getTemplate('fpwd') . "\";");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
@@ -10,819 +9,14 @@
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Michael Kaufmann <mkaufmann@nutime.de>
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Install
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Most elements are taken from the phpBB (www.phpbb.com)
|
||||
* installer, (c) 1999 - 2004 phpBB Group.
|
||||
*/
|
||||
require 'lib/class.FroxlorInstall.php';
|
||||
|
||||
if(file_exists('../lib/userdata.inc.php'))
|
||||
{
|
||||
/**
|
||||
* Includes the Usersettings eg. MySQL-Username/Passwort etc. to test if Froxlor is already installed
|
||||
*/
|
||||
|
||||
require ('../lib/userdata.inc.php');
|
||||
|
||||
if(isset($sql)
|
||||
&& is_array($sql))
|
||||
{
|
||||
die('Sorry, Froxlor is already configured...');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Include the functions
|
||||
*/
|
||||
|
||||
require ('../lib/functions.php');
|
||||
|
||||
/**
|
||||
* Include the MySQL-Table-Definitions
|
||||
*/
|
||||
|
||||
require ('../lib/tables.inc.php');
|
||||
|
||||
/**
|
||||
* Language Managament
|
||||
*/
|
||||
|
||||
$languages = Array(
|
||||
'german' => 'Deutsch',
|
||||
'english' => 'English',
|
||||
'french' => 'Francais'
|
||||
);
|
||||
$standardlanguage = 'english';
|
||||
|
||||
if(isset($_GET['language'])
|
||||
&& isset($languages[$_GET['language']]))
|
||||
{
|
||||
$language = $_GET['language'];
|
||||
}
|
||||
elseif(isset($_POST['language'])
|
||||
&& isset($languages[$_POST['language']]))
|
||||
{
|
||||
$language = $_POST['language'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$language = $standardlanguage;
|
||||
}
|
||||
|
||||
if(file_exists('./lng/' . $language . '.lng.php'))
|
||||
{
|
||||
/**
|
||||
* Includes file /lng/$language.lng.php if it exists
|
||||
*/
|
||||
|
||||
require ('./lng/' . $language . '.lng.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* BEGIN FUNCTIONS -----------------------------------------------
|
||||
*/
|
||||
|
||||
function page_header()
|
||||
{
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
|
||||
<link rel="stylesheet" href="../templates/main.css" type="text/css" />
|
||||
<title>Froxlor</title>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0;" onload="document.loginform.loginname.focus()">
|
||||
<!--
|
||||
We request you retain the full copyright notice below including the link to www.froxlor.org.
|
||||
This not only gives respect to the large amount of time given freely by the developers
|
||||
but also helps build interest, traffic and use of Froxlor. If you refuse
|
||||
to include even this then support on our forums may be affected.
|
||||
The Froxlor Team : 2009-2010
|
||||
// -->
|
||||
<!--
|
||||
Templates based on work by Luca Piona (info@havanastudio.ch) and Luca Longinotti (chtekk@gentoo.org)
|
||||
// -->
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="800"><img src="../images/header.gif" width="800" height="90" alt="" /></td>
|
||||
<td class="header"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td valign="top" bgcolor="#FFFFFF">
|
||||
<br />
|
||||
<br />
|
||||
<?php
|
||||
}
|
||||
|
||||
function page_footer()
|
||||
{
|
||||
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="100%" class="footer">
|
||||
<br />Froxlor © 2009-2010 by <a href="http://www.froxlor.org/" target="_blank">the Froxlor Team</a>
|
||||
<br /><br/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
|
||||
function status_message($case, $text)
|
||||
{
|
||||
if($case == 'begin')
|
||||
{
|
||||
echo "\t\t<tr>\n\t\t\t<td class=\"main_field_name\">$text";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " <span style=\"color:$case;\">$text</span></td>\n\t\t</tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* END FUNCTIONS ---------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* BEGIN VARIABLES ---------------------------------------------------
|
||||
*/
|
||||
|
||||
//guess Servername
|
||||
|
||||
if(!empty($_POST['servername']))
|
||||
{
|
||||
$servername = $_POST['servername'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!empty($_SERVER['SERVER_NAME']))
|
||||
{
|
||||
if(validate_ip($_SERVER['SERVER_NAME'], true) == false)
|
||||
{
|
||||
$servername = $_SERVER['SERVER_NAME'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$servername = '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$servername = '';
|
||||
}
|
||||
}
|
||||
|
||||
//guess serverip
|
||||
|
||||
if(!empty($_POST['serverip']))
|
||||
{
|
||||
$serverip = $_POST['serverip'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!empty($_SERVER['SERVER_ADDR']))
|
||||
{
|
||||
$serverip = $_SERVER['SERVER_ADDR'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$serverip = '';
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_POST['mysql_host']))
|
||||
{
|
||||
$mysql_host = $_POST['mysql_host'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mysql_host = '127.0.0.1';
|
||||
}
|
||||
|
||||
if(!empty($_POST['mysql_database']))
|
||||
{
|
||||
$mysql_database = $_POST['mysql_database'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mysql_database = 'froxlor';
|
||||
}
|
||||
|
||||
if(!empty($_POST['mysql_unpriv_user']))
|
||||
{
|
||||
$mysql_unpriv_user = $_POST['mysql_unpriv_user'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mysql_unpriv_user = 'froxlor';
|
||||
}
|
||||
|
||||
if(!empty($_POST['mysql_unpriv_pass']))
|
||||
{
|
||||
$mysql_unpriv_pass = $_POST['mysql_unpriv_pass'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mysql_unpriv_pass = '';
|
||||
}
|
||||
|
||||
if(!empty($_POST['mysql_root_user']))
|
||||
{
|
||||
$mysql_root_user = $_POST['mysql_root_user'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mysql_root_user = 'root';
|
||||
}
|
||||
|
||||
if(!empty($_POST['mysql_root_pass']))
|
||||
{
|
||||
$mysql_root_pass = $_POST['mysql_root_pass'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mysql_root_pass = '';
|
||||
}
|
||||
|
||||
if(!empty($_POST['admin_user']))
|
||||
{
|
||||
$admin_user = $_POST['admin_user'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$admin_user = 'admin';
|
||||
}
|
||||
|
||||
if(!empty($_POST['admin_pass1']))
|
||||
{
|
||||
$admin_pass1 = $_POST['admin_pass1'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$admin_pass1 = '';
|
||||
}
|
||||
|
||||
if(!empty($_POST['admin_pass2']))
|
||||
{
|
||||
$admin_pass2 = $_POST['admin_pass2'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$admin_pass2 = '';
|
||||
}
|
||||
|
||||
if($mysql_host == 'localhost'
|
||||
|| $mysql_host == '127.0.0.1')
|
||||
{
|
||||
$mysql_access_host = $mysql_host;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mysql_access_host = $serverip;
|
||||
}
|
||||
|
||||
// gues http software
|
||||
|
||||
if(!empty($_POST['webserver']))
|
||||
{
|
||||
$webserver = $_POST['webserver'];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER"
|
||||
|| stristr($_SERVER[SERVER_SOFTWARE], "apache/2"))
|
||||
{
|
||||
$webserver = 'apache2';
|
||||
}
|
||||
elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "LIGHTTPD"
|
||||
|| stristr($_SERVER[SERVER_SOFTWARE], "lighttpd"))
|
||||
{
|
||||
$webserver = 'lighttpd';
|
||||
}
|
||||
else
|
||||
{
|
||||
// we don't need to bail out, since unknown does not affect any critical installation routines
|
||||
|
||||
$webserver = 'unknown';
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_POST['httpuser']))
|
||||
{
|
||||
$httpuser = $_POST['httpuser'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$httpuser = '';
|
||||
}
|
||||
|
||||
if(!empty($_POST['httpgroup']))
|
||||
{
|
||||
$httpgroup = $_POST['httpgroup'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$httpgroup = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* END VARIABLES ---------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* BEGIN INSTALL ---------------------------------------------------
|
||||
*/
|
||||
|
||||
if(isset($_POST['installstep'])
|
||||
&& $_POST['installstep'] == '1'
|
||||
&& $admin_pass1 == $admin_pass2
|
||||
&& $admin_pass1 != ''
|
||||
&& $admin_pass2 != ''
|
||||
&& $mysql_unpriv_pass != ''
|
||||
&& $mysql_root_pass != ''
|
||||
&& $servername != ''
|
||||
&& $serverip != ''
|
||||
&& $httpuser != ''
|
||||
&& $httpgroup != ''
|
||||
&& $mysql_unpriv_user != $mysql_root_user)
|
||||
{
|
||||
page_header();
|
||||
|
||||
?>
|
||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable">
|
||||
<tr>
|
||||
<td class="maintitle"><b><img src="../images/title.gif" alt="" /> Froxlor Installation</b></td>
|
||||
</tr>
|
||||
<?php
|
||||
$_die = false;
|
||||
|
||||
// check for correct php version
|
||||
status_message('begin', $lng['install']['phpversion']);
|
||||
|
||||
if(version_compare("5.2.0", PHP_VERSION, ">="))
|
||||
{
|
||||
status_message('red', $lng['install']['notinstalled']);
|
||||
$_die = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('green', 'OK');
|
||||
}
|
||||
|
||||
|
||||
status_message('begin', $lng['install']['phpmysql']);
|
||||
|
||||
if(!extension_loaded('mysql'))
|
||||
{
|
||||
status_message('red', $lng['install']['notinstalled']);
|
||||
$_die = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('green', 'OK');
|
||||
}
|
||||
|
||||
status_message('begin', $lng['install']['phpfilter']);
|
||||
|
||||
if(!extension_loaded('filter'))
|
||||
{
|
||||
status_message('red', $lng['install']['notinstalled']);
|
||||
$_die = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('green', 'OK');
|
||||
}
|
||||
|
||||
status_message('begin', $lng['install']['phpposix']);
|
||||
|
||||
if(!extension_loaded('posix'))
|
||||
{
|
||||
status_message('red', $lng['install']['notinstalled']);
|
||||
$_die = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('green', 'OK');
|
||||
}
|
||||
|
||||
status_message('begin', $lng['install']['phpbcmath']);
|
||||
|
||||
if(!extension_loaded('bcmath'))
|
||||
{
|
||||
status_message('orange', $lng['install']['notinstalled'] . '<br />' . $lng['install']['bcmathdescription']);
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('green', 'OK');
|
||||
}
|
||||
|
||||
status_message('begin', $lng['install']['openbasedir']);
|
||||
$php_ob = @ini_get("open_basedir");
|
||||
|
||||
if(!empty($php_ob)
|
||||
&& $php_ob != '')
|
||||
{
|
||||
status_message('orange', $lng['install']['openbasedirenabled']);
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('green', 'OK');
|
||||
}
|
||||
|
||||
if($_die)
|
||||
{
|
||||
status_message('begin', $lng['install']['diedbecauseofrequirements']);
|
||||
die();
|
||||
}
|
||||
|
||||
//first test if we can access the database server with the given root user and password
|
||||
|
||||
status_message('begin', $lng['install']['testing_mysql']);
|
||||
$db_root = new db($mysql_host, $mysql_root_user, $mysql_root_pass, '');
|
||||
|
||||
//ok, if we are here, the database class is build up (otherwise it would have already die'd this script)
|
||||
|
||||
status_message('green', 'OK');
|
||||
|
||||
//first we make a backup of the old DB if it exists
|
||||
|
||||
status_message('begin', $lng['install']['backup_old_db']);
|
||||
$result = mysql_list_tables($mysql_database);
|
||||
|
||||
if($result)
|
||||
{
|
||||
$filename = "/tmp/froxlor_backup_" . date(YmdHi) . ".sql";
|
||||
|
||||
if(is_file("/usr/bin/mysqldump"))
|
||||
{
|
||||
$command = "/usr/bin/mysqldump " . $mysql_database . " -u " . $mysql_root_user . " --password='" . $mysql_root_pass . "' --result-file=" . $filename;
|
||||
$output = exec($command);
|
||||
|
||||
if(stristr($output, "error"))
|
||||
{
|
||||
status_message('red', $lng['install']['backing_up_failed']);
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('green', 'OK');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('red', $lng['install']['backing_up_binary_missing']);
|
||||
}
|
||||
}
|
||||
|
||||
//so first we have to delete the database and the user given for the unpriv-user if they exit
|
||||
|
||||
status_message('begin', $lng['install']['erasing_old_db']);
|
||||
$db_root->query("DELETE FROM `mysql`.`user` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
|
||||
$db_root->query("DELETE FROM `mysql`.`db` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
|
||||
$db_root->query("DELETE FROM `mysql`.`tables_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
|
||||
$db_root->query("DELETE FROM `mysql`.`columns_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'");
|
||||
$db_root->query("DROP DATABASE IF EXISTS `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "` ;");
|
||||
$db_root->query("FLUSH PRIVILEGES;");
|
||||
status_message('green', 'OK');
|
||||
|
||||
//then we have to create a new user and database for the froxlor unprivileged mysql access
|
||||
|
||||
status_message('begin', $lng['install']['create_mysqluser_and_db']);
|
||||
$db_root->query("CREATE DATABASE `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`");
|
||||
$mysql_access_host_array = array_map('trim', explode(',', $mysql_access_host));
|
||||
|
||||
if(in_array('127.0.0.1', $mysql_access_host_array)
|
||||
&& !in_array('localhost', $mysql_access_host_array))
|
||||
{
|
||||
$mysql_access_host_array[] = 'localhost';
|
||||
}
|
||||
|
||||
if(!in_array('127.0.0.1', $mysql_access_host_array)
|
||||
&& in_array('localhost', $mysql_access_host_array))
|
||||
{
|
||||
$mysql_access_host_array[] = '127.0.0.1';
|
||||
}
|
||||
|
||||
$mysql_access_host_array[] = $serverip;
|
||||
foreach($mysql_access_host_array as $mysql_access_host)
|
||||
{
|
||||
$db_root->query("GRANT ALL PRIVILEGES ON `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`.* TO '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' IDENTIFIED BY 'password'");
|
||||
$db_root->query("SET PASSWORD FOR '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' = PASSWORD('" . $db_root->escape($mysql_unpriv_pass) . "')");
|
||||
}
|
||||
|
||||
$db_root->query("FLUSH PRIVILEGES;");
|
||||
$mysql_access_host = implode(',', $mysql_access_host_array);
|
||||
status_message('green', 'OK');
|
||||
|
||||
//now a new database and the new froxlor-unprivileged-mysql-account have been created and we can fill it now with the data.
|
||||
|
||||
status_message('begin', $lng['install']['testing_new_db']);
|
||||
$db = new db($mysql_host, $mysql_unpriv_user, $mysql_unpriv_pass, $mysql_database);
|
||||
status_message('green', 'OK');
|
||||
status_message('begin', $lng['install']['importing_data']);
|
||||
$db_schema = './froxlor.sql';
|
||||
$sql_query = @file_get_contents($db_schema, 'r');
|
||||
$sql_query = remove_remarks($sql_query);
|
||||
$sql_query = split_sql_file($sql_query, ';');
|
||||
for ($i = 0;$i < sizeof($sql_query);$i++)
|
||||
{
|
||||
if(trim($sql_query[$i]) != '')
|
||||
{
|
||||
$result = $db->query($sql_query[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
status_message('green', 'OK');
|
||||
status_message('begin', 'System Servername...');
|
||||
|
||||
if(validate_ip($_SERVER['SERVER_NAME'], true) !== false)
|
||||
{
|
||||
status_message('red', $lng['install']['servername_should_be_fqdn']);
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('green', 'OK');
|
||||
}
|
||||
|
||||
//now let's change the settings in our settings-table
|
||||
|
||||
status_message('begin', $lng['install']['changing_data']);
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = 'admin@" . $db->escape($servername) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'adminmail'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($serverip) . "' WHERE `settinggroup` = 'system' AND `varname` = 'ipaddress'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($servername) . "' WHERE `settinggroup` = 'system' AND `varname` = 'hostname'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($version) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'version'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($languages[$language]) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'standardlanguage'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($mysql_access_host) . "' WHERE `settinggroup` = 'system' AND `varname` = 'mysql_access_host'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'");
|
||||
|
||||
//FIXME
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
|
||||
|
||||
if($webserver == "apache2")
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/apache2 reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
|
||||
}
|
||||
elseif($webserver == "lighttpd")
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/conf-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-diroptions/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/lighttpd.pem' WHERE `settinggroup` = 'system' AND `varname` = 'ssl_cert_file'");
|
||||
}
|
||||
|
||||
// insert the lastcronrun to be the installation date
|
||||
|
||||
$query = 'UPDATE `%s` SET `value` = UNIX_TIMESTAMP() WHERE `settinggroup` = \'system\' AND `varname` = \'lastcronrun\'';
|
||||
$query = sprintf($query, TABLE_PANEL_SETTINGS);
|
||||
$db->query($query);
|
||||
|
||||
// and lets insert the default ip and port
|
||||
|
||||
$query = 'INSERT INTO `%s` SET `ip` = \'%s\', `port` = \'80\' ';
|
||||
$query = sprintf($query, TABLE_PANEL_IPSANDPORTS, $db->escape($serverip));
|
||||
$db->query($query);
|
||||
$defaultip = $db->insert_id();
|
||||
|
||||
// insert the defaultip
|
||||
|
||||
$query = 'UPDATE `%s` SET `value` = \'%s\' WHERE `settinggroup` = \'system\' AND `varname` = \'defaultip\'';
|
||||
$query = sprintf($query, TABLE_PANEL_SETTINGS, $db->escape($defaultip));
|
||||
$db->query($query);
|
||||
status_message('green', 'OK');
|
||||
|
||||
//last but not least create the main admin
|
||||
|
||||
status_message('begin', $lng['install']['adding_admin_user']);
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET
|
||||
`loginname` = '" . $db->escape($admin_user) . "',
|
||||
`password` = '" . md5($admin_pass1) . "',
|
||||
`name` = 'Siteadmin',
|
||||
`email` = 'admin@" . $db->escape($servername) . "',
|
||||
`customers` = -1,
|
||||
`customers_used` = 0,
|
||||
`customers_see_all` = 1,
|
||||
`caneditphpsettings` = 1,
|
||||
`domains` = -1,
|
||||
`domains_used` = 0,
|
||||
`domains_see_all` = 1,
|
||||
`change_serversettings` = 1,
|
||||
`diskspace` = -1024,
|
||||
`diskspace_used` = 0,
|
||||
`mysqls` = -1,
|
||||
`mysqls_used` = 0,
|
||||
`emails` = -1,
|
||||
`emails_used` = 0,
|
||||
`email_accounts` = -1,
|
||||
`email_accounts_used` = 0,
|
||||
`email_forwarders` = -1,
|
||||
`email_forwarders_used` = 0,
|
||||
`email_quota` = -1,
|
||||
`email_quota_used` = 0,
|
||||
`ftps` = -1,
|
||||
`ftps_used` = 0,
|
||||
`tickets` = -1,
|
||||
`tickets_used` = 0,
|
||||
`subdomains` = -1,
|
||||
`subdomains_used` = 0,
|
||||
`traffic` = -1048576,
|
||||
`traffic_used` = 0,
|
||||
`deactivated` = 0,
|
||||
`aps_packages` = -1");
|
||||
status_message('green', 'OK');
|
||||
|
||||
//now we create the userdata.inc.php with the mysql-accounts
|
||||
|
||||
status_message('begin', $lng['install']['creating_configfile']);
|
||||
$userdata = "<?php\n";
|
||||
$userdata.= "//automatically generated userdata.inc.php for Froxlor\n";
|
||||
$userdata.= "\$sql['host']='" . addcslashes($mysql_host, "'\\") . "';\n";
|
||||
$userdata.= "\$sql['user']='" . addcslashes($mysql_unpriv_user, "'\\") . "';\n";
|
||||
$userdata.= "\$sql['password']='" . addcslashes($mysql_unpriv_pass, "'\\") . "';\n";
|
||||
$userdata.= "\$sql['db']='" . addcslashes($mysql_database, "'\\") . "';\n";
|
||||
$userdata.= "\$sql_root[0]['caption']='Default';\n";
|
||||
$userdata.= "\$sql_root[0]['host']='" . addcslashes($mysql_host, "'\\") . "';\n";
|
||||
$userdata.= "\$sql_root[0]['user']='" . addcslashes($mysql_root_user, "'\\") . "';\n";
|
||||
$userdata.= "\$sql_root[0]['password']='" . addcslashes($mysql_root_pass, "'\\") . "';\n";
|
||||
$userdata.= "?>";
|
||||
|
||||
//we test now if we can store the userdata.inc.php in ../lib
|
||||
|
||||
if($fp = @fopen('../lib/userdata.inc.php', 'w'))
|
||||
{
|
||||
$result = @fputs($fp, $userdata, strlen($userdata));
|
||||
@fclose($fp);
|
||||
status_message('green', $lng['install']['creating_configfile_succ']);
|
||||
chmod('../lib/userdata.inc.php', 0440);
|
||||
}
|
||||
elseif($fp = @fopen('/tmp/userdata.inc.php', 'w'))
|
||||
{
|
||||
$result = @fputs($fp, $userdata, strlen($userdata));
|
||||
@fclose($fp);
|
||||
status_message('orange', $lng['install']['creating_configfile_temp']);
|
||||
chmod('/tmp/userdata.inc.php', 0440);
|
||||
}
|
||||
else
|
||||
{
|
||||
status_message('red', $lng['install']['creating_configfile_failed']);
|
||||
echo "\t\t<tr>\n\t\t\t<td class=\"main_field_name\"><p>" . nl2br(htmlspecialchars($userdata)) . "</p></td>\n\t\t</tr>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="main_field_display" align="center">
|
||||
<?php echo $lng['install']['froxlor_succ_installed']; ?><br />
|
||||
<a href="../index.php"><?php echo $lng['install']['click_here_to_login']; ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
<?php
|
||||
page_footer();
|
||||
}
|
||||
else
|
||||
{
|
||||
page_header();
|
||||
|
||||
?>
|
||||
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="get">
|
||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
|
||||
<tr>
|
||||
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['welcome']; ?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name" colspan="2"><?php echo $lng['install']['welcometext']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"><?php echo $lng['install']['language']; ?>: </td>
|
||||
<td class="main_field_display" nowrap="nowrap">
|
||||
<select name="language" class="dropdown_noborder"><?php
|
||||
$language_options = '';
|
||||
|
||||
while(list($language_file, $language_name) = each($languages))
|
||||
{
|
||||
$language_options.= "\n\t\t\t\t\t\t" . makeoption($language_name, $language_file, $language, true, true);
|
||||
}
|
||||
|
||||
echo $language_options;
|
||||
|
||||
?>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_confirm" colspan="2">
|
||||
<input class="bottom" type="submit" name="chooselang" value="Go" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br />
|
||||
<form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="post">
|
||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_40">
|
||||
<tr>
|
||||
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['database']; ?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"><?php echo $lng['install']['mysql_hostname']; ?>:</td>
|
||||
<td class="main_field_display"><input type="text" name="mysql_host" value="<?php echo htmlspecialchars($mysql_host); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"><?php echo $lng['install']['mysql_database']; ?>:</td>
|
||||
<td class="main_field_display"><input type="text" name="mysql_database" value="<?php echo htmlspecialchars($mysql_database); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_user']; ?>:</td>
|
||||
<td class="main_field_display"><input type="text" name="mysql_unpriv_user" value="<?php echo htmlspecialchars($mysql_unpriv_user); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $mysql_unpriv_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_unpriv_pass']; ?>:</td>
|
||||
<td class="main_field_display"><input type="password" name="mysql_unpriv_pass" value="<?php echo htmlspecialchars($mysql_unpriv_pass); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo (($mysql_unpriv_user == $mysql_root_user) ? ' style="color:blue;"' : ''); ?>><?php echo $lng['install']['mysql_root_user']; ?>:</td>
|
||||
<td class="main_field_display"><input type="text" name="mysql_root_user" value="<?php echo htmlspecialchars($mysql_root_user); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $mysql_root_pass == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['mysql_root_pass']; ?>:</td>
|
||||
<td class="main_field_display"><input type="password" name="mysql_root_pass" value="<?php echo htmlspecialchars($mysql_root_pass); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['admin_account']; ?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"><?php echo $lng['install']['admin_user']; ?>:</td>
|
||||
<td class="main_field_display"><input type="text" name="admin_user" value="<?php echo htmlspecialchars($admin_user); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && ($admin_pass1 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass']; ?>:</td>
|
||||
<td class="main_field_display"><input type="password" name="admin_pass1" value="<?php echo htmlspecialchars($admin_pass1); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && ($admin_pass2 == '' || $admin_pass1 != $admin_pass2)) ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['admin_pass_confirm']; ?>:</td>
|
||||
<td class="main_field_display"><input type="password" name="admin_pass2" value="<?php echo htmlspecialchars($admin_pass2); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="maintitle" colspan="2"><b><img src="../images/title.gif" alt="" /> <?php echo $lng['install']['serversettings']; ?></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $servername == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['servername']; ?>:</td>
|
||||
<td class="main_field_display"><input type="text" name="servername" value="<?php echo htmlspecialchars($servername); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['serverip']; ?>:</td>
|
||||
<td class="main_field_display"><input type="text" name="serverip" value="<?php echo htmlspecialchars($serverip); ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $webserver == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['webserver']; ?>:</td>
|
||||
<td class="main_field_display"><input type="radio" name="webserver" value="apache2" <?php echo $webserver == "apache2" ? 'checked="checked"' : "" ?>/>Apache2 <br /><input type="radio" name="webserver" value="lighttpd" <?php echo $webserver == "lighttpd" ? 'checked="checked"' : "" ?>/>Lighttpd</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpuser']; ?>:</td>
|
||||
<td class="main_field_display"><input type="text" name="httpuser" value="<?php $posixusername = posix_getpwuid(posix_getuid()); echo $posixusername['name']; ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_name"<?php echo ((!empty($_POST['installstep']) && $serverip == '') ? ' style="color:red;"' : ''); ?>><?php echo $lng['install']['httpgroup']; ?>:</td>
|
||||
<td class="main_field_display"><input type="text" name="httpgroup" value="<?php $posixgroup = posix_getgrgid(posix_getgid()); echo $posixgroup['name']; ?>"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="main_field_confirm" colspan="2"><input type="hidden" name="language" value="<?php echo htmlspecialchars($language); ?>"/><input type="hidden" name="installstep" value="1"/><input class="bottom" type="submit" name="submitbutton" value="<?php echo $lng['install']['next']; ?>"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<?php
|
||||
page_footer();
|
||||
}
|
||||
|
||||
/**
|
||||
* END INSTALL ---------------------------------------------------
|
||||
*/
|
||||
|
||||
?>
|
||||
$frxinstall = new FroxlorInstall();
|
||||
$frxinstall->run();
|
||||
|
||||
1166
install/lib/class.FroxlorInstall.php
Normal file
@@ -14,74 +14,71 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Language
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Begin
|
||||
*/
|
||||
$lng['requirements']['title'] = 'Checking system requirements...';
|
||||
$lng['requirements']['installed'] = 'installed';
|
||||
$lng['requirements']['not_true'] = 'no';
|
||||
$lng['requirements']['notfound'] = 'not found';
|
||||
$lng['requirements']['notinstalled'] = 'not installed';
|
||||
$lng['requirements']['activated'] = 'enabled';
|
||||
$lng['requirements']['phpversion'] = 'PHP version >= 5.2';
|
||||
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime...';
|
||||
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'PHP setting "magic_quotes_runtime" must be set to "Off". We have disabled it temporary for now please fix the coresponding php.ini.';
|
||||
$lng['requirements']['phpmysql'] = 'MySQL-extension...';
|
||||
$lng['requirements']['phpxml'] = 'PHP XML-extension...';
|
||||
$lng['requirements']['phpfilter'] = 'PHP filter-extension...';
|
||||
$lng['requirements']['phpposix'] = 'PHP posix-extension...';
|
||||
$lng['requirements']['phpbcmath'] = 'PHP bcmath-extension...';
|
||||
$lng['requirements']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
|
||||
$lng['requirements']['openbasedir'] = 'open_basedir...';
|
||||
$lng['requirements']['openbasedirenabled'] = 'Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor in the coresponding php.ini';
|
||||
$lng['requirements']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Try to fix them and retry.';
|
||||
$lng['requirements']['froxlor_succ_checks'] = 'All requirements are satisfied';
|
||||
|
||||
$lng['install']['language'] = 'Installation - Language';
|
||||
$lng['install']['welcome'] = 'Welcome to Froxlor Installation';
|
||||
$lng['install']['title'] = 'Froxlor install - chose language';
|
||||
$lng['install']['language'] = 'Installation language';
|
||||
$lng['install']['lngbtn_go'] = 'Change language';
|
||||
$lng['install']['title'] = 'Froxlor install - setup';
|
||||
$lng['install']['welcometext'] = 'Thank you for choosing Froxlor. Please fill out the following fields with the required information to start the installation.<br /><b>Attention:</b> If the database you chose for Froxlor already exists on your System, it will be erased with all containing data!';
|
||||
$lng['install']['database'] = 'Database';
|
||||
$lng['install']['mysql_hostname'] = 'MySQL-Hostname';
|
||||
$lng['install']['mysql_database'] = 'MySQL-Database';
|
||||
$lng['install']['database'] = 'Database connection';
|
||||
$lng['install']['mysql_host'] = 'MySQL-Hostname';
|
||||
$lng['install']['mysql_database'] = 'Database name';
|
||||
$lng['install']['mysql_unpriv_user'] = 'Username for the unprivileged MySQL-account';
|
||||
$lng['install']['mysql_unpriv_pass'] = 'Password for the unprivileged MySQL-account';
|
||||
$lng['install']['mysql_root_user'] = 'Username for the MySQL-root-account';
|
||||
$lng['install']['mysql_root_pass'] = 'Password for the MySQL-root-account';
|
||||
$lng['install']['admin_account'] = 'Administrator Account';
|
||||
$lng['install']['admin_user'] = 'Administrator Username';
|
||||
$lng['install']['admin_pass'] = 'Administrator Password';
|
||||
$lng['install']['admin_pass_confirm'] = 'Administrator-Password (confirm)';
|
||||
$lng['install']['admin_pass1'] = 'Administrator Password';
|
||||
$lng['install']['admin_pass2'] = 'Administrator-Password (confirm)';
|
||||
$lng['install']['serversettings'] = 'Server settings';
|
||||
$lng['install']['servername'] = 'Server name (FQDN)';
|
||||
$lng['install']['servername'] = 'Server name (FQDN, no ip-address)';
|
||||
$lng['install']['serverip'] = 'Server IP';
|
||||
$lng['install']['webserver'] = 'Webserver';
|
||||
$lng['install']['apache2'] = 'Apache 2';
|
||||
$lng['install']['lighttpd'] = 'LigHTTPd';
|
||||
$lng['install']['nginx'] = 'NGINX';
|
||||
$lng['install']['httpuser'] = 'HTTP username';
|
||||
$lng['install']['httpgroup'] = 'HTTP groupname';
|
||||
$lng['install']['apacheversion'] = 'Apacheversion';
|
||||
$lng['install']['next'] = 'Next';
|
||||
|
||||
/**
|
||||
* Progress
|
||||
*/
|
||||
|
||||
$lng['install']['testing_mysql'] = 'Testing if MySQL-root-username and password are correct...';
|
||||
$lng['install']['erasing_old_db'] = 'Erasing old Database...';
|
||||
$lng['install']['backup_old_db'] = 'Create backup of the old Database...';
|
||||
$lng['install']['backing_up'] = 'Backing up';
|
||||
$lng['install']['backing_up_binary_missing'] = '/usr/bin/mysqldump is missing';
|
||||
$lng['install']['create_mysqluser_and_db'] = 'Creating MySQL-database and username...';
|
||||
$lng['install']['testing_new_db'] = 'Testing if MySQL-database and username have been created correctly...';
|
||||
$lng['install']['importing_data'] = 'Importing data into MySQL-database...';
|
||||
$lng['install']['changing_data'] = 'Changing imported data...';
|
||||
$lng['install']['adding_admin_user'] = 'Adding Administrator Account...';
|
||||
$lng['install']['testing_mysql'] = 'Checking MySQL-root access...';
|
||||
$lng['install']['backup_old_db'] = 'Creating backup of old database...';
|
||||
$lng['install']['backup_binary_missing'] = 'Could not find mysqldump';
|
||||
$lng['install']['backup_failed'] = 'Could not backup database';
|
||||
$lng['install']['prepare_db'] = 'Preparing database...';
|
||||
$lng['install']['create_mysqluser_and_db'] = 'Creating database and username...';
|
||||
$lng['install']['testing_new_db'] = 'Testing if database and user have been created correctly...';
|
||||
$lng['install']['importing_data'] = 'Importing data...';
|
||||
$lng['install']['changing_data'] = 'Adjusting settings...';
|
||||
$lng['install']['creating_entries'] = 'Inserting new values...';
|
||||
$lng['install']['adding_admin_user'] = 'Creating admin-account...';
|
||||
$lng['install']['creating_configfile'] = 'Creating configfile...';
|
||||
$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php was saved in lib/.';
|
||||
$lng['install']['creating_configfile_temp'] = 'File was saved in /tmp/userdata.inc.php, please move to lib/.';
|
||||
$lng['install']['creating_configfile_failed'] = 'Cannot create lib/userdata.inc.php, please create it manually with the following data:';
|
||||
$lng['install']['creating_configfile_failed'] = 'Could not create lib/userdata.inc.php, please create it manually with the following content:';
|
||||
$lng['install']['froxlor_succ_installed'] = 'Froxlor was installed successfully.';
|
||||
$lng['install']['click_here_to_login'] = 'Click here to login.';
|
||||
$lng['install']['phpmysql'] = 'Testing if PHP MySQL-extension is installed...';
|
||||
$lng['install']['phpfilter'] = 'Testing if PHP filter-extension is installed...';
|
||||
$lng['install']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Aborting...';
|
||||
$lng['install']['notinstalled'] = 'not installed!';
|
||||
$lng['install']['phpbcmath'] = 'Testing if PHP bcmath-extension is installed...';
|
||||
$lng['install']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!';
|
||||
$lng['install']['openbasedir'] = 'Testing if open_basedir is enabled...';
|
||||
$lng['install']['openbasedirenabled'] = 'enabled. Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor';
|
||||
|
||||
/**
|
||||
* Renamed in 1.2.19-svn40
|
||||
*/
|
||||
|
||||
$lng['install']['webserver'] = 'Webserver';
|
||||
|
||||
/*
|
||||
* Added in Froxlor 0.9
|
||||
*/
|
||||
$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2';
|
||||
$lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...';
|
||||
|
||||
?>
|
||||
$lng['click_here_to_refresh'] = 'Click here to check again';
|
||||
$lng['click_here_to_continue'] = 'Click here to continue';
|
||||
$lng['click_here_to_login'] = 'Click here to login.';
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Tim Zielosko <mail@zielosko.net>
|
||||
* @author Romain MARIADASSOU <roms2000@free.fr>
|
||||
* @author Froxlor Team <team@froxlor.org>
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Language
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Begin
|
||||
*/
|
||||
|
||||
$lng['install']['language'] = 'Langue d\'installation';
|
||||
$lng['install']['welcome'] = 'Bienvenue <20> l\'installation de Froxlor';
|
||||
$lng['install']['welcometext'] = 'Merci beaucoup d\'avoir choisi Froxlor. Pour installer Froxlor remplissez les cases ci-dessous avec les informations demand<6E>es.<br /><b>Attention :</b> Si vous entrez le nom d\'une base de donn<6E>es existante, celle-ci sera effac<61>e !';
|
||||
$lng['install']['database'] = 'Base de donn<6E>es';
|
||||
$lng['install']['mysql_hostname'] = 'Nom d\'h<>te du serveur MySQL';
|
||||
$lng['install']['mysql_database'] = 'Base de donn<6E>es MySQL';
|
||||
$lng['install']['mysql_unpriv_user'] = 'Utilisateur pour l\'acc<63>s non privil<69>gi<67> <20> MySQL';
|
||||
$lng['install']['mysql_unpriv_pass'] = 'Mot de passe pour l\'acc<63>s non privil<69>gi<67> <20> MySQL';
|
||||
$lng['install']['mysql_root_user'] = 'Utilisateur pour l\'acc<63>s root <20> MySQL';
|
||||
$lng['install']['mysql_root_pass'] = 'Mot de passe pour l\'acc<63>s root <20> MySQL';
|
||||
$lng['install']['admin_account'] = 'Acc<63>s administratif';
|
||||
$lng['install']['admin_user'] = 'Login de l\'administrateur';
|
||||
$lng['install']['admin_pass'] = 'Mot de passe de l\'administrateur';
|
||||
$lng['install']['admin_pass_confirm'] = 'Mot de passe de l\'administrateur (confirmation)';
|
||||
$lng['install']['serversettings'] = 'Configuration du serveur';
|
||||
$lng['install']['servername'] = 'Nom du serveur (FQDN)';
|
||||
$lng['install']['serverip'] = 'Adresse IP du serveur';
|
||||
$lng['install']['apacheversion'] = 'Version du serveur Apache';
|
||||
$lng['install']['next'] = 'Continuer';
|
||||
|
||||
/**
|
||||
* Progress
|
||||
*/
|
||||
|
||||
$lng['install']['testing_mysql'] = 'V<>rification du login root de MySQL ...';
|
||||
$lng['install']['erasing_old_db'] = 'Effacement de l\'ancienne base de donn<6E>es ...';
|
||||
$lng['install']['create_mysqluser_and_db'] = 'Cr<43>ation de la base de donn<6E>es puis des utilisateurs ...';
|
||||
$lng['install']['testing_new_db'] = 'V<>rification de la base de donn<6E>es et des utilisateurs ...';
|
||||
$lng['install']['importing_data'] = 'Importation des informations dans la base de donn<6E>es ...';
|
||||
$lng['install']['changing_data'] = 'Modification des donn<6E>es import<72>s ...';
|
||||
$lng['install']['adding_admin_user'] = 'Ajout de l\'utilisateur administrateur ...';
|
||||
$lng['install']['creating_configfile'] = 'Cr<43>ation du fichier de configuration ...';
|
||||
$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php a <20>t<EFBFBD> sauvegard<72> dans le dossier lib/ de Froxlor.';
|
||||
$lng['install']['creating_configfile_temp'] = 'Le fichier a <20>t<EFBFBD> sauvegard<72> dans /tmp/userdata.inc.php, veuillez le d<>placer / copier dans le dossier lib/ de Froxlor.';
|
||||
$lng['install']['creating_configfile_failed'] = 'Erreur en cr<63>ant le fichier lib/userdata.inc.php, veuillez le cr<63>er avec le contenu ci-dessous :';
|
||||
$lng['install']['froxlor_succ_installed'] = 'Froxlor a <20>t<EFBFBD> install<6C> correctement.';
|
||||
$lng['install']['click_here_to_login'] = 'Cliquez ici pour vous rendre <20> l\'invite de connexion.';
|
||||
$lng['install']['httpuser'] = 'Nom du utilisateur du HTTP';
|
||||
$lng['install']['httpgroup'] = 'Nom du la group du HTTP';
|
||||
|
||||
/**
|
||||
* Renamed in 1.2.19-svn40
|
||||
*/
|
||||
|
||||
$lng['install']['webserver'] = 'Version du serveur';
|
||||
|
||||
?>
|
||||
@@ -2,86 +2,83 @@
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2007 the SysCP Team (see authors).
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.syscp.org/misc/COPYING.txt
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2007)
|
||||
* @author Froxlor Team <team@froxlor.org> (2010-)
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Language
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Begin
|
||||
*/
|
||||
$lng['requirements']['title'] = 'Prüfe Systemvoraussetzungen...';
|
||||
$lng['requirements']['installed'] = 'installiert';
|
||||
$lng['requirements']['not_true'] = 'nein';
|
||||
$lng['requirements']['notfound'] = 'nicht gefunden';
|
||||
$lng['requirements']['notinstalled'] = 'nicht installiert';
|
||||
$lng['requirements']['activated'] = 'ist aktiviert.';
|
||||
$lng['requirements']['phpversion'] = 'PHP Version >= 5.2';
|
||||
$lng['requirements']['phpmagic_quotes_runtime'] = 'magic_quotes_runtime';
|
||||
$lng['requirements']['phpmagic_quotes_runtime_description'] = 'Die PHP Einstellung "magic_quotes_runtime" muss deaktiviert sein ("Off"). Die Einstellung wurde temporär deaktiviert, bitte ändern Sie diese in der entsprechenden php.ini.';
|
||||
$lng['requirements']['phpmysql'] = 'PHP MySQL-Erweiterung...';
|
||||
$lng['requirements']['phpxml'] = 'PHP XML-Erweiterung...';
|
||||
$lng['requirements']['phpfilter'] = 'PHP filter-Erweiterung...';
|
||||
$lng['requirements']['phpposix'] = 'PHP posix-Erweiterung...';
|
||||
$lng['requirements']['phpbcmath'] = 'PHP bcmath-Erweiterung...';
|
||||
$lng['requirements']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!';
|
||||
$lng['requirements']['openbasedir'] = 'open_basedir genutzt wird...';
|
||||
$lng['requirements']['openbasedirenabled'] = 'Froxlor wird mit aktiviertem open_basedir nicht vollständig funktionieren. Bitte deaktivieren Sie open_basedir für Froxlor in der entsprechenden php.ini';
|
||||
$lng['requirements']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Versuchen Sie die angezeigten Problem zu beheben und versuchen Sie es erneut.';
|
||||
$lng['requirements']['froxlor_succ_checks'] = 'Alle Vorraussetzungen sind erfüllt';
|
||||
|
||||
$lng['install']['language'] = 'Installations - Sprache';
|
||||
$lng['install']['welcome'] = 'Willkommen zur Froxlor Installation';
|
||||
$lng['install']['welcometext'] = 'Vielen Dank dass Sie sich für Froxlor entschieden haben. Um Ihre Installation von Froxlor zu starten, füllen Sie bitte alle Felder unten mit den geforderten Angaben.<br /><b>Achtung:</b> Eine eventuell bereits existierende Datenbank, die den selben Namen hat wie den, den Sie unten eingeben werden, wird mit allen enthaltenen Daten gelöscht!';
|
||||
$lng['install']['database'] = 'Datenbank';
|
||||
$lng['install']['mysql_hostname'] = 'MySQL-Hostname';
|
||||
$lng['install']['mysql_database'] = 'MySQL-Datenbank';
|
||||
$lng['install']['mysql_unpriv_user'] = 'Benutzername für den unprivilegierten MySQL-Account';
|
||||
$lng['install']['mysql_unpriv_pass'] = 'Passwort für den unprivilegierten MySQL-Account';
|
||||
$lng['install']['mysql_root_user'] = 'Benutzername für den MySQL-Root-Account';
|
||||
$lng['install']['mysql_root_pass'] = 'Passwort für den MySQL-Root-Account';
|
||||
$lng['install']['lngtitle'] = 'Froxlor Installation - Sprache auswählen';
|
||||
$lng['install']['language'] = 'Sprache für die Installation';
|
||||
$lng['install']['lngbtn_go'] = 'Sprache ändern';
|
||||
$lng['install']['title'] = 'Froxlor Installation - Einrichtung';
|
||||
$lng['install']['welcometext'] = 'Vielen Dank dass Sie sich für Froxlor entschieden haben. Um die Installation von Froxlor zu starten, füllen Sie bitte alle Felder mit den geforderten Angaben aus.<br /><b>Achtung:</b> Eine eventuell existierende Datenbank, die den selben Namen hat wie den Gewählten, wird mit allen enthaltenen Daten gelöscht!';
|
||||
$lng['install']['database'] = 'Datenbankverbindung';
|
||||
$lng['install']['mysql_host'] = 'MySQL-Hostname';
|
||||
$lng['install']['mysql_database'] = 'Datenbank Name';
|
||||
$lng['install']['mysql_unpriv_user'] = 'Benutzername für den unprivilegierten MySQL-Account';
|
||||
$lng['install']['mysql_unpriv_pass'] = 'Passwort für den unprivilegierten MySQL-Account';
|
||||
$lng['install']['mysql_root_user'] = 'Benutzername für den MySQL-Root-Account';
|
||||
$lng['install']['mysql_root_pass'] = 'Passwort für den MySQL-Root-Account';
|
||||
$lng['install']['admin_account'] = 'Admin-Zugang';
|
||||
$lng['install']['admin_user'] = 'Administrator-Benutzername';
|
||||
$lng['install']['admin_pass'] = 'Administrator-Passwort';
|
||||
$lng['install']['admin_pass_confirm'] = 'Administrator-Passwort (Bestätigung)';
|
||||
$lng['install']['admin_pass1'] = 'Administrator-Passwort';
|
||||
$lng['install']['admin_pass2'] = 'Administrator-Passwort (Bestätigung)';
|
||||
$lng['install']['serversettings'] = 'Servereinstellungen';
|
||||
$lng['install']['servername'] = 'Servername (FQDN)';
|
||||
$lng['install']['servername'] = 'Servername (FQDN, keine IP-Adresse)';
|
||||
$lng['install']['serverip'] = 'Server-IP';
|
||||
$lng['install']['apacheversion'] = 'Apacheversion';
|
||||
$lng['install']['next'] = 'Fortfahren';
|
||||
|
||||
/**
|
||||
* Progress
|
||||
*/
|
||||
|
||||
$lng['install']['testing_mysql'] = 'Teste, ob die MySQL-Root-Benutzerdaten richtig sind...';
|
||||
$lng['install']['erasing_old_db'] = 'Entferne alte Datenbank...';
|
||||
$lng['install']['backup_old_db'] = 'Sichere bisherige Datenbank...';
|
||||
$lng['install']['backing_up'] = 'Sicherung läft';
|
||||
$lng['install']['backing_up_binary_missing'] = '/usr/bin/mysqldump nicht vorhanden';
|
||||
$lng['install']['create_mysqluser_and_db'] = 'Erstelle Datenbank und Benutzer...';
|
||||
$lng['install']['testing_new_db'] = 'Teste, ob die Datenbank und Passwort korrekt angelegt wurden...';
|
||||
$lng['install']['importing_data'] = 'Importiere Daten in die MySQL-Datenbank...';
|
||||
$lng['install']['changing_data'] = 'Passe die importierten Daten an...';
|
||||
$lng['install']['adding_admin_user'] = 'Füge den Admin-Benutzer hinzu...';
|
||||
$lng['install']['creating_configfile'] = 'Erstelle Konfigurationsdatei...';
|
||||
$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php wurde in lib/ gespeichert.';
|
||||
$lng['install']['creating_configfile_temp'] = 'Datei wurde in /tmp/userdata.inc.php gespeichert, bitte nach lib/ verschieben.';
|
||||
$lng['install']['creating_configfile_failed'] = 'Konnte lib/userdata.inc.php nicht erstellen, bitte manuell mit folgendem Inhalt anlegen:';
|
||||
$lng['install']['froxlor_succ_installed'] = 'Froxlor wurde erfolgreich installiert.';
|
||||
$lng['install']['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.';
|
||||
$lng['install']['phpmysql'] = 'Teste, ob die PHP MySQL-Erweiterung installiert ist...';
|
||||
$lng['install']['phpfilter'] = 'Teste, ob die PHP Filter-Erweiterung installiert ist...';
|
||||
$lng['install']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Breche ab...';
|
||||
$lng['install']['notinstalled'] = 'nicht installiert!';
|
||||
$lng['install']['phpbcmath'] = 'Teste, ob die PHP bcmath-Erweiterung installiert ist...';
|
||||
$lng['install']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!';
|
||||
$lng['install']['openbasedir'] = 'Teste, ob open_basedir genutzt wird...';
|
||||
$lng['install']['openbasedirenabled'] = 'aktiviert. Froxlor wird mit aktiviertem open_basedir nicht vollständig funktionieren. Bitte deaktivieren Sie open_basedir für Froxlor';
|
||||
$lng['install']['webserver'] = 'Webserver';
|
||||
$lng['install']['apache2'] = 'Apache 2';
|
||||
$lng['install']['lighttpd'] = 'LigHTTPd';
|
||||
$lng['install']['nginx'] = 'NGINX';
|
||||
$lng['install']['httpuser'] = 'HTTP Username';
|
||||
$lng['install']['httpgroup'] = 'HTTP Gruppenname';
|
||||
|
||||
/**
|
||||
* Renamed in 1.2.19-svn40
|
||||
*/
|
||||
$lng['install']['testing_mysql'] = 'Teste MySQL-Root Zugang...';
|
||||
$lng['install']['backup_old_db'] = 'Sicherung vorheriger Datenbank...';
|
||||
$lng['install']['backup_binary_missing'] = 'Konnte mysqldump nicht finden';
|
||||
$lng['install']['backup_failed'] = 'Sicherung fehlgeschlagen';
|
||||
$lng['install']['prepare_db'] = 'Datenbank wird vorbereitet...';
|
||||
$lng['install']['create_mysqluser_and_db'] = 'Erstelle Datenbank und Benutzer...';
|
||||
$lng['install']['testing_new_db'] = 'Teste, ob Datenbank und Benutzer korrekt angelegt wurden...';
|
||||
$lng['install']['importing_data'] = 'Importiere Daten...';
|
||||
$lng['install']['changing_data'] = 'Einstellungen anpassen...';
|
||||
$lng['install']['creating_entries'] = 'Trage neue Werte ein...';
|
||||
$lng['install']['adding_admin_user'] = 'Erstelle Admin-Benutzer...';
|
||||
$lng['install']['creating_configfile'] = 'Erstelle Konfigurationsdatei...';
|
||||
$lng['install']['creating_configfile_temp'] = 'Datei wurde in /tmp/userdata.inc.php gespeichert, bitte nach lib/ verschieben.';
|
||||
$lng['install']['creating_configfile_failed'] = 'Konnte lib/userdata.inc.php nicht erstellen, bitte manuell mit folgendem Inhalt anlegen:';
|
||||
$lng['install']['froxlor_succ_installed'] = 'Froxlor wurde erfolgreich installiert.';
|
||||
|
||||
$lng['install']['webserver'] = 'Webserver';
|
||||
|
||||
/*
|
||||
* Added in Froxlor 0.9
|
||||
*/
|
||||
$lng['install']['phpversion'] = 'Prüfe PHP Version >= 5.2';
|
||||
$lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...';
|
||||
|
||||
?>
|
||||
$lng['click_here_to_refresh'] = 'Hier klicken, um erneut zu prüfen';
|
||||
$lng['click_here_to_continue'] = 'Installation fortführen';
|
||||
$lng['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.';
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* @author Michael Duergner <michael@duergner.com>
|
||||
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
|
||||
* @package System
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
if(@php_sapi_name() != 'cli'
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* @author Martin Burchert <eremit@syscp.org>
|
||||
* @license GPLv2 http://files.syscp.org/misc/COPYING.txt
|
||||
* @package System
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
// some configs
|
||||
@@ -21,9 +21,7 @@ $baseLanguage = 'english.lng.php';
|
||||
|
||||
// Check if we're in the CLI
|
||||
|
||||
if(@php_sapi_name() != 'cli'
|
||||
&& @php_sapi_name() != 'cgi'
|
||||
&& @php_sapi_name() != 'cgi-fcgi')
|
||||
if(@php_sapi_name() != 'cli')
|
||||
{
|
||||
die('This script will only work in the shell.');
|
||||
}
|
||||
@@ -183,4 +181,4 @@ function compare($array1, $array2)
|
||||
return $result;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
531
install/templates/assets/css/install.css
Executable file
@@ -0,0 +1,531 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
/* RESET */
|
||||
html,body,div,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input { margin:0; padding:0; }
|
||||
h1,h2,h3,h4,h5,h6,pre,code,address,caption,cite,code,em,strong,th { font-size:1em; font-weight:400; font-style:normal; }
|
||||
ul,ol { list-style:none; }
|
||||
fieldset,img { border:none; }
|
||||
caption,th { text-align:left; }
|
||||
table { border-collapse:collapse; border-spacing:0; }
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section { display:block; }
|
||||
|
||||
/* TYPE */
|
||||
html,body {
|
||||
font:12px/18px Helvetica,Arial,Verdana,sans-serif;
|
||||
background-color:#f2f2f2;
|
||||
color:#333;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
body {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.dark {
|
||||
background-color: #e9edf0;
|
||||
border-bottom:1px solid #d1d5d8;
|
||||
}
|
||||
|
||||
header img {
|
||||
padding:10px 0 10px 10px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
display:none;
|
||||
}
|
||||
|
||||
h2, h3 {
|
||||
margin: 0 0 1em 0;
|
||||
padding: 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size:17px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
|
||||
img {
|
||||
border:0;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
td a {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
.bradius {
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
box-shadow: rgba(0, 0, 0, 0.34902) 0px 1px 3px 0px;
|
||||
}
|
||||
|
||||
/* FOOTER */
|
||||
footer {
|
||||
clear:both;
|
||||
text-align:center;
|
||||
color: #888;
|
||||
font-size:10px !important;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
footer a,footer a:active,footer a:visited {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.install {
|
||||
background-color:#fff;
|
||||
margin: 20px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 12px;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 10px !important;
|
||||
}
|
||||
|
||||
.installsec {
|
||||
margin-top:10px;
|
||||
padding:0;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.installsec table {
|
||||
width:100%;
|
||||
padding:0 10px;
|
||||
margin: 15px 0 15px 0;
|
||||
}
|
||||
|
||||
.installsec h2 {
|
||||
display: block;
|
||||
border-bottom: 1px solid #d1d5d8;
|
||||
margin: 0;
|
||||
padding: 5px 15px 15px 15px;
|
||||
}
|
||||
|
||||
.installsec form {
|
||||
width:800px;
|
||||
margin:0 auto;
|
||||
padding:10px 0 0;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.installsec fieldset {
|
||||
border:0;
|
||||
float:left;
|
||||
clear:left;
|
||||
width:600px;
|
||||
margin:0 100px 10px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.installsec legend {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.installsec label {
|
||||
float:left;
|
||||
width:26em;
|
||||
margin-right:1em;
|
||||
margin-top:6px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
p.submit {
|
||||
text-align:right;
|
||||
padding-right:46px;
|
||||
}
|
||||
|
||||
.installsec aside {
|
||||
border-top:1px solid #d1d5d8;
|
||||
clear:both;
|
||||
float:none;
|
||||
width:auto;
|
||||
text-align: right;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.line {
|
||||
border: 0;
|
||||
width: 800px;
|
||||
border-bottom:1px solid #d1d5d8;
|
||||
}
|
||||
|
||||
.messagewrapper {
|
||||
width:650px;
|
||||
margin:0 auto;
|
||||
padding:120px 0 0;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.messagewrapperfull {
|
||||
width:100%;
|
||||
margin:0 auto;
|
||||
padding:0;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.overviewsearch {
|
||||
position:absolute;
|
||||
top:155px;
|
||||
right:36px;
|
||||
font-size:80%;
|
||||
}
|
||||
|
||||
.overviewadd {
|
||||
padding:10px;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
/*
|
||||
* error message display
|
||||
*/
|
||||
.errorcontainer {
|
||||
background:url(../img/icons/error_big.png) 10px center no-repeat #ffedef;
|
||||
border:1px solid #ffc2ca;
|
||||
padding:10px 10px 10px 68px!important;
|
||||
margin: 10px 0 10px 0 !important;
|
||||
text-align:left!important;
|
||||
overflow:hidden;
|
||||
box-shadow: 0px 0px 0px black;
|
||||
}
|
||||
|
||||
.errortitle {
|
||||
font-weight:700;
|
||||
color:#c00!important;
|
||||
}
|
||||
|
||||
.error {
|
||||
font-weight:400!important;
|
||||
color:#c00!important;
|
||||
}
|
||||
|
||||
/*
|
||||
* warning message display
|
||||
*/
|
||||
.warningcontainer,.ui-dialog {
|
||||
background:url(../img/icons/warning_big.png) 10px center no-repeat #fffecc;
|
||||
border:1px solid #f3c37e;
|
||||
padding:10px 10px 10px 68px !important;
|
||||
margin: 10px 0 10px 0 !important;
|
||||
text-align:left!important;
|
||||
overflow:hidden;
|
||||
box-shadow: 0px 0px 0px black;
|
||||
}
|
||||
.ui-dialog {
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
.warningtitle,.ui-dialog-titlebar {
|
||||
font-weight:700;
|
||||
color:#D57D00;
|
||||
}
|
||||
|
||||
.warning,.ui-dialog-content {
|
||||
color:#D57D00!important;
|
||||
}
|
||||
|
||||
/*
|
||||
* success message display
|
||||
*/
|
||||
.successcontainer {
|
||||
background:url(../img/icons/ok_big.png) 10px center no-repeat #E2F9E3;
|
||||
border:1px solid #9C9;
|
||||
padding:10px 10px 10px 68px!important;
|
||||
margin: 10px 0 10px 0 !important;
|
||||
text-align:left!important;
|
||||
overflow:hidden;
|
||||
box-shadow: 0px 0px 0px black;
|
||||
}
|
||||
|
||||
.successtitle {
|
||||
font-weight:700;
|
||||
color:#060!important;
|
||||
}
|
||||
|
||||
.success {
|
||||
font-weight:400!important;
|
||||
}
|
||||
|
||||
/*
|
||||
* neutral/info message display
|
||||
*/
|
||||
.neutralcontainer {
|
||||
background:url(../img/icons/info_big.png) 10px center no-repeat #d2eaf6;
|
||||
border:1px solid #b7d8ed;
|
||||
padding:10px 10px 10px 68px!important;
|
||||
margin: 10px 0 10px 0 !important;
|
||||
text-align:left!important;
|
||||
overflow:hidden;
|
||||
box-shadow: 0px 0px 0px black;
|
||||
}
|
||||
|
||||
.neutraltitle {
|
||||
font-weight:700;
|
||||
color:#3188c1!important;
|
||||
}
|
||||
|
||||
.neutral {
|
||||
font-weight:400!important;
|
||||
color:#3188c1!important;
|
||||
}
|
||||
|
||||
/* std hyperlink */
|
||||
a,a:active,a:visited {
|
||||
color:#176fa1;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
.infotext {
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
/*
|
||||
* main container
|
||||
*/
|
||||
.main {
|
||||
margin-left:240px;
|
||||
margin-right:10px;
|
||||
margin-top:105px;
|
||||
margin-bottom:0;
|
||||
background-color:#fff;
|
||||
padding: 30px 30px 30px 30px;
|
||||
min-height:400px;
|
||||
}
|
||||
|
||||
.noborder {
|
||||
width:100%;
|
||||
border-spacing:0;
|
||||
border-collapse:separate;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.noborder td {
|
||||
border:0;
|
||||
}
|
||||
|
||||
table {
|
||||
width:100%;
|
||||
border-spacing:0;
|
||||
border:1px solid #d1d5d8;
|
||||
border-collapse:separate;
|
||||
box-shadow:0px 0px 0px black !important;
|
||||
}
|
||||
|
||||
table thead th, table th {
|
||||
border-top: 1px solid #d1d5d8;
|
||||
border-bottom: 1px solid #d1d5d8;
|
||||
height: 25px !important;
|
||||
padding: 5px 0px 5px 8px;
|
||||
background-color: #e9edf0;
|
||||
font-weight: bold;
|
||||
}
|
||||
table thead:first-child th, table:first-child th {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
table th {
|
||||
border-top: 0;
|
||||
}
|
||||
th a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
th a img {
|
||||
}
|
||||
th a:nth-child(odd) img {
|
||||
position: relative;
|
||||
top: -5px;
|
||||
left: 4px;
|
||||
}
|
||||
th a:nth-child(even) img {
|
||||
position: relative;
|
||||
top: 3px;
|
||||
left: -7px;
|
||||
}
|
||||
|
||||
table thead:first-child th {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.disabled td, .disabled td a {
|
||||
color: #cfcfcf;
|
||||
}
|
||||
|
||||
table tbody td {
|
||||
border-bottom:1px dotted #ccc;
|
||||
}
|
||||
table tbody tr:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.formtable {
|
||||
width: 100%;
|
||||
border-spacing:0;
|
||||
border:0;
|
||||
border-collapse:separate;
|
||||
margin:0 0 0;
|
||||
}
|
||||
|
||||
.formtable tbody td {
|
||||
border:0;
|
||||
border-bottom:1px dotted #ccc;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
.formtable label {
|
||||
float:none;
|
||||
display:block;
|
||||
padding:0;
|
||||
margin:0;
|
||||
width:100%;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
td {
|
||||
padding-top:5px;
|
||||
padding-left:10px;
|
||||
padding-right: 10px;
|
||||
padding-bottom:5px;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
table tfoot td {
|
||||
height:25px;
|
||||
border-top: 1px solid #d1d5d8;
|
||||
background-color: #f2f8fa;
|
||||
}
|
||||
|
||||
.tfootleft {
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.maintitle {
|
||||
padding-top:20px;
|
||||
}
|
||||
|
||||
/* input elements */
|
||||
input {
|
||||
background: #fff url(../img/text_align_left.png) no-repeat 5px 4px;
|
||||
padding:2px 4px 2px 24px;
|
||||
height:22px;
|
||||
border: 1px solid #d9d9d9;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
background:#fff url(../img/text_align_left.png) no-repeat 5px 4px;
|
||||
padding:4px 4px 2px 24px;
|
||||
border:1px solid #d9d9d9;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
input[type="password"] {
|
||||
background:#fff url(../img/password.png) no-repeat 5px 4px;
|
||||
}
|
||||
|
||||
input[type="button"],input[type="submit"],input[type="reset"] {
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #378de5) );
|
||||
background:-moz-linear-gradient( center top, #79bbff 5%, #378de5 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#79bbff', endColorstr='#378de5');
|
||||
background-color:#79bbff;
|
||||
-moz-border-radius:5px;
|
||||
-webkit-border-radius:5px;
|
||||
border-radius:5px;
|
||||
display:inline-block;
|
||||
color:#ffffff;
|
||||
padding:2px 24px 2px 24px;
|
||||
text-decoration:none;
|
||||
text-shadow:1px 1px 0px #528ecc;
|
||||
height: 26px;
|
||||
margin: 0 3px 0 3px;
|
||||
}
|
||||
input[type="button"]:hover,input[type="submit"]:hover,input[type="reset"]:hover {
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #378de5), color-stop(1, #79bbff) );
|
||||
background:-moz-linear-gradient( center top, #378de5 5%, #79bbff 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#378de5', endColorstr='#79bbff');
|
||||
background-color:#378de5;
|
||||
}
|
||||
|
||||
input[type="submit"],input[class="yesbutton"] {
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #9dce2c), color-stop(1, #8cb82b) );
|
||||
background:-moz-linear-gradient( center top, #9dce2c 5%, #8cb82b 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9dce2c', endColorstr='#8cb82b');
|
||||
background-color:#9dce2c;
|
||||
text-shadow:1px 1px 0px #aade7c;
|
||||
}
|
||||
input[type="submit"]:hover,input[class="yesbutton"]:hover {
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) );
|
||||
background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8cb82b', endColorstr='#9dce2c');
|
||||
background-color:#8cb82b;
|
||||
}
|
||||
|
||||
input[class="nobutton"],input[type="reset"] {
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #fe1a00), color-stop(1, #ce0100) );
|
||||
background:-moz-linear-gradient( center top, #fe1a00 5%, #ce0100 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fe1a00', endColorstr='#ce0100');
|
||||
background-color:#fe1a00;
|
||||
text-shadow:1px 1px 0px #b23e35;
|
||||
}
|
||||
input[class="nobutton"]:hover,input[type="reset"]:hover {
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ce0100), color-stop(1, #fe1a00) );
|
||||
background:-moz-linear-gradient( center top, #ce0100 5%, #fe1a00 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ce0100', endColorstr='#fe1a00');
|
||||
background-color:#ce0100;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
background:#dae7ee;
|
||||
padding: 0;
|
||||
margin: 0 20px 0 0;
|
||||
}
|
||||
|
||||
input[type="radio"] { /*the span element that immediately follow the radio button */
|
||||
margin: 0 10px 0 10px;
|
||||
height:22px;
|
||||
}
|
||||
|
||||
select {
|
||||
background:#fff;
|
||||
padding:4px;
|
||||
border:1px solid #d9d9d9;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.maintable {
|
||||
width:90%;
|
||||
}
|
||||
|
||||
.update_progess {
|
||||
padding:2em;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.preconfig {
|
||||
text-align:left;
|
||||
margin-top:20px;
|
||||
margin-bottom:5px;
|
||||
margin-right:15px;
|
||||
margin-left:15px;
|
||||
}
|
||||
|
||||
.preconfigitem {
|
||||
padding:.15em;
|
||||
border-bottom:1px solid #ccc;
|
||||
}
|
||||
|
||||
.preconfdesc {
|
||||
display:block;
|
||||
margin-bottom:.5em;
|
||||
font-size:120%;
|
||||
}
|
||||
BIN
install/templates/assets/img/favicon.ico
Executable file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
install/templates/assets/img/logo.png
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
install/templates/assets/img/password.png
Executable file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
install/templates/assets/img/text_align_left.png
Executable file
|
After Width: | Height: | Size: 198 B |
10
install/templates/dataform.tpl
Executable file
@@ -0,0 +1,10 @@
|
||||
<p style="margin: 20px 20px 0 !important">{$this->_lng['install']['title']}</p>
|
||||
<form action="{$formaction}" method="get">
|
||||
<fieldset>
|
||||
{$formdata}
|
||||
<p class="submit">
|
||||
<input type="hidden" name="check" value="1" />
|
||||
<input type="submit" name="chooselang" value="{$this->_lng['install']['btn_go']}" />
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
13
install/templates/dataform2.tpl
Executable file
@@ -0,0 +1,13 @@
|
||||
<p style="margin: 20px 20px 0 !important">{$this->_lng['install']['welcometext']}</p>
|
||||
<form action="{$formaction}" method="post">
|
||||
<hr class="line">
|
||||
<fieldset>
|
||||
{$formdata}
|
||||
</fieldset>
|
||||
<aside>
|
||||
<input type="hidden" name="check" value="1" />
|
||||
<input type="hidden" name="language" value="{$language}" />
|
||||
<input type="hidden" name="installstep" value="1" />
|
||||
<input class="bottom" type="submit" name="submitbutton" value="{$this->_lng['click_here_to_continue']}" />
|
||||
</aside>
|
||||
</form>
|
||||
4
install/templates/dataitem.tpl
Executable file
@@ -0,0 +1,4 @@
|
||||
<p>
|
||||
<label for="{$fieldname}" style="width:65%;{$style}">{$fieldlabel}:</label>
|
||||
<input type="{$type}" name="{$fieldname}" id="{$fieldname}" value="{$fieldvalue}" {$required} />
|
||||
</p>
|
||||
4
install/templates/dataitemchk.tpl
Executable file
@@ -0,0 +1,4 @@
|
||||
<p>
|
||||
<label for="{$fieldname}" style="width:65%;{$style}">{$this->_lng['install']['webserver']} {$fieldlabel}:</label>
|
||||
<input type="radio" name="webserver" id="{$fieldname}" value="{$fieldname}" {$checked} /><span>{$fieldlabel}<span>
|
||||
</p>
|
||||
2
install/templates/datasection.tpl
Executable file
@@ -0,0 +1,2 @@
|
||||
<br />
|
||||
<h3>{$section}</h3>
|
||||
7
install/templates/footer.tpl
Executable file
@@ -0,0 +1,7 @@
|
||||
</div>
|
||||
<footer>
|
||||
<span> Froxlor © 2009-{$current_year} by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
|
||||
</span>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
18
install/templates/header.tpl
Executable file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="Default-Style" content="text/css" />
|
||||
<!--[if lt IE 9]><script src="../js/html5shiv.js"></script><![endif]-->
|
||||
<link href="templates/assets/css/install.css" rel="stylesheet" type="text/css" />
|
||||
<!--[if IE]><link rel="stylesheet" href="../templates/{$theme}/css/main_ie.css" type="text/css" /><![endif]-->
|
||||
<link href="templates/assets/img/favicon.ico" rel="icon" type="image/x-icon" />
|
||||
<title>Froxlor Server Management Panel - Installation</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-family: Verdana, Geneva, sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="installsec">
|
||||
14
install/templates/lngform.tpl
Executable file
@@ -0,0 +1,14 @@
|
||||
<form action="{$formaction}" method="get">
|
||||
<fieldset>
|
||||
<legend>{$this->_lng['install']['lngtitle']}</legend>
|
||||
<p>
|
||||
<label for="language">{$this->_lng['install']['language']}:</label>
|
||||
<select name="language" id="language">
|
||||
{$language_options}
|
||||
</select>
|
||||
<input type="hidden" name="check" value="1" />
|
||||
<input type="submit" name="chooselang" value="{$this->_lng['install']['lngbtn_go']}" />
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
<hr class="line">
|
||||
11
install/templates/page.tpl
Executable file
@@ -0,0 +1,11 @@
|
||||
<article class="install bradius">
|
||||
<header class="dark">
|
||||
<img src="../templates/{$theme}/assets/img/logo.png" alt="Froxlor Server Management Panel" />
|
||||
</header>
|
||||
|
||||
<section class="installsec">
|
||||
<h2>{$pagetitle}</h2>
|
||||
{$pagecontent}
|
||||
{$pagenavigation}
|
||||
</section>
|
||||
</article>
|
||||
4
install/templates/pagebottom.tpl
Executable file
@@ -0,0 +1,4 @@
|
||||
<h3 style="color:{$msgcolor};text-align: center">{$message}</h3>
|
||||
<aside>
|
||||
<a href="{$link}">{$linktext}</a>
|
||||
</aside>
|
||||
5
install/templates/textarea.tpl
Executable file
@@ -0,0 +1,5 @@
|
||||
<tr>
|
||||
<td class="main_field_name">
|
||||
<p>{$escpduserdata}</p>
|
||||
</td>
|
||||
</tr>
|
||||
124
install/tsmarty2c.php
Executable file
@@ -0,0 +1,124 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
/**
|
||||
* tsmarty2c.php - rips gettext strings from smarty template
|
||||
*
|
||||
* ------------------------------------------------------------------------- *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2.1 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library; if not, write to the Free Software *
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
|
||||
* ------------------------------------------------------------------------- *
|
||||
*
|
||||
* This command line script rips gettext strings from smarty file,
|
||||
* and prints them to stdout in C format, that can later be used with the
|
||||
* standard gettext tools.
|
||||
*
|
||||
* Usage:
|
||||
* ./tsmarty2c.php <filename or directory> <file2> <..> > smarty.c
|
||||
*
|
||||
* If a parameter is a directory, the template files within will be parsed.
|
||||
*
|
||||
* @package smarty-gettext
|
||||
* @version $Id: tsmarty2c.php,v 1.3 2005/07/27 17:59:39 sagi Exp $
|
||||
* @link http://smarty-gettext.sf.net/
|
||||
* @author Sagi Bashari <sagi@boom.org.il>
|
||||
* @copyright 2004-2005 Sagi Bashari
|
||||
*/
|
||||
|
||||
// smarty open tag
|
||||
$ldq = preg_quote('{');
|
||||
|
||||
// smarty close tag
|
||||
$rdq = preg_quote('}');
|
||||
|
||||
// smarty command
|
||||
$cmd = preg_quote('t');
|
||||
|
||||
// extensions of smarty files, used when going through a directory
|
||||
$extensions = array('tpl');
|
||||
|
||||
// "fix" string - strip slashes, escape and convert new lines to \n
|
||||
function fs($str)
|
||||
{
|
||||
$str = stripslashes($str);
|
||||
$str = str_replace('"', '\"', $str);
|
||||
$str = str_replace("\n", '\n', $str);
|
||||
return $str;
|
||||
}
|
||||
|
||||
// rips gettext strings from $file and prints them in C format
|
||||
function do_file($file)
|
||||
{
|
||||
$content = @file_get_contents($file);
|
||||
|
||||
if (empty($content)) {
|
||||
return;
|
||||
}
|
||||
|
||||
global $ldq, $rdq, $cmd;
|
||||
|
||||
preg_match_all(
|
||||
"/{$ldq}\s*({$cmd})\s*([^{$rdq}]*){$rdq}([^{$ldq}]*){$ldq}\/\\1{$rdq}/",
|
||||
$content,
|
||||
$matches
|
||||
);
|
||||
|
||||
for ($i=0; $i < count($matches[0]); $i++) {
|
||||
// TODO: add line number
|
||||
echo "/* $file */\n"; // credit: Mike van Lammeren 2005-02-14
|
||||
|
||||
if (preg_match('/plural\s*=\s*["\']?\s*(.[^\"\']*)\s*["\']?/', $matches[2][$i], $match)) {
|
||||
echo 'ngettext("'.fs($matches[3][$i]).'","'.fs($match[1]).'",x);'."\n";
|
||||
} else {
|
||||
echo 'gettext("'.fs($matches[3][$i]).'");'."\n";
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
}
|
||||
}
|
||||
|
||||
// go through a directory
|
||||
function do_dir($dir)
|
||||
{
|
||||
$d = dir($dir);
|
||||
|
||||
while (false !== ($entry = $d->read())) {
|
||||
if ($entry == '.' || $entry == '..') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$entry = $dir.'/'.$entry;
|
||||
|
||||
if (is_dir($entry)) { // if a directory, go through it
|
||||
do_dir($entry);
|
||||
} else { // if file, parse only if extension is matched
|
||||
$pi = pathinfo($entry);
|
||||
|
||||
if (isset($pi['extension']) && in_array($pi['extension'], $GLOBALS['extensions'])) {
|
||||
do_file($entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$d->close();
|
||||
}
|
||||
|
||||
for ($ac=1; $ac < $_SERVER['argc']; $ac++) {
|
||||
if (is_dir($_SERVER['argv'][$ac])) { // go through directory
|
||||
do_dir($_SERVER['argv'][$ac]);
|
||||
} else { // do file
|
||||
do_file($_SERVER['argv'][$ac]);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
if(isFroxlorVersion('0.9'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9 to 1.0", false);
|
||||
showUpdateStep("Converting database tables to UTF-8");
|
||||
|
||||
// Convert all data to UTF-8 to have a sane standard across all data
|
||||
$result = $db->query("SHOW TABLES");
|
||||
while($table = $db->fetch_array($result, 'num'))
|
||||
{
|
||||
$db->query("ALTER TABLE " . $table[0] . " CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;");
|
||||
$db->query("ALTER TABLE " . $table[0] . " DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");
|
||||
|
||||
$affected_columns = array();
|
||||
|
||||
$primarykey = "";
|
||||
$columns = $db->query("SHOW COLUMNS FROM ".$table[0]);
|
||||
while ($column = $db->fetch_array($columns))
|
||||
{
|
||||
if (!(strpos($column['Type'], "char") === false) || !(strpos($column['Type'], "text") === false))
|
||||
{
|
||||
$affected_columns[] = $column['Field'];
|
||||
}
|
||||
|
||||
if ($column['Key'] == 'PRI') {
|
||||
$primarykey = $column['Field'];
|
||||
}
|
||||
}
|
||||
|
||||
$count_cols = count($affected_columns);
|
||||
if ($count_cols > 0)
|
||||
{
|
||||
$load = "";
|
||||
foreach($affected_columns as $col)
|
||||
{
|
||||
$load .= ", `" . $col . "`";
|
||||
}
|
||||
|
||||
$rows = $db->query("SELECT $primarykey" . $load . " FROM `" . $table[0] . "`");
|
||||
while ($row = $db->fetch_array($rows))
|
||||
{
|
||||
$changes = "";
|
||||
for ($i = 0; $i < $count_cols; $i++)
|
||||
{
|
||||
$base = "`" . $affected_columns[$i] . "` = '" . convertUtf8($row[$affected_columns[$i]]) . "'";
|
||||
$changes .= ($i == ($count_cols-1)) ? $base : $base . ", ";
|
||||
}
|
||||
|
||||
$db->query("UPDATE `" . $table[0] . "` SET " . $changes . " WHERE `$primarykey` = '" . $db->escape($row[$primarykey]) . "';");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lastStepStatus(0);
|
||||
}
|
||||
*/
|
||||
|
||||
?>
|
||||
@@ -12,7 +12,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Install
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
$updateto = '0.9-r0';
|
||||
|
||||