Compare commits
642 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
packages/*
|
||||
temp/*
|
||||
@@ -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,16 @@ return array(
|
||||
'option_options_method' => 'getLanguages',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_default_theme' => array(
|
||||
'label' => $lng['serversettings']['default_theme'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'default_theme',
|
||||
'type' => 'option',
|
||||
'default' => 'Froxlor',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getThemes',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_natsorting' => array(
|
||||
'label' => $lng['serversettings']['natsorting'],
|
||||
'settinggroup' => 'panel',
|
||||
@@ -64,7 +74,7 @@ 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',
|
||||
),
|
||||
'panel_adminmail' => array(
|
||||
@@ -151,14 +161,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',
|
||||
|
||||
@@ -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',
|
||||
@@ -62,6 +70,15 @@ return array(
|
||||
'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,10 @@ return array(
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'documentroot_prefix',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/customers/webs/',
|
||||
'save_method' => 'storeSettingField',
|
||||
'plausibility_check_method' => 'checkPathConflicts'
|
||||
),
|
||||
'system_ipaddress' => array(
|
||||
'label' => $lng['serversettings']['ipaddress'],
|
||||
@@ -57,6 +59,23 @@ 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'],
|
||||
@@ -75,15 +94,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',
|
||||
@@ -113,6 +123,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' => 99,
|
||||
'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' => 99,
|
||||
'default' => 90,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_debug_cron' => array(
|
||||
'label' => $lng['serversettings']['cron']['debug'],
|
||||
'settinggroup' => 'system',
|
||||
|
||||
@@ -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,12 +27,28 @@ 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_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(
|
||||
'label' => $lng['serversettings']['apacheconf_vhost'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -60,22 +76,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',
|
||||
@@ -112,6 +112,41 @@ return array(
|
||||
'default' => '',
|
||||
'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_phpreload_command' => array(
|
||||
'label' => $lng['serversettings']['phpreload_command'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'phpreload_command',
|
||||
'type' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : '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' => (getSetting('phpfpm', 'enabled') == '1') ? 'hidden' : 'string',
|
||||
'default' => '127.0.0.1:8888',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('nginx')
|
||||
),
|
||||
'system_mod_log_sql' => array(
|
||||
'label' => $lng['serversettings']['mod_log_sql'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_log_sql',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'defaultwebsrverrhandler_enabled' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_enabled'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
@@ -127,6 +162,7 @@ return array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'nginx')
|
||||
),
|
||||
'defaultwebsrverrhandler_err403' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
|
||||
@@ -135,6 +171,7 @@ return array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'nginx')
|
||||
),
|
||||
'defaultwebsrverrhandler_err404' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
|
||||
@@ -151,6 +188,7 @@ return array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'nginx')
|
||||
),
|
||||
'customredirect_enabled' => array(
|
||||
'label' => $lng['serversettings']['customredirect_enabled'],
|
||||
@@ -159,6 +197,7 @@ return array(
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'lighttpd')
|
||||
),
|
||||
'customredirect_default' => array(
|
||||
'label' => $lng['serversettings']['customredirect_default'],
|
||||
@@ -169,6 +208,7 @@ return array(
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getRedirectCodes',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'lighttpd')
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -182,6 +222,7 @@ return array(
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_ssl_cert_file' => array(
|
||||
'label' => $lng['serversettings']['ssl']['ssl_cert_file'],
|
||||
@@ -213,6 +254,16 @@ return array(
|
||||
'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',
|
||||
),
|
||||
'system_ssl_openssl_cnf' => array(
|
||||
'label' => $lng['serversettings']['ssl']['openssl_cnf'],
|
||||
'settinggroup' => 'system',
|
||||
|
||||
143
actions/admin/settings/135.fcgid.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<?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=> 'FCGIWrapper'),
|
||||
'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')
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
161
actions/admin/settings/136.phpfpm.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?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'
|
||||
),
|
||||
/*
|
||||
* @TODO implement if phpfpm knows custom php.ini files
|
||||
*
|
||||
'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_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'),
|
||||
'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',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
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(
|
||||
@@ -49,6 +49,15 @@ return array(
|
||||
'default' => '/usr/bin/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_awstatspath' => array(
|
||||
'label' => $lng['serversettings']['awstats_awstatspath'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_awstatspath',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/usr/bin/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_conf' => array(
|
||||
'label' => $lng['serversettings']['awstats_conf'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -57,6 +66,15 @@ return array(
|
||||
'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(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id: 220.ftpserver.php 1 2010-04-07 10:00:00Z monotek $
|
||||
*
|
||||
*/
|
||||
|
||||
return 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(
|
||||
|
||||
@@ -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 Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -36,6 +36,7 @@ return array(
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_prefix',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/postfix/dkim/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
@@ -58,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'],
|
||||
@@ -132,7 +133,7 @@ return array(
|
||||
'type' => 'option',
|
||||
'default' => 2,
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(1 => $lng['ticket']['unf_high'], 2 => $lng['ticket']['unf_normal'], 3 => $lng['ticket']['unf_low']),
|
||||
'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(
|
||||
|
||||
@@ -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,78 +38,6 @@ return array(
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_enabled' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid'],
|
||||
'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',
|
||||
'type' => 'option',
|
||||
'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'),
|
||||
'default' => 0,
|
||||
'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',
|
||||
),
|
||||
'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',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
117
actions/admin/settings/215.backup.php
Normal file
@@ -0,0 +1,117 @@
|
||||
<?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,
|
||||
'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',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
67
actions/admin/settings/225.logrotate.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?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(
|
||||
'logrotate' => array(
|
||||
'title' => $lng['logrotate'],
|
||||
'fields' => array(
|
||||
'logrotate_enabled' => array(
|
||||
'label' => $lng['logrotate_enabled'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'logrotate_enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'logrotate_binary' => array(
|
||||
'label' => $lng['logrotate_binary'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'logrotate_binary',
|
||||
'type' => 'string',
|
||||
'default' => '/usr/sbin/logrotate',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'logrotate_interval' => array(
|
||||
'label' => $lng['logrotate_interval'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'logrotate_interval',
|
||||
'type' => 'option',
|
||||
'default' => 'weekly',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly'),
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
'logrotate_keep' => array(
|
||||
'label' => $lng['logrotate_keep'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'logrotate_keep',
|
||||
'type' => 'string',
|
||||
'default' => '4',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => false
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
199
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,6 +47,7 @@ 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'],
|
||||
@@ -63,6 +64,9 @@ if($page == 'admins'
|
||||
'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'] . ')',
|
||||
'email_autoresponder' => $lng['customer']['autoresponder'],
|
||||
'email_autoresponder_used' => $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')',
|
||||
*/
|
||||
'deactivated' => $lng['admin']['deactivated']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
@@ -84,7 +88,20 @@ 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
|
||||
*/
|
||||
if($row['diskspace'] > 0) {
|
||||
$percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
|
||||
$doublepercent = round($percent*2, 2);
|
||||
} else {
|
||||
$percent = 0;
|
||||
$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++;
|
||||
@@ -213,6 +230,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']))
|
||||
@@ -220,12 +251,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']);
|
||||
@@ -252,10 +289,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']);
|
||||
|
||||
@@ -338,8 +386,38 @@ 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 . ")");
|
||||
$_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) . "',
|
||||
`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));
|
||||
@@ -381,16 +459,23 @@ 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');
|
||||
#$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -419,6 +504,7 @@ 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'];
|
||||
@@ -493,6 +579,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']))
|
||||
@@ -500,11 +600,18 @@ if($page == 'admins'
|
||||
$ftps = - 1;
|
||||
}
|
||||
|
||||
$tickets = intval_ressource($_POST['tickets']);
|
||||
|
||||
if(isset($_POST['tickets_ul']))
|
||||
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']);
|
||||
@@ -521,12 +628,24 @@ if($page == 'admins'
|
||||
$number_of_aps_packages = - 1;
|
||||
}
|
||||
|
||||
$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 = intval($_POST['change_serversettings']);
|
||||
|
||||
$diskspace = intval($_POST['diskspace']);
|
||||
|
||||
if(isset($_POST['diskspace_ul']))
|
||||
@@ -595,7 +714,7 @@ 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) . "'");
|
||||
$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) . "', `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,
|
||||
@@ -673,6 +792,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')
|
||||
@@ -726,14 +852,21 @@ 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']);
|
||||
#$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');
|
||||
@@ -96,8 +96,9 @@ if($userinfo['change_serversettings'] == '1')
|
||||
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
||||
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
||||
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
||||
'<REALTIME_PORT>' => $settings['system']['realtime_port'],
|
||||
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($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'])
|
||||
);
|
||||
$files = '';
|
||||
$configpage = '';
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -121,7 +121,7 @@ if($page == 'cronjobs'
|
||||
}
|
||||
else
|
||||
{
|
||||
$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
|
||||
#$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
|
||||
// interval
|
||||
$interval_nfo = explode(' ', $result['interval']);
|
||||
$interval_value = $interval_nfo[0];
|
||||
@@ -141,6 +141,12 @@ if($page == 'cronjobs'
|
||||
$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") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,6 +40,9 @@ 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'],
|
||||
@@ -51,6 +54,8 @@ if($page == 'customers'
|
||||
'c.diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.traffic' => $lng['customer']['traffic'],
|
||||
'c.traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.backup_allowed' => $lng['backup_allowed']
|
||||
/*
|
||||
'c.mysqls' => $lng['customer']['mysqls'],
|
||||
'c.mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.ftps' => $lng['customer']['ftps'],
|
||||
@@ -67,18 +72,28 @@ if($page == 'customers'
|
||||
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.deactivated' => $lng['admin']['deactivated'],
|
||||
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
|
||||
'c.phpenabled' => $lng['admin']['phpenabled']
|
||||
'c.phpenabled' => $lng['admin']['phpenabled'],
|
||||
'c.perlenabled' => $lng['admin']['perlenabled']
|
||||
*/
|
||||
);
|
||||
|
||||
/*
|
||||
if($settings['ticket']['enabled'] == 1)
|
||||
{
|
||||
$fields['c.tickets'] = $lng['customer']['tickets'];
|
||||
$fields['c.tickets_used'] = $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')';
|
||||
}
|
||||
|
||||
if($settings['autoresponder']['autoresponder_active'] == 1)
|
||||
{
|
||||
$fields['c.email_autoresponder'] = $lng['customer']['autoresponder'];
|
||||
$fields['c.email_autoresponder_used'] = $lng['customer']['autoresponder'] . ' (' . $lng['panel']['used'] . ')';
|
||||
}
|
||||
*/
|
||||
|
||||
$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(false) . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng, true);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -99,14 +114,36 @@ if($page == 'customers'
|
||||
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
|
||||
$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;
|
||||
}
|
||||
|
||||
$column_style = '';
|
||||
$unlock_link = '';
|
||||
if($row['loginfail_count'] >= $settings['login']['maxloginattempts']
|
||||
&& $row['lastlogin_fail'] > (time() - $settings['login']['deactivatetime'])
|
||||
) {
|
||||
$column_style = ' style="background-color: #f99122;"';
|
||||
$unlock_link = '<a href="'.$filename.'?s='.$s.'&page='.$page.'&action=unlock&id='.$row['customerid'].'">'.$lng['panel']['unlock'].'</a><br />';
|
||||
}
|
||||
|
||||
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains');
|
||||
$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++;
|
||||
@@ -137,6 +174,31 @@ if($page == 'customers'
|
||||
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)
|
||||
{
|
||||
@@ -166,8 +228,8 @@ if($page == 'customers'
|
||||
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||
{
|
||||
$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('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($row_database['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`',false,true);
|
||||
$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) . '`',false,true);
|
||||
$db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($row_database['databasename']) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"');
|
||||
}
|
||||
|
||||
@@ -181,6 +243,7 @@ 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 . "'");
|
||||
@@ -194,6 +257,10 @@ if($page == 'customers'
|
||||
$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))
|
||||
@@ -237,6 +304,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` = `email_autoresponder` - 0" . (int)$result['email_autoresponder'];
|
||||
}
|
||||
|
||||
if($result['subdomains'] != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `subdomains_used` = `subdomains_used` - 0" . (int)$result['subdomains'];
|
||||
@@ -274,6 +346,12 @@ if($page == 'customers'
|
||||
inserttask('6', $result['loginname']);
|
||||
}
|
||||
|
||||
# Using filesystem - quota, insert a task which cleans the filesystem - quota
|
||||
if ($settings['system']['diskquota_enabled'])
|
||||
{
|
||||
inserttask('10');
|
||||
}
|
||||
|
||||
/*
|
||||
* move old tickets to archive
|
||||
*/
|
||||
@@ -321,6 +399,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']))
|
||||
{
|
||||
@@ -376,9 +455,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']))
|
||||
{
|
||||
@@ -414,11 +515,47 @@ if($page == 'customers'
|
||||
$number_of_aps_packages = 0;
|
||||
}
|
||||
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$createstdsubdomain = 0;
|
||||
if(isset($_POST['createstdsubdomain']))
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$password = validate($_POST['new_customer_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$sendpassword = intval($_POST['sendpassword']);
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
// 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;
|
||||
|
||||
@@ -428,6 +565,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')
|
||||
@@ -438,6 +576,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')
|
||||
@@ -521,12 +660,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";
|
||||
|
||||
@@ -555,6 +739,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;
|
||||
@@ -591,8 +781,13 @@ 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
|
||||
if ($settings['system']['diskquota_enabled'])
|
||||
{
|
||||
inserttask('10');
|
||||
}
|
||||
// Add htpasswd for the webalizer stats
|
||||
|
||||
if(CRYPT_STD_DES == 1)
|
||||
@@ -647,7 +842,8 @@ if($page == 'customers'
|
||||
"`openbasedir` = '1', " .
|
||||
"`safemode` = '1', " .
|
||||
"`speciallogfile` = '0', " .
|
||||
"`specialsettings` = ''");
|
||||
"`specialsettings` = '', " .
|
||||
"`add_date` = '".date('Y-m-d')."'");
|
||||
$domainid = $db->insert_id();
|
||||
$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 . "'");
|
||||
@@ -659,7 +855,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,
|
||||
@@ -706,7 +901,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);
|
||||
@@ -716,15 +911,30 @@ 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');
|
||||
#$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');
|
||||
#$perlenabled = makeyesno('perlenabled', '1', '0', '0');
|
||||
#$store_defaultindex = makeyesno('store_defaultindex', '1', '0', '1');
|
||||
$backup_allowed = makeyesno('backup_allowed', '1', '0', '0');
|
||||
|
||||
$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -752,6 +962,7 @@ if($page == 'customers'
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$password = validate($_POST['new_customer_password'], 'new password');
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
$gender = intval_ressource($_POST['gender']);
|
||||
|
||||
if(isset($_POST['diskspace_ul']))
|
||||
{
|
||||
@@ -807,9 +1018,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']))
|
||||
{
|
||||
@@ -824,7 +1057,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']))
|
||||
{
|
||||
@@ -845,9 +1093,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;
|
||||
|
||||
@@ -857,6 +1117,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')
|
||||
@@ -867,6 +1128,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')
|
||||
@@ -926,7 +1188,7 @@ if($page == 'customers'
|
||||
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '')");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`, `add_date`) " . "VALUES ('" . $db->escape($_stdsubdomain) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '', '".date('Y-m-d')."')");
|
||||
$domainid = $db->insert_id();
|
||||
$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'] . "'");
|
||||
@@ -952,7 +1214,13 @@ if($page == 'customers'
|
||||
$phpenabled = '1';
|
||||
}
|
||||
|
||||
if($phpenabled != $result['phpenabled'])
|
||||
if($perlenabled != '0')
|
||||
{
|
||||
$perlenabled = '1';
|
||||
}
|
||||
|
||||
if($phpenabled != $result['phpenabled']
|
||||
|| $perlenabled != $result['perlenabled'])
|
||||
{
|
||||
inserttask('1');
|
||||
}
|
||||
@@ -962,6 +1230,47 @@ if($page == 'customers'
|
||||
$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_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'], '');
|
||||
unset($db_root->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'], '');
|
||||
unset($db_root->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)
|
||||
{
|
||||
$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) . '`');
|
||||
}
|
||||
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');
|
||||
}
|
||||
@@ -980,9 +1289,16 @@ 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
|
||||
if ($settings['system']['diskquota_enabled'])
|
||||
{
|
||||
inserttask('10');
|
||||
}
|
||||
|
||||
if($mysqls != '-1'
|
||||
|| $result['mysqls'] != '-1')
|
||||
{
|
||||
@@ -1063,6 +1379,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')
|
||||
{
|
||||
@@ -1215,6 +1547,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')
|
||||
@@ -1243,13 +1582,25 @@ 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']);
|
||||
|
||||
#$createstdsubdomain = makeyesno('createstdsubdomain', '1', '0', (($result['standardsubdomain'] != '0') ? '1' : '0'));
|
||||
#$phpenabled = makeyesno('phpenabled', '1', '0', $result['phpenabled']);
|
||||
#$perlenabled = makeyesno('perlenabled', '1', '0', $result['perlenabled']);
|
||||
#$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']);
|
||||
$backup_allowed = makeyesno('backup_allowed', '1', '0', $result['backup_allowed']);
|
||||
$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');
|
||||
@@ -144,8 +144,8 @@ if($page == 'domains'
|
||||
$alias_check = $db->query_first('SELECT COUNT(`id`) AS `count` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$id . '\'');
|
||||
|
||||
if($result['domain'] != ''
|
||||
&& $alias_check['count'] == 0)
|
||||
{
|
||||
&& $alias_check['count'] == 0
|
||||
) {
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
@@ -157,7 +157,15 @@ if($page == 'domains'
|
||||
standard_error('domains_cantdeletedomainwithapsinstances');
|
||||
}
|
||||
|
||||
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"';
|
||||
// check for deletion of main-domains which are logically subdomains, #329
|
||||
$rsd_sql = '';
|
||||
$remove_subbutmain_domains = isset($_POST['delete_userfiles']) ? 1 : 0;
|
||||
if($remove_subbutmain_domains == 1)
|
||||
{
|
||||
$rsd_sql .= ' OR `ismainbutsubto` = "'.(int)$id.'"';
|
||||
}
|
||||
|
||||
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '"'.$rsd_sql.') AND `isemaildomain`="1"';
|
||||
$subResult = $db->query($query);
|
||||
$idString = array();
|
||||
|
||||
@@ -177,20 +185,29 @@ if($page == 'domains'
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain/s from mail-tables");
|
||||
}
|
||||
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'".$rsd_sql);
|
||||
$deleted_domains = (int)$db->affected_rows();
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - " . (int)($deleted_domains - 1) . " WHERE `customerid` = '" . (int)$result['customerid'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$userinfo['adminid'] . "'");
|
||||
$db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'0\' WHERE `standardsubdomain`=\'' . (int)$result['id'] . '\' AND `customerid`=\'' . (int)$result['customerid'] . '\'');
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINREDIRECTS . "` WHERE `did` = '".(int)$id."'");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "deleted domain/subdomains (#" . $result['id'] . ")");
|
||||
updateCounters();
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
elseif ($alias_check['count'] > 0) {
|
||||
standard_error('domains_cantdeletedomainwithaliases');
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno('admin_domain_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']));
|
||||
$showcheck = false;
|
||||
if(domainHasMainSubDomains($id))
|
||||
{
|
||||
$showcheck = true;
|
||||
}
|
||||
ask_yesno_withcheckbox('admin_domain_reallydelete', 'remove_subbutmain_domains', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain']), $showcheck);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,11 +227,25 @@ if($page == 'domains'
|
||||
|
||||
$domain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain')));
|
||||
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
||||
|
||||
$isemaildomain = 0;
|
||||
if(isset($_POST['isemaildomain']))
|
||||
$isemaildomain = intval($_POST['isemaildomain']);
|
||||
$email_only = intval($_POST['email_only']);
|
||||
$wwwserveralias = intval($_POST['wwwserveralias']);
|
||||
$speciallogfile = intval($_POST['speciallogfile']);
|
||||
|
||||
$email_only = 0;
|
||||
if(isset($_POST['email_only']))
|
||||
$email_only = intval($_POST['email_only']);
|
||||
|
||||
$wwwserveralias = 0;
|
||||
if(isset($_POST['wwwserveralias']))
|
||||
$wwwserveralias = intval($_POST['wwwserveralias']);
|
||||
|
||||
$speciallogfile = 0;
|
||||
if(isset($_POST['speciallogfile']))
|
||||
$speciallogfile = intval($_POST['speciallogfile']);
|
||||
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
$issubof = intval($_POST['issubof']);
|
||||
$customerid = intval($_POST['customerid']);
|
||||
$customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ");
|
||||
|
||||
@@ -242,7 +273,8 @@ if($page == 'domains'
|
||||
}
|
||||
|
||||
$documentroot = $customer['documentroot'];
|
||||
$registration_date = validate($_POST['registration_date'], 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
|
||||
$registration_date = trim($_POST['registration_date']);
|
||||
$registration_date = validate($registration_date, 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
|
||||
|
||||
if($userinfo['change_serversettings'] == '1')
|
||||
{
|
||||
@@ -344,12 +376,15 @@ if($page == 'domains'
|
||||
|
||||
if($settings['system']['use_ssl'] == "1"
|
||||
&& isset($_POST['ssl'])
|
||||
&& isset($_POST['ssl_redirect'])
|
||||
/*&& isset($_POST['ssl_redirect'])*/
|
||||
&& isset($_POST['ssl_ipandport'])
|
||||
&& $_POST['ssl'] != '0')
|
||||
{
|
||||
$ssl = (int)$_POST['ssl'];
|
||||
$ssl_redirect = (int)$_POST['ssl_redirect'];
|
||||
$ssl_redirect = 0;
|
||||
if (isset($_POST['ssl_redirect'])) {
|
||||
$ssl_redirect = (int)$_POST['ssl_redirect'];
|
||||
}
|
||||
$ssl_ipandport = (int)$_POST['ssl_ipandport'];
|
||||
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition);
|
||||
|
||||
@@ -446,11 +481,17 @@ if($page == 'domains'
|
||||
$caneditdomain = '0';
|
||||
}
|
||||
|
||||
if($issubof <= '0')
|
||||
{
|
||||
$issubof = '0';
|
||||
}
|
||||
|
||||
if($domain == '')
|
||||
{
|
||||
standard_error(array('stringisempty', 'mydomain'));
|
||||
}
|
||||
elseif(!validateDomain($domain))
|
||||
/* Check whether domain validation is enabled and if, validate the domain */
|
||||
elseif($settings['system']['validate_domain'] && !validateDomain($domain))
|
||||
{
|
||||
standard_error(array('stringiswrong', 'mydomain'));
|
||||
}
|
||||
@@ -499,13 +540,15 @@ if($page == 'domains'
|
||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||
'specialsettings' => $specialsettings,
|
||||
'registration_date' => $registration_date
|
||||
'registration_date' => $registration_date,
|
||||
'issubof' => $issubof
|
||||
);
|
||||
|
||||
$security_questions = array(
|
||||
'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'),
|
||||
'reallydisablesecuritysetting' => ($openbasedir == '0' && $userinfo['change_serversettings'] == '1'),
|
||||
'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot))
|
||||
);
|
||||
$question_nr = 1;
|
||||
foreach($security_questions as $question_name => $question_launch)
|
||||
{
|
||||
if($question_launch !== false)
|
||||
@@ -515,13 +558,14 @@ if($page == 'domains'
|
||||
if(!isset($_POST[$question_name])
|
||||
|| $_POST[$question_name] != $question_name)
|
||||
{
|
||||
ask_yesno('admin_domain_' . $question_name, $filename, $params);
|
||||
ask_yesno('admin_domain_' . $question_name, $filename, $params, $question_nr);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$question_nr++;
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "')");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `ismainbutsubto`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "', '".(int)$issubof."')");
|
||||
$domainid = $db->insert_id();
|
||||
$db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'");
|
||||
@@ -613,6 +657,14 @@ if($page == 'domains'
|
||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
||||
}
|
||||
|
||||
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true);
|
||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain`, `c`.`loginname` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`ismainbutsubto`=0 " . $standardsubdomains . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " AND `d`.`customerid`=`c`.`customerid` ORDER BY `loginname`, `domain` ASC");
|
||||
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
$subtodomains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']);
|
||||
}
|
||||
|
||||
$phpconfigs = '';
|
||||
$configs = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
||||
|
||||
@@ -621,20 +673,26 @@ if($page == 'domains'
|
||||
$phpconfigs.= makeoption($row['description'], $row['id'], $settings['system']['mod_fcgid_defaultini'], true, true);
|
||||
}
|
||||
|
||||
$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
|
||||
$isemaildomain = makeyesno('isemaildomain', '1', '0', '1');
|
||||
$email_only = makeyesno('email_only', '1', '0', '0');
|
||||
#$isbinddomain = makeyesno('isbinddomain', '1', '0', '1');
|
||||
#$isemaildomain = makeyesno('isemaildomain', '1', '0', '1');
|
||||
#$email_only = makeyesno('email_only', '1', '0', '0');
|
||||
$subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['always'], '3', '0', true, true);
|
||||
$dkim = makeyesno('dkim', '1', '0', '1');
|
||||
$wwwserveralias = makeyesno('wwwserveralias', '1', '0', '1');
|
||||
$caneditdomain = makeyesno('caneditdomain', '1', '0', '1');
|
||||
$openbasedir = makeyesno('openbasedir', '1', '0', '1');
|
||||
$safemode = makeyesno('safemode', '1', '0', '1');
|
||||
$speciallogfile = makeyesno('speciallogfile', '1', '0', '0');
|
||||
$ssl = makeyesno('ssl', '1', '0', '0');
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', '0');
|
||||
#$dkim = makeyesno('dkim', '1', '0', '1');
|
||||
#$wwwserveralias = makeyesno('wwwserveralias', '1', '0', '1');
|
||||
#$caneditdomain = makeyesno('caneditdomain', '1', '0', '1');
|
||||
#$openbasedir = makeyesno('openbasedir', '1', '0', '1');
|
||||
#$safemode = makeyesno('safemode', '1', '0', '1');
|
||||
#$speciallogfile = makeyesno('speciallogfile', '1', '0', '0');
|
||||
#$ssl = makeyesno('ssl', '1', '0', '0');
|
||||
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', '0');
|
||||
$add_date = date('Y-m-d');
|
||||
|
||||
$domain_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_add.php';
|
||||
$domain_add_form = htmlform::genHTMLForm($domain_add_data);
|
||||
|
||||
$title = $domain_add_data['domain_add']['title'];
|
||||
$image = $domain_add_data['domain_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -723,12 +781,23 @@ if($page == 'domains'
|
||||
}
|
||||
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
$isemaildomain = intval($_POST['isemaildomain']);
|
||||
$email_only = intval($_POST['email_only']);
|
||||
$issubof = intval($_POST['issubof']);
|
||||
$subcanemaildomain = intval($_POST['subcanemaildomain']);
|
||||
$caneditdomain = intval($_POST['caneditdomain']);
|
||||
$wwwserveralias = intval($_POST['wwwserveralias']);
|
||||
$registration_date = validate($_POST['registration_date'], 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
|
||||
$registration_date = trim($_POST['registration_date']);
|
||||
$registration_date = validate($registration_date, 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', ''));
|
||||
|
||||
$isemaildomain = 0;
|
||||
if(isset($_POST['isemaildomain']))
|
||||
$isemaildomain = intval($_POST['isemaildomain']);
|
||||
|
||||
$email_only = 0;
|
||||
if(isset($_POST['email_only']))
|
||||
$email_only = intval($_POST['email_only']);
|
||||
|
||||
$wwwserveralias = 0;
|
||||
if(isset($_POST['wwwserveralias']))
|
||||
$wwwserveralias = intval($_POST['wwwserveralias']);
|
||||
|
||||
if($userinfo['change_serversettings'] == '1')
|
||||
{
|
||||
@@ -826,12 +895,15 @@ if($page == 'domains'
|
||||
|
||||
if($settings['system']['use_ssl'] == "1"
|
||||
&& isset($_POST['ssl'])
|
||||
&& isset($_POST['ssl_redirect'])
|
||||
/*&& isset($_POST['ssl_redirect'])*/
|
||||
&& isset($_POST['ssl_ipandport'])
|
||||
&& $_POST['ssl'] != '0')
|
||||
{
|
||||
$ssl = (int)$_POST['ssl'];
|
||||
$ssl_redirect = (int)$_POST['ssl_redirect'];
|
||||
$ssl_redirect = 0;
|
||||
if (isset($_POST['ssl_redirect'])) {
|
||||
$ssl_redirect = (int)$_POST['ssl_redirect'];
|
||||
}
|
||||
$ssl_ipandport = (int)$_POST['ssl_ipandport'];
|
||||
$ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition);
|
||||
|
||||
@@ -915,6 +987,11 @@ if($page == 'domains'
|
||||
standard_error('domainisaliasorothercustomer');
|
||||
}
|
||||
|
||||
if($issubof <= '0')
|
||||
{
|
||||
$issubof = '0';
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'id' => $id,
|
||||
'page' => $page,
|
||||
@@ -941,11 +1018,12 @@ if($page == 'domains'
|
||||
'mod_fcgid_starter' => $mod_fcgid_starter,
|
||||
'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests,
|
||||
'specialsettings' => $specialsettings,
|
||||
'registration_date' => $registration_date
|
||||
'registration_date' => $registration_date,
|
||||
'issubof' => $issubof
|
||||
);
|
||||
|
||||
$security_questions = array(
|
||||
'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'),
|
||||
'reallydisablesecuritysetting' => ($openbasedir == '0' && $userinfo['change_serversettings'] == '1'),
|
||||
'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot))
|
||||
);
|
||||
foreach($security_questions as $question_name => $question_launch)
|
||||
@@ -975,7 +1053,9 @@ if($page == 'domains'
|
||||
|| $mod_fcgid_starter != $result['mod_fcgid_starter']
|
||||
|| $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests']
|
||||
|| $specialsettings != $result['specialsettings']
|
||||
|| $aliasdomain != $result['aliasdomain'])
|
||||
|| $aliasdomain != $result['aliasdomain']
|
||||
|| $issubof != $result['ismainbutsubto']
|
||||
|| $email_only != $result['email_only'])
|
||||
{
|
||||
inserttask('1');
|
||||
}
|
||||
@@ -1037,7 +1117,7 @@ if($page == 'domains'
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "removed specialsettings on all subdomains of domain #" . $id);
|
||||
}
|
||||
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "' WHERE `id`='" . (int)$id . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "', `ismainbutsubto`='" . (int)$issubof . "' WHERE `id`='" . (int)$id . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "'" . $upd_specialsettings . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id);
|
||||
$redirect_props = Array(
|
||||
@@ -1093,6 +1173,14 @@ if($page == 'domains'
|
||||
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']);
|
||||
}
|
||||
|
||||
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, 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`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `c`.`customerid`=`d`.`customerid`". ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " ORDER BY `d`.`domain` ASC");
|
||||
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
$subtodomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['ismainbutsubto']);
|
||||
}
|
||||
|
||||
if($userinfo['ip'] == "-1")
|
||||
{
|
||||
$result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' ORDER BY `ip`, `port` ASC");
|
||||
@@ -1130,20 +1218,20 @@ if($page == 'domains'
|
||||
}
|
||||
|
||||
$result['specialsettings'] = $result['specialsettings'];
|
||||
$isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']);
|
||||
$wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']);
|
||||
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||
$email_only = makeyesno('email_only', '1', '0', $result['email_only']);
|
||||
$ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
#$isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']);
|
||||
#$wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']);
|
||||
#$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||
#$email_only = makeyesno('email_only', '1', '0', $result['email_only']);
|
||||
#$ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
||||
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', $result['subcanemaildomain'], true, true);
|
||||
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', $result['subcanemaildomain'], true, true);
|
||||
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', $result['subcanemaildomain'], true, true);
|
||||
$subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['always'], '3', $result['subcanemaildomain'], true, true);
|
||||
$dkim = makeyesno('dkim', '1', '0', $result['dkim']);
|
||||
$caneditdomain = makeyesno('caneditdomain', '1', '0', $result['caneditdomain']);
|
||||
$openbasedir = makeyesno('openbasedir', '1', '0', $result['openbasedir']);
|
||||
$safemode = makeyesno('safemode', '1', '0', $result['safemode']);
|
||||
#$dkim = makeyesno('dkim', '1', '0', $result['dkim']);
|
||||
#$caneditdomain = makeyesno('caneditdomain', '1', '0', $result['caneditdomain']);
|
||||
#$openbasedir = makeyesno('openbasedir', '1', '0', $result['openbasedir']);
|
||||
#$safemode = makeyesno('safemode', '1', '0', $result['safemode']);
|
||||
$speciallogfile = ($result['speciallogfile'] == 1 ? $lng['panel']['yes'] : $lng['panel']['no']);
|
||||
$result['add_date'] = date('Y-m-d', $result['add_date']);
|
||||
|
||||
@@ -1155,9 +1243,16 @@ if($page == 'domains'
|
||||
$phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true);
|
||||
}
|
||||
|
||||
$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
|
||||
#$specialsettingsforsubdomains = makeyesno('specialsettingsforsubdomains', '1', '0', '1');
|
||||
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$domain_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/domains/formfield.domains_edit.php';
|
||||
$domain_edit_form = htmlform::genHTMLForm($domain_edit_data);
|
||||
|
||||
$title = $domain_edit_data['domain_edit']['title'];
|
||||
$image = $domain_edit_data['domain_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domains_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`,
|
||||
@@ -140,7 +141,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 +186,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 +282,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');
|
||||
@@ -141,11 +141,22 @@ if($page == 'ipsandports'
|
||||
$vhostcontainer = intval($_POST['vhostcontainer']);
|
||||
$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');
|
||||
$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 +198,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 +220,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))
|
||||
{
|
||||
@@ -210,11 +251,18 @@ if($page == 'ipsandports'
|
||||
}
|
||||
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');
|
||||
#$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -237,11 +285,22 @@ if($page == 'ipsandports'
|
||||
$vhostcontainer = intval($_POST['vhostcontainer']);
|
||||
$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');
|
||||
$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')
|
||||
{
|
||||
@@ -283,6 +342,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,7 +369,26 @@ 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');
|
||||
inserttask('4');
|
||||
@@ -305,12 +397,19 @@ if($page == 'ipsandports'
|
||||
}
|
||||
else
|
||||
{
|
||||
$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
||||
#$enable_ssl = makeyesno('ssl', '1', '0', $result['ssl']);
|
||||
$result = htmlentities_array($result);
|
||||
$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']);
|
||||
#$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');
|
||||
@@ -31,10 +31,10 @@ if($page == 'log'
|
||||
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';
|
||||
@@ -167,5 +167,3 @@ if($page == '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');
|
||||
|
||||
@@ -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');
|
||||
@@ -39,6 +39,7 @@ if($page == 'overview')
|
||||
if($action == '')
|
||||
{
|
||||
$tablecontent = '';
|
||||
$count = 0;
|
||||
$result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`");
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
@@ -68,6 +69,7 @@ if($page == 'overview')
|
||||
$domains = $lng['admin']['phpsettings']['notused'];
|
||||
}
|
||||
|
||||
$count ++;
|
||||
eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";");
|
||||
}
|
||||
|
||||
@@ -103,6 +105,13 @@ if($page == 'overview')
|
||||
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 +181,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');
|
||||
@@ -65,6 +65,11 @@ if(($page == 'settings' || $page == 'overview')
|
||||
$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,
|
||||
@@ -75,6 +80,11 @@ if(($page == 'settings' || $page == 'overview')
|
||||
$only_enabledisable
|
||||
)
|
||||
) {
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
inserttask('5');
|
||||
inserttask('9');
|
||||
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
|
||||
}
|
||||
}
|
||||
@@ -115,7 +125,9 @@ elseif($page == 'rebuildconfigs'
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
inserttask('5');
|
||||
redirectTo('admin_index.php', array('s' => $s));
|
||||
inserttask('9');
|
||||
inserttask('10');
|
||||
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -215,5 +227,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,12 +48,16 @@ elseif(isset($_GET['id']))
|
||||
$available_templates = array(
|
||||
'createcustomer',
|
||||
'pop_success',
|
||||
'trafficninetypercent',
|
||||
'trafficmaxpercent',
|
||||
'diskmaxpercent',
|
||||
'new_ticket_by_customer',
|
||||
'new_ticket_for_customer',
|
||||
'new_ticket_by_staff',
|
||||
'new_reply_ticket_by_customer',
|
||||
'new_reply_ticket_by_staff'
|
||||
'new_reply_ticket_by_staff',
|
||||
'new_database_by_customer',
|
||||
'new_ftpaccount_by_customer',
|
||||
'password_reset'
|
||||
);
|
||||
$file_templates = array(
|
||||
'index_html'
|
||||
@@ -148,7 +152,7 @@ elseif($action == 'delete'
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
elseif($action == 'deletef'
|
||||
&& $id != 0)
|
||||
{
|
||||
//file templates
|
||||
@@ -205,6 +209,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 +318,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 +356,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 +391,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 +407,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');
|
||||
@@ -56,7 +56,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);
|
||||
@@ -111,7 +111,7 @@ if($page == 'tickets'
|
||||
} else {
|
||||
$customer = $lng['ticket']['nonexistingcustomer'];
|
||||
}
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
|
||||
}
|
||||
|
||||
$tickets_count++;
|
||||
@@ -140,12 +140,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'];
|
||||
}
|
||||
@@ -154,7 +155,7 @@ if($page == 'tickets'
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
|
||||
}
|
||||
elseif($action == 'new')
|
||||
{
|
||||
@@ -168,8 +169,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)
|
||||
{
|
||||
@@ -223,10 +224,17 @@ if($page == 'tickets'
|
||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
|
||||
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
|
||||
@@ -243,7 +251,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)
|
||||
{
|
||||
@@ -305,7 +313,7 @@ if($page == 'tickets'
|
||||
|
||||
$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);
|
||||
@@ -327,7 +335,7 @@ if($page == 'tickets'
|
||||
|
||||
$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);
|
||||
@@ -337,8 +345,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'
|
||||
@@ -453,14 +466,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')
|
||||
{
|
||||
@@ -472,7 +485,8 @@ elseif($page == 'categories'
|
||||
|
||||
if($order < 1 || $order >= 1000)
|
||||
{
|
||||
$order = 1;
|
||||
// use the latest available
|
||||
$order = ticket::getHighestOrderNumber($db) + 1;
|
||||
}
|
||||
|
||||
if($category == '')
|
||||
@@ -488,7 +502,15 @@ elseif($page == 'categories'
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("echo \"" . getTemplate("ticket/tickets_newcategory") . "\";");
|
||||
$order = ticket::getHighestOrderNumber($db) + 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'
|
||||
@@ -519,7 +541,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'
|
||||
@@ -568,8 +597,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'],
|
||||
@@ -627,7 +655,6 @@ 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'])
|
||||
@@ -642,10 +669,20 @@ elseif($page == 'archive'
|
||||
$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 +698,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 +708,7 @@ elseif($page == 'archive'
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/archivesearch") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/archivesearch") . "\";");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -700,13 +737,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');
|
||||
@@ -725,7 +762,7 @@ elseif($page == 'archive'
|
||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/archive") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/archive") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'view'
|
||||
@@ -748,9 +785,9 @@ elseif($page == 'archive'
|
||||
$by = $lng['ticket']['customer'];
|
||||
}
|
||||
|
||||
$subject = $mainticket->Get('subject');
|
||||
$message = $mainticket->Get('message');
|
||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";");
|
||||
$subject = htmlentities($mainticket->Get('subject'));
|
||||
$message = htmlentities($mainticket->Get('message'));
|
||||
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);
|
||||
@@ -770,20 +807,20 @@ elseif($page == 'archive'
|
||||
$by = $lng['ticket']['customer'];
|
||||
}
|
||||
|
||||
$subject = $subticket->Get('subject');
|
||||
$message = $subticket->Get('message');
|
||||
eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";");
|
||||
$subject = htmlentities($subticket->Get('subject'));
|
||||
$message = htmlentities($subticket->Get('message'));
|
||||
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);
|
||||
$subject = $mainticket->Get('subject');
|
||||
$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 = htmlentities($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)
|
||||
|
||||
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.3f %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.3f %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,7 +12,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
|
||||
1
cache/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*
|
||||
0
cache/.keep
vendored
Normal file
@@ -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$
|
||||
*
|
||||
*/
|
||||
|
||||
// Required code
|
||||
@@ -87,6 +87,7 @@ 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));
|
||||
}
|
||||
|
||||
@@ -109,7 +110,15 @@ if($action == "add")
|
||||
$date_from_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');
|
||||
|
||||
$autoresponder_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_add.php';
|
||||
$autoresponder_add_form = htmlform::genHTMLForm($autoresponder_add_data);
|
||||
|
||||
$title = $autoresponder_add_data['autoresponder_add']['title'];
|
||||
$image = $autoresponder_add_data['autoresponder_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("autoresponder/autoresponder_add") . "\";");
|
||||
}
|
||||
|
||||
// Edit autoresponder
|
||||
@@ -211,6 +220,7 @@ if($action == "edit")
|
||||
if($date_from == -1)
|
||||
{
|
||||
$deactivated = '-1';
|
||||
$date_from = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -222,7 +232,7 @@ if($action == "edit")
|
||||
if($date_until == -1)
|
||||
{
|
||||
$deactivated = '-1';
|
||||
$date_until = '-1';
|
||||
$date_until = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -231,14 +241,15 @@ if($action == "edit")
|
||||
}
|
||||
$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'];
|
||||
|
||||
eval("echo \"" . getTemplate("autoresponder/autoresponder_edit") . "\";");
|
||||
}
|
||||
|
||||
// Delete autoresponder
|
||||
@@ -265,6 +276,7 @@ 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));
|
||||
}
|
||||
|
||||
@@ -277,6 +289,7 @@ if($action == "delete")
|
||||
else
|
||||
{
|
||||
$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))
|
||||
@@ -297,10 +310,9 @@ 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');
|
||||
@@ -368,19 +368,26 @@ elseif($page == 'domains')
|
||||
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
|
||||
}
|
||||
|
||||
$redirectcode = '';
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$redirectcode = '';
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code'], $rc['id'], $settings['customredirect']['default']);
|
||||
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $settings['customredirect']['default']);
|
||||
}
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -534,10 +541,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
|
||||
{
|
||||
@@ -545,20 +559,20 @@ elseif($page == 'domains')
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
|
||||
}
|
||||
|
||||
$redirectcode = '';
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$def_code = getDomainRedirectId($id);
|
||||
$redirectcode = '';
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code'], $rc['id'], $def_code);
|
||||
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $def_code);
|
||||
}
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
||||
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||
#$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
#$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
||||
#$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||
$openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true);
|
||||
|
||||
$result_ipandport = $db->query_first("SELECT `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` WHERE `id`='".(int)$result['ipandport']."'");
|
||||
@@ -569,6 +583,12 @@ elseif($page == 'domains')
|
||||
$domainip = $result_ipandport['ip'];
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$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") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
@@ -187,7 +187,7 @@ elseif($page == 'emails')
|
||||
if(isset($_POST['delete_userfiles'])
|
||||
&& (int)$_POST['delete_userfiles'] == 1)
|
||||
{
|
||||
inserttask('7', $result['loginname'], $result['email']);
|
||||
inserttask('7', $userinfo['loginname'], $result['email_full']);
|
||||
}
|
||||
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
@@ -197,7 +197,12 @@ elseif($page == 'emails')
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno_withcheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -276,7 +281,14 @@ 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';
|
||||
$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -316,6 +328,13 @@ 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';
|
||||
$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -500,6 +519,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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -538,6 +564,13 @@ elseif($page == 'accounts')
|
||||
{
|
||||
$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -579,6 +612,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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -608,13 +648,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']));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -667,6 +713,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,31 @@ 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');
|
||||
$backup_ftp_enabled = ($_POST['backup_ftp_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 +74,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 +106,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 +139,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 +177,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 +186,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 +208,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 +220,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 +252,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 +274,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 +288,8 @@ elseif($page == 'htaccess')
|
||||
$count = 0;
|
||||
$htaccess = '';
|
||||
|
||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
@@ -241,10 +297,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,35 +353,18 @@ elseif($page == 'htaccess')
|
||||
standard_error('invalidpath');
|
||||
}
|
||||
|
||||
if(($_POST['error404path'] === '')
|
||||
|| (validateUrl($idna_convert->encode($_POST['error404path']))))
|
||||
if(isset($_POST['options_cgi']))
|
||||
{
|
||||
$error404path = $_POST['error404path'];
|
||||
$options_cgi = intval($_POST['options_cgi']);
|
||||
}
|
||||
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($path_dupe_check['path'] == $path)
|
||||
{
|
||||
@@ -333,7 +376,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 +393,16 @@ elseif($page == 'htaccess')
|
||||
else
|
||||
{
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
$options_indexes = makeyesno('options_indexes', '1', '0', '1');
|
||||
#$options_indexes = makeyesno('options_indexes', '1', '0', '0');
|
||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
||||
#$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 +419,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 +453,24 @@ 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'];
|
||||
$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
|
||||
#$options_indexes = makeyesno('options_indexes', '1', '0', $result['options_indexes']);
|
||||
$cperlenabled = customerHasPerlEnabled($userinfo['customerid']);
|
||||
#$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") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
@@ -49,7 +49,7 @@ elseif($page == 'accounts')
|
||||
'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);
|
||||
@@ -97,17 +97,12 @@ elseif($page == 'accounts')
|
||||
&& $_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("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $db->escape($row['username']) . "'");
|
||||
}
|
||||
$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'");
|
||||
|
||||
if($userinfo['ftps_used'] == '1')
|
||||
{
|
||||
$resetaccnumber = " , `ftp_lastaccountnumber`='0'";
|
||||
@@ -117,12 +112,19 @@ elseif($page == 'accounts')
|
||||
$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('ftp_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
|
||||
ask_yesno_withcheckbox('ftp_reallydelete', 'admin_customer_alsoremoveftphomedir', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['username']);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -190,7 +192,7 @@ elseif($page == 'accounts')
|
||||
$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("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("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
@@ -207,11 +209,15 @@ elseif($page == 'accounts')
|
||||
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
|
||||
);
|
||||
|
||||
$mail_body = replace_variables($lng['customer']['ftp_add']['infomail_body']['main'], $replace_arr);
|
||||
$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 = $lng['customer']['ftp_add']['infomail_subject'];
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||
@@ -237,21 +243,38 @@ elseif($page == 'accounts')
|
||||
}
|
||||
else
|
||||
{
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], '/');
|
||||
|
||||
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']);
|
||||
$domainlist[] = $row_domain['domain'];
|
||||
}
|
||||
|
||||
sort($domainlist);
|
||||
|
||||
if(isset($domainlist[0]) && $domainlist[0] != '')
|
||||
{
|
||||
foreach($domainlist as $dom)
|
||||
{
|
||||
$domains .= makeoption($idna_convert->decode($dom), $dom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
||||
#$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") . "\";");
|
||||
}
|
||||
@@ -289,6 +312,11 @@ elseif($page == 'accounts')
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($password) . "') 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`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $result['username'] . "_backup'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,6 +329,7 @@ elseif($page == 'accounts')
|
||||
if(!file_exists($path))
|
||||
{
|
||||
mkDirWithCorrectOwnership($userinfo['documentroot'], $path, $result['uid'], $result['gid']);
|
||||
inserttask(5); /* Let the cronjob do the rest */
|
||||
}
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account homdir for '" . $result['username'] . "'");
|
||||
@@ -336,6 +365,12 @@ elseif($page == 'accounts')
|
||||
}
|
||||
}
|
||||
|
||||
$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');
|
||||
@@ -67,7 +67,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'] . '"
|
||||
@@ -172,13 +172,46 @@ 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_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
|
||||
{
|
||||
$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', 'customer');
|
||||
@@ -52,7 +52,7 @@ elseif($page == 'mysqls')
|
||||
'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,17 +62,24 @@ elseif($page == 'mysqls')
|
||||
$count = 0;
|
||||
$mysqls = '';
|
||||
|
||||
// Begin root-session
|
||||
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
|
||||
unset($db_root->password);
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
$row = htmlentities_array($row);
|
||||
$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") . "\";");
|
||||
@@ -80,7 +87,7 @@ elseif($page == '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 . '"');
|
||||
$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'] != '')
|
||||
@@ -126,7 +133,11 @@ elseif($page == 'mysqls')
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno('mysql_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['databasename']);
|
||||
$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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -194,11 +205,10 @@ elseif($page == 'mysqls')
|
||||
|
||||
if($sendinfomail == 1)
|
||||
{
|
||||
$pma = '';
|
||||
$pma = $lng['admin']['notgiven'];
|
||||
if($settings['panel']['phpmyadmin_url'] != '')
|
||||
{
|
||||
$r_arr = array('URI' => $settings['panel']['phpmyadmin_url']);
|
||||
$pma = replace_variables($lng['customer']['mysql_add']['infomail_body']['pma'], $r_arr);
|
||||
$pma = $settings['panel']['phpmyadmin_url'];
|
||||
}
|
||||
|
||||
$replace_arr = array(
|
||||
@@ -210,11 +220,15 @@ elseif($page == 'mysqls')
|
||||
'PMA_URI' => $pma
|
||||
);
|
||||
|
||||
$mail_body = replace_variables($lng['customer']['mysql_add']['infomail_body']['main'], $replace_arr);
|
||||
$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 = $lng['customer']['mysql_add']['infomail_subject'];
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||
@@ -247,7 +261,13 @@ elseif($page == 'mysqls')
|
||||
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
|
||||
}
|
||||
|
||||
$sendinfomail = makeyesno('sendinfomail', '1', '0', '0');
|
||||
#$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") . "\";");
|
||||
}
|
||||
@@ -270,14 +290,14 @@ elseif($page == 'mysqls')
|
||||
&& $_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');
|
||||
$password = validatePassword($password);
|
||||
|
||||
if($password != '')
|
||||
{
|
||||
// Begin root-session
|
||||
// validate password
|
||||
$password = validatePassword($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)
|
||||
@@ -300,6 +320,12 @@ elseif($page == 'mysqls')
|
||||
}
|
||||
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');
|
||||
@@ -37,7 +37,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')
|
||||
{
|
||||
@@ -98,12 +98,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 +157,7 @@ elseif($page == 'tickets')
|
||||
}
|
||||
|
||||
$ticketsopen = (int)$opentickets['count'];
|
||||
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
|
||||
}
|
||||
elseif($action == 'new')
|
||||
{
|
||||
@@ -226,9 +227,9 @@ elseif($page == 'tickets')
|
||||
$categories = makeoption($lng['ticket']['no_cat'], '0');
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3', $settings['ticket']['default_priority']);
|
||||
$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 +247,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
|
||||
@@ -326,7 +334,7 @@ elseif($page == 'tickets')
|
||||
|
||||
$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);
|
||||
@@ -348,7 +356,7 @@ elseif($page == 'tickets')
|
||||
|
||||
$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 +367,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');
|
||||
|
||||
|
Before Width: | Height: | Size: 51 B After Width: | Height: | Size: 51 B |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
images/Classic/changetheme.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
images/Classic/default.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
images/Classic/error.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
images/Classic/info.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
images/Classic/logo.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 62 B After Width: | Height: | Size: 62 B |
|
Before Width: | Height: | Size: 60 B After Width: | Height: | Size: 60 B |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 86 B After Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 69 B |
|
Before Width: | Height: | Size: 66 B After Width: | Height: | Size: 66 B |
|
Before Width: | Height: | Size: 82 B After Width: | Height: | Size: 82 B |
|
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
|
Before Width: | Height: | Size: 827 B After Width: | Height: | Size: 827 B |
BIN
images/Froxlor/bar.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
images/Froxlor/bargrey.gif
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
images/Froxlor/barred.gif
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
images/Froxlor/bg_cover.gif
Normal file
|
After Width: | Height: | Size: 53 B |
BIN
images/Froxlor/header_g.png
Normal file
|
After Width: | Height: | Size: 281 B |
BIN
images/Froxlor/icons/aps.png
Normal file
|
After Width: | Height: | Size: 983 B |
BIN
images/Froxlor/icons/aps_upload.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
images/Froxlor/icons/archive_ticket.png
Normal file
|
After Width: | Height: | Size: 889 B |
BIN
images/Froxlor/icons/autoresponder.png
Normal file
|
After Width: | Height: | Size: 973 B |
BIN
images/Froxlor/icons/autoresponder_add.png
Normal file
|
After Width: | Height: | Size: 1013 B |
BIN
images/Froxlor/icons/backup.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
images/Froxlor/icons/backup_big.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
images/Froxlor/icons/bad.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
images/Froxlor/icons/button_ok.png
Normal file
|
After Width: | Height: | Size: 537 B |
BIN
images/Froxlor/icons/cancel.png
Normal file
|
After Width: | Height: | Size: 655 B |
BIN
images/Froxlor/icons/categories.png
Normal file
|
After Width: | Height: | Size: 1013 B |
BIN
images/Froxlor/icons/categories_big.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
images/Froxlor/icons/category_add.png
Normal file
|
After Width: | Height: | Size: 1014 B |
BIN
images/Froxlor/icons/category_add_big.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
images/Froxlor/icons/category_edit.png
Normal file
|
After Width: | Height: | Size: 1006 B |
BIN
images/Froxlor/icons/category_edit_big.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
images/Froxlor/icons/category_new.png
Normal file
|
After Width: | Height: | Size: 1013 B |
BIN
images/Froxlor/icons/clock.png
Normal file
|
After Width: | Height: | Size: 879 B |
BIN
images/Froxlor/icons/clock_add.png
Normal file
|
After Width: | Height: | Size: 924 B |
BIN
images/Froxlor/icons/clock_delete.png
Normal file
|
After Width: | Height: | Size: 945 B |
BIN
images/Froxlor/icons/clock_edit.png
Normal file
|
After Width: | Height: | Size: 966 B |
BIN
images/Froxlor/icons/clock_error.png
Normal file
|
After Width: | Height: | Size: 952 B |