Compare commits
955 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35c2ba4a76 | ||
|
|
fcfb4af3a0 | ||
|
|
4abd0bbee0 | ||
|
|
4f75355983 | ||
|
|
c07322de0f | ||
|
|
604b1dc912 | ||
|
|
78dce129ff | ||
|
|
06f4f7593a | ||
|
|
1b22447d1c | ||
|
|
8ce0da0681 | ||
|
|
ba6cde89ef | ||
|
|
e6248cd5a9 | ||
|
|
c0889171a5 | ||
|
|
ac3387ded7 | ||
|
|
ea844ee07c | ||
|
|
7b2dae9d2f | ||
|
|
3d9bd124b1 | ||
|
|
401f5dad8b | ||
|
|
6b986375e7 | ||
|
|
45a3e85829 | ||
|
|
77615e71c4 | ||
|
|
c24b0ab8c3 | ||
|
|
832c5d3c89 | ||
|
|
3e615f0b68 | ||
|
|
d51551989d | ||
|
|
454b48f9a8 | ||
|
|
8f9a323e0b | ||
|
|
c1252fe495 | ||
|
|
86e73e268c | ||
|
|
511d2699e6 | ||
|
|
3352ccffc1 | ||
|
|
aa7cf38f7e | ||
|
|
4297ed3607 | ||
|
|
5d60b25900 | ||
|
|
7ace2a8a4b | ||
|
|
0038552955 | ||
|
|
b83be49980 | ||
|
|
ec06768303 | ||
|
|
7d6d683e52 | ||
|
|
95b641060d | ||
|
|
d589b77ae0 | ||
|
|
ac74e7e6a7 | ||
|
|
2ea9a6bffa | ||
|
|
62dcf6e1a5 | ||
|
|
c0d2d2dddd | ||
|
|
84a84e4907 | ||
|
|
11f3ddf54a | ||
|
|
346351ef98 | ||
|
|
4ab80e6144 | ||
|
|
83ee756ae7 | ||
|
|
062cc20877 | ||
|
|
fdb633d786 | ||
|
|
02cf6285ec | ||
|
|
ee5b81bcbf | ||
|
|
67d623cd21 | ||
|
|
cbe8653f5d | ||
|
|
f83625655c | ||
|
|
3912ea1911 | ||
|
|
c947370ddc | ||
|
|
8dfd27a0dc | ||
|
|
a76cbbcb55 | ||
|
|
23313282ce | ||
|
|
1c9023cdaf | ||
|
|
92c54703c5 | ||
|
|
b647f71f74 | ||
|
|
b1cb9ba221 | ||
|
|
4eee1d0b52 | ||
|
|
e162a1c893 | ||
|
|
3c1d63cbcb | ||
|
|
def4bd9861 | ||
|
|
1d05f66fd4 | ||
|
|
f04bf559a0 | ||
|
|
3fbe96dc1b | ||
|
|
a177c0558e | ||
|
|
6e4121d9bb | ||
|
|
bb7874e68f | ||
|
|
c10320ff9c | ||
|
|
6c4ecad7f8 | ||
|
|
0deb4404d2 | ||
|
|
2b0cfea888 | ||
|
|
65a5df507c | ||
|
|
af6a80ab76 | ||
|
|
3d0b0cdbdd | ||
|
|
6408251c14 | ||
|
|
f90b83cb34 | ||
|
|
491dfccc8e | ||
|
|
89d04a83a0 | ||
|
|
3d2ac9af17 | ||
|
|
0e9044b7ba | ||
|
|
64ddddd3d5 | ||
|
|
bfd1b6bbef | ||
|
|
ddb179f340 | ||
|
|
893274c89c | ||
|
|
4fbdb80faf | ||
|
|
b23ea6bbcc | ||
|
|
450fff57ff | ||
|
|
57693f804f | ||
|
|
d342300c47 | ||
|
|
b3d01fd6d2 | ||
|
|
6d25edab60 | ||
|
|
36faeb3f09 | ||
|
|
e460b7cce9 | ||
|
|
c1e083c8b2 | ||
|
|
70a077da48 | ||
|
|
c5fb8bee6b | ||
|
|
418990e271 | ||
|
|
93ab8964f1 | ||
|
|
fd599da07e | ||
|
|
369df7af62 | ||
|
|
bb01dd0d93 | ||
|
|
84f00a2519 | ||
|
|
8e07768996 | ||
|
|
9b12025c9f | ||
|
|
14f9344c50 | ||
|
|
af430f9946 | ||
|
|
992702870c | ||
|
|
642cd3da9d | ||
|
|
5d2d1ffa1a | ||
|
|
19bbecb535 | ||
|
|
e636e6eb39 | ||
|
|
86ac4708f0 | ||
|
|
f49ac9e193 | ||
|
|
f0d9db420a | ||
|
|
526dbbd68e | ||
|
|
9a05a71f6b | ||
|
|
e4f3af5d4b | ||
|
|
3a7b7c1300 | ||
|
|
cdea6cecfb | ||
|
|
c36a7bf22b | ||
|
|
ca2a8c9907 | ||
|
|
4914fc640a | ||
|
|
f0b073a6f1 | ||
|
|
79f5ff4d35 | ||
|
|
8609b2394b | ||
|
|
5bb3c16312 | ||
|
|
df5d3ef66f | ||
|
|
a207f2f936 | ||
|
|
b0bd0836cd | ||
|
|
475377dd85 | ||
|
|
16776ce750 | ||
|
|
3861917dbc | ||
|
|
65891eff1c | ||
|
|
bf9306c641 | ||
|
|
666d0db550 | ||
|
|
6a41b30e70 | ||
|
|
0808bacb39 | ||
|
|
026f8503ab | ||
|
|
19a7e78ebe | ||
|
|
76fb0d2a20 | ||
|
|
a418e60556 | ||
|
|
8f760e87bc | ||
|
|
0aff176cdc | ||
|
|
cdcab6e1f8 | ||
|
|
37d03bdf6a | ||
|
|
4a40870576 | ||
|
|
35958168a2 | ||
|
|
6badc2ad77 | ||
|
|
5184dc9ce7 | ||
|
|
b446575bf0 | ||
|
|
b7114c670a | ||
|
|
536e66da7c | ||
|
|
9114a98e4c | ||
|
|
9955bed2c1 | ||
|
|
f6af38a2c3 | ||
|
|
76e886e610 | ||
|
|
6daec3c975 | ||
|
|
e9000a7e99 | ||
|
|
44a53492e6 | ||
|
|
7cf0fa7284 | ||
|
|
9aa86e1dee | ||
|
|
961aad43d1 | ||
|
|
6e84ca4ae4 | ||
|
|
f79e351b72 | ||
|
|
a24d809428 | ||
|
|
0fa64ea943 | ||
|
|
fe0b71b628 | ||
|
|
a23260fb7f | ||
|
|
eb984c2f4c | ||
|
|
1836132c28 | ||
|
|
aae635bf5d | ||
|
|
8599ff775b | ||
|
|
8bfdd0bc14 | ||
|
|
30344b0dce | ||
|
|
8019629a28 | ||
|
|
7a28108475 | ||
|
|
cfa94c5837 | ||
|
|
c9c0530461 | ||
|
|
093ebfa457 | ||
|
|
3800f31823 | ||
|
|
cc26584f01 | ||
|
|
8131e9e92c | ||
|
|
38e472a623 | ||
|
|
3e21cb0298 | ||
|
|
b9bb1a1286 | ||
|
|
25609a7068 | ||
|
|
35d8b3f8a1 | ||
|
|
d593a217a4 | ||
|
|
960fa58799 | ||
|
|
76b716d41d | ||
|
|
0b3e788b86 | ||
|
|
b88246b112 | ||
|
|
4d10c72ae9 | ||
|
|
0a21ede3d2 | ||
|
|
3669822064 | ||
|
|
b68f9fe395 | ||
|
|
e101d01e11 | ||
|
|
bdce761af0 | ||
|
|
784d1a62f7 | ||
|
|
c84602d560 | ||
|
|
3bcba9fa40 | ||
|
|
7246dc124e | ||
|
|
fcdcd4d6cb | ||
|
|
07d981ac25 | ||
|
|
1bf764c5c3 | ||
|
|
79b886994c | ||
|
|
62f8c7d1b6 | ||
|
|
6fe0b7f6a4 | ||
|
|
a55df73281 | ||
|
|
ce6176ffe4 | ||
|
|
570ceb8160 | ||
|
|
163228ff75 | ||
|
|
68b9c22938 | ||
|
|
7936f72bc1 | ||
|
|
81df4f5444 | ||
|
|
54093a0a9a | ||
|
|
c5e8786670 | ||
|
|
6ebd6db87f | ||
|
|
68e31962bc | ||
|
|
9d24648607 | ||
|
|
c26223a887 | ||
|
|
444f4b5d1e | ||
|
|
c72b07f690 | ||
|
|
c318d9e9df | ||
|
|
5b6acce822 | ||
|
|
9a4b45838a | ||
|
|
48df1bac4b | ||
|
|
63aed1e8f4 | ||
|
|
426e87a337 | ||
|
|
cd141ce381 | ||
|
|
ece63b8a36 | ||
|
|
af423248da | ||
|
|
5ca7e173b0 | ||
|
|
f845f7771a | ||
|
|
500a829161 | ||
|
|
96c34b9b29 | ||
|
|
ec7c19cceb | ||
|
|
7a4501e581 | ||
|
|
75c5fae6b2 | ||
|
|
7a5bf65184 | ||
|
|
103626e82a | ||
|
|
ca1a77d883 | ||
|
|
ac68a5d35f | ||
|
|
f63f1d947b | ||
|
|
5b6aa1aa8d | ||
|
|
12177fd21d | ||
|
|
aa4254ad47 | ||
|
|
e2076603dd | ||
|
|
2ea90c1b45 | ||
|
|
cf66dcf38d | ||
|
|
51a83d8b09 | ||
|
|
e467409cbb | ||
|
|
05b59621a6 | ||
|
|
e148e7d584 | ||
|
|
3fb6d4eac9 | ||
|
|
4aa78b07be | ||
|
|
88048bf4c8 | ||
|
|
0bfc3393a0 | ||
|
|
018bc0b329 | ||
|
|
f9543806a1 | ||
|
|
b9d65390c5 | ||
|
|
8740393b8c | ||
|
|
1ddad9295f | ||
|
|
d14493c9be | ||
|
|
329c3f03c7 | ||
|
|
16144944ca | ||
|
|
6d0e44e103 | ||
|
|
7db2fc6aeb | ||
|
|
9aecf4ca8a | ||
|
|
1b05b64fea | ||
|
|
ed52821a11 | ||
|
|
20141ec173 | ||
|
|
194e4cfd20 | ||
|
|
5a5653d594 | ||
|
|
a810a49a74 | ||
|
|
654af4fbc6 | ||
|
|
35ffb12950 | ||
|
|
7890730afa | ||
|
|
a97e7d3697 | ||
|
|
b34c0e268e | ||
|
|
63fe3e7019 | ||
|
|
886e8632a7 | ||
|
|
b18a3cabc2 | ||
|
|
f3f7127f82 | ||
|
|
8a8082b579 | ||
|
|
7a27095e7b | ||
|
|
a08a34283d | ||
|
|
76db59a1b1 | ||
|
|
a86fb44e61 | ||
|
|
b6b294b682 | ||
|
|
96e7ede031 | ||
|
|
e87c16b598 | ||
|
|
d02daee582 | ||
|
|
77b515751e | ||
|
|
0ade48117c | ||
|
|
7491442a25 | ||
|
|
6ba2d99b67 | ||
|
|
5c980946a9 | ||
|
|
213e959568 | ||
|
|
f36643851f | ||
|
|
dea3601549 | ||
|
|
29665ff3c8 | ||
|
|
fc72d7ec32 | ||
|
|
b0f3d09cb9 | ||
|
|
a9ab3825f5 | ||
|
|
630e2966e2 | ||
|
|
df6441ef80 | ||
|
|
1730088ab1 | ||
|
|
7d97544f05 | ||
|
|
c4195909e1 | ||
|
|
8b3841e2d5 | ||
|
|
9ff1d1cce5 | ||
|
|
6b99f650ca | ||
|
|
3282736600 | ||
|
|
f25d1cbb9e | ||
|
|
3775892bc2 | ||
|
|
6b27a00007 | ||
|
|
3fc3174788 | ||
|
|
38999a4f5e | ||
|
|
ef8c3d3cf7 | ||
|
|
3a6779570f | ||
|
|
e3ff9d8f5d | ||
|
|
5fc5bdfaeb | ||
|
|
adcffe3912 | ||
|
|
5e0c641a02 | ||
|
|
0f4695a43f | ||
|
|
6258b53a04 | ||
|
|
0776afc09e | ||
|
|
0ab8d177b2 | ||
|
|
9e6c405bcd | ||
|
|
94cd1a2f01 | ||
|
|
954e507160 | ||
|
|
d195a9622d | ||
|
|
0883580199 | ||
|
|
8c2e94b2cd | ||
|
|
d9dbd1917f | ||
|
|
240025a183 | ||
|
|
24838ec2cf | ||
|
|
eaee62db4d | ||
|
|
2f0a717241 | ||
|
|
07d82fb063 | ||
|
|
fae7fd0ccc | ||
|
|
20b2b1c399 | ||
|
|
ee8115cbe9 | ||
|
|
465f5b406e | ||
|
|
9428c794c0 | ||
|
|
2754e0ae5a | ||
|
|
b6be7f6975 | ||
|
|
f02a8d73c7 | ||
|
|
f30d7aecc8 | ||
|
|
4b1eee49a8 | ||
|
|
b5124b8274 | ||
|
|
00f8707703 | ||
|
|
10996c5bed | ||
|
|
fc712bde90 | ||
|
|
4e1433d861 | ||
|
|
4fc02e6c93 | ||
|
|
57c72d68a4 | ||
|
|
0230c6ac2b | ||
|
|
865f7036fd | ||
|
|
6825c5e0dc | ||
|
|
3e63b1aabb | ||
|
|
d6d19e7cb2 | ||
|
|
adeac9cce1 | ||
|
|
5a743b2005 | ||
|
|
dc1f33f494 | ||
|
|
e04ae041ab | ||
|
|
236377c28e | ||
|
|
687b28016e | ||
|
|
00edba1d0d | ||
|
|
207e9e1b43 | ||
|
|
0afbad5ff1 | ||
|
|
357e60c054 | ||
|
|
9d45759613 | ||
|
|
9503ae0ac5 | ||
|
|
97d20199fe | ||
|
|
d66d32066d | ||
|
|
13bde22344 | ||
|
|
fb430e55d2 | ||
|
|
5fde181fdc | ||
|
|
4da7b815f3 | ||
|
|
84e17ab91f | ||
|
|
95d0830584 | ||
|
|
a8fa13dd3c | ||
|
|
a7a8c51c18 | ||
|
|
50ae198164 | ||
|
|
b325e50da1 | ||
|
|
c6afcc57d9 | ||
|
|
ff4b03f4fa | ||
|
|
393a5ce570 | ||
|
|
ca9128bdbf | ||
|
|
6837852f52 | ||
|
|
957a0e78a3 | ||
|
|
656d725b58 | ||
|
|
ffed226a4f | ||
|
|
215abeb105 | ||
|
|
68c8faa8cb | ||
|
|
d2e86e936b | ||
|
|
d2fe9be860 | ||
|
|
357614992e | ||
|
|
134250d1c1 | ||
|
|
8a8d485c39 | ||
|
|
d06b08f020 | ||
|
|
7a70257b95 | ||
|
|
4400125c7e | ||
|
|
88d0fe5752 | ||
|
|
cc1b45ac6e | ||
|
|
61d5d4a150 | ||
|
|
107c84fdbc | ||
|
|
f85d983c84 | ||
|
|
a0406c9749 | ||
|
|
840d9f5915 | ||
|
|
59f8002a5d | ||
|
|
0b38e192d4 | ||
|
|
014e350a9e | ||
|
|
382cf45e08 | ||
|
|
abe8446736 | ||
|
|
ed4acb0118 | ||
|
|
8032addc0a | ||
|
|
0cfc75976f | ||
|
|
8e83c5f788 | ||
|
|
7b01cb47de | ||
|
|
b13d20d44c | ||
|
|
b8ab1edc56 | ||
|
|
cc96aef50f | ||
|
|
9ddd3a2a58 | ||
|
|
fea75e2c2f | ||
|
|
87b15ce57d | ||
|
|
a807ffd918 | ||
|
|
f3d505170a | ||
|
|
13904cfd7b | ||
|
|
3e83ae8a6e | ||
|
|
44febee357 | ||
|
|
0b20a154f5 | ||
|
|
b9101b2041 | ||
|
|
9e798c6362 | ||
|
|
9e1bd811a5 | ||
|
|
26aed64bf8 | ||
|
|
3f93044121 | ||
|
|
8cb615df5f | ||
|
|
885bf7e88c | ||
|
|
efabfd7183 | ||
|
|
d8b43f60b8 | ||
|
|
0a2fed06cb | ||
|
|
e13d588c07 | ||
|
|
460e153c6f | ||
|
|
cb36615228 | ||
|
|
6dca567827 | ||
|
|
80379232a9 | ||
|
|
3a3aa73d2d | ||
|
|
c949c153ed | ||
|
|
a4dba36f82 | ||
|
|
bee19fabfa | ||
|
|
43770d37e1 | ||
|
|
7b6b145229 | ||
|
|
57d52bd59e | ||
|
|
d6b4bd8d36 | ||
|
|
c28f70d885 | ||
|
|
fad2ae873d | ||
|
|
30c025202c | ||
|
|
9cb64e34dc | ||
|
|
72af7c600f | ||
|
|
903a91b9ea | ||
|
|
2b699849ca | ||
|
|
a7ae6e54de | ||
|
|
1396aca657 | ||
|
|
b19cabef79 | ||
|
|
c3f5e6c4db | ||
|
|
f4b6d9930f | ||
|
|
f77ddac4ed | ||
|
|
932e1f95c5 | ||
|
|
a8b52d50af | ||
|
|
f10f63b6be | ||
|
|
c5cdd9f567 | ||
|
|
e5b2fd90c0 | ||
|
|
f7b43f470f | ||
|
|
515e542179 | ||
|
|
cc4637095d | ||
|
|
bffa8817d9 | ||
|
|
98b82ed0c6 | ||
|
|
4f52982a7e | ||
|
|
1edba0c368 | ||
|
|
06983ca382 | ||
|
|
c53ef5b96e | ||
|
|
a2b7f98332 | ||
|
|
c25ad76200 | ||
|
|
7057984534 | ||
|
|
02a4fd4e1d | ||
|
|
57ec429776 | ||
|
|
c52d3819af | ||
|
|
85f35abe2d | ||
|
|
58674a2f8f | ||
|
|
968137a967 | ||
|
|
66b274c1bf | ||
|
|
b9d68a17fa | ||
|
|
ced64138e8 | ||
|
|
4fdaed5cc4 | ||
|
|
0fd11afdcb | ||
|
|
8202cc96e7 | ||
|
|
59bf7ba22f | ||
|
|
9c075c05f5 | ||
|
|
6815501c1d | ||
|
|
f11aa9a1c4 | ||
|
|
3b33dde9ac | ||
|
|
7fb0e88313 | ||
|
|
9615aaa83a | ||
|
|
16cc53146c | ||
|
|
56e9f748f4 | ||
|
|
80e338610f | ||
|
|
93abbf4a10 | ||
|
|
0271ccfc28 | ||
|
|
dae3e416a2 | ||
|
|
759213f8b9 | ||
|
|
01b313a3ce | ||
|
|
4567f7c781 | ||
|
|
ef76635508 | ||
|
|
30235ff3eb | ||
|
|
ebb390a1fd | ||
|
|
0c1a4f692a | ||
|
|
0c25611d26 | ||
|
|
cd79670438 | ||
|
|
6b46b31818 | ||
|
|
713cb1b3ac | ||
|
|
e492c4aca6 | ||
|
|
5496915e19 | ||
|
|
f77d084a53 | ||
|
|
060b3f8782 | ||
|
|
e4b7bf799d | ||
|
|
6066601568 | ||
|
|
01404187cc | ||
|
|
a9da673a31 | ||
|
|
d1a9460117 | ||
|
|
bde278430e | ||
|
|
9c36b31ad2 | ||
|
|
b528b93178 | ||
|
|
7ca00d56be | ||
|
|
39f17b1a9e | ||
|
|
08e17f7d16 | ||
|
|
a638dddec9 | ||
|
|
59bbfcef4f | ||
|
|
5cd1c1284a | ||
|
|
f81826fd9b | ||
|
|
2e59e2bfdf | ||
|
|
03a8a9c8c9 | ||
|
|
689cb40bcc | ||
|
|
1c2a1b8c69 | ||
|
|
3d187fd0a0 | ||
|
|
2fc057d670 | ||
|
|
e7b030fa30 | ||
|
|
e74262c81e | ||
|
|
d1a52ca85c | ||
|
|
44b53ffd2c | ||
|
|
ffe49e8acd | ||
|
|
58b3a19ae7 | ||
|
|
0be29498b0 | ||
|
|
1b4069f01e | ||
|
|
5f284c31ab | ||
|
|
1c892a0f9c | ||
|
|
8fb5a3ae7c | ||
|
|
3c731661a0 | ||
|
|
ed5e2ba39d | ||
|
|
22eb0e19cc | ||
|
|
ad31b07a04 | ||
|
|
99696ff6cb | ||
|
|
8b3c634652 | ||
|
|
26084a19fa | ||
|
|
84637d82d4 | ||
|
|
7a83a01095 | ||
|
|
71d3410b4f | ||
|
|
b58a9d3b88 | ||
|
|
05897c3e01 | ||
|
|
a06211b497 | ||
|
|
db2cca8e86 | ||
|
|
aa5e574d5d | ||
|
|
09c5bbcb63 | ||
|
|
cadab96bae | ||
|
|
0c9ab91373 | ||
|
|
836b7fb056 | ||
|
|
d3fd4ee2f4 | ||
|
|
58499a068f | ||
|
|
ce83e8f92b | ||
|
|
fc5aea1c33 | ||
|
|
89bf0aa128 | ||
|
|
b2ea0cb666 | ||
|
|
c0b19fa2b2 | ||
|
|
9e028ef0f7 | ||
|
|
a8460b7570 | ||
|
|
f42fa0ee7b | ||
|
|
8d27f71cee | ||
|
|
3a9813c1b5 | ||
|
|
699f451234 | ||
|
|
cad3c02f08 | ||
|
|
7484ab1bc9 | ||
|
|
8f87aa6636 | ||
|
|
15486ed764 | ||
|
|
118693471c | ||
|
|
382bd88344 | ||
|
|
2a4d618bcc | ||
|
|
14b56d9287 | ||
|
|
ba35677cf6 | ||
|
|
c4723fc3f2 | ||
|
|
3aff47d983 | ||
|
|
9fe6db8cd9 | ||
|
|
15a03f63a9 | ||
|
|
d7b5c4bc71 | ||
|
|
db05ea5f32 | ||
|
|
ceedab3a6e | ||
|
|
0b6bb64600 | ||
|
|
2985a08a8d | ||
|
|
a1b26c91d2 | ||
|
|
7d54744e9a | ||
|
|
7afc7e2797 | ||
|
|
8d1f894622 | ||
|
|
3f0a491f8c | ||
|
|
9787089615 | ||
|
|
076c07b4be | ||
|
|
6887dad1a9 | ||
|
|
5fee795b5c | ||
|
|
146c205f6c | ||
|
|
5c87e2210c | ||
|
|
db6bdfd931 | ||
|
|
b796f02a3d | ||
|
|
a86140cec0 | ||
|
|
1f9caedc16 | ||
|
|
dc6034796a | ||
|
|
be8d38b478 | ||
|
|
d3cd83eb93 | ||
|
|
984849d2c8 | ||
|
|
bc82c8fead | ||
|
|
3b9f580bac | ||
|
|
84d9212582 | ||
|
|
9c7142817d | ||
|
|
1217483894 | ||
|
|
71d592e38b | ||
|
|
59b7ced862 | ||
|
|
29d54671d3 | ||
|
|
7676acf1f2 | ||
|
|
ca44db25a0 | ||
|
|
8c5f5ba629 | ||
|
|
ef97f63b73 | ||
|
|
b103d719ea | ||
|
|
ad0828df12 | ||
|
|
719fac7f88 | ||
|
|
b1b2eec21f | ||
|
|
6169328647 | ||
|
|
fbd93b879c | ||
|
|
af43ccf37e | ||
|
|
e356957592 | ||
|
|
1fee5d7242 | ||
|
|
3e55073188 | ||
|
|
fb66ed078a | ||
|
|
d4f93f07ee | ||
|
|
6e3bc87302 | ||
|
|
28f525fb5c | ||
|
|
def6a7c051 | ||
|
|
5d36c7228d | ||
|
|
cf2dabc714 | ||
|
|
a63e752dde | ||
|
|
ec1696ebab | ||
|
|
7730a57dbf | ||
|
|
e444ebff62 | ||
|
|
015f51f8d3 | ||
|
|
40ba41497b | ||
|
|
2a5494c85a | ||
|
|
ffe20960d5 | ||
|
|
040f151d65 | ||
|
|
db286077f8 | ||
|
|
90bd5c3512 | ||
|
|
ee29c406ab | ||
|
|
599d179c4d | ||
|
|
4b84d978d1 | ||
|
|
91c1928309 | ||
|
|
9d4d6efdb9 | ||
|
|
81cef92443 | ||
|
|
734686ff33 | ||
|
|
0d897f13e3 | ||
|
|
05436211dd | ||
|
|
ed9235d341 | ||
|
|
ee7177bdec | ||
|
|
74da53c822 | ||
|
|
0f0ae6eb6d | ||
|
|
472291e59d | ||
|
|
86c881a63c | ||
|
|
f95431c55e | ||
|
|
f2f022ba30 | ||
|
|
1a62e9413d | ||
|
|
e53e3f9843 | ||
|
|
69391309bc | ||
|
|
038e9947c1 | ||
|
|
5c4a38e4de | ||
|
|
a0d7997778 | ||
|
|
d660165470 | ||
|
|
735f890e56 | ||
|
|
a2ab73fa41 | ||
|
|
f7f1907546 | ||
|
|
ced78ac6f7 | ||
|
|
fe3728d522 | ||
|
|
f858f045d6 | ||
|
|
51673f3569 | ||
|
|
e430092eda | ||
|
|
eaf70765d5 | ||
|
|
9191bc6c08 | ||
|
|
d1d772f790 | ||
|
|
edc7a91519 | ||
|
|
4eb177e65f | ||
|
|
5f34dfa968 | ||
|
|
c43574a714 | ||
|
|
525b6ee98d | ||
|
|
e5814b14d9 | ||
|
|
e5cd9ad727 | ||
|
|
cc5c30cc69 | ||
|
|
cf2104e989 | ||
|
|
14b7be0a4f | ||
|
|
e6c385da10 | ||
|
|
57124d040d | ||
|
|
67c55c5a25 | ||
|
|
f86e4f39d3 | ||
|
|
5e162b018d | ||
|
|
9851ac53cc | ||
|
|
794c4d3b55 | ||
|
|
530b6da6e8 | ||
|
|
6986ffefbe | ||
|
|
e6eefc9913 | ||
|
|
3cd66a9fc4 | ||
|
|
a1c98e4012 | ||
|
|
cc7610d436 | ||
|
|
36efb04f86 | ||
|
|
dcc5859eb8 | ||
|
|
1557e5b7a3 | ||
|
|
9a41d35f98 | ||
|
|
65a7983edc | ||
|
|
7b4a34ee69 | ||
|
|
fb63dac2d1 | ||
|
|
f9b014f640 | ||
|
|
fe15ff4913 | ||
|
|
cb128e5020 | ||
|
|
2c3a11cff9 | ||
|
|
7dbb715f04 | ||
|
|
cdc2c8b1e4 | ||
|
|
ba33268596 | ||
|
|
fd96e4b42e | ||
|
|
950c9d7373 | ||
|
|
470fb9a02a | ||
|
|
f2a4c52110 | ||
|
|
10cfdb137a | ||
|
|
323e2210c3 | ||
|
|
d256ddfcbc | ||
|
|
de250df0cb | ||
|
|
e7c9b4d402 | ||
|
|
f3719d339e | ||
|
|
efc353256d | ||
|
|
f4026c1df5 | ||
|
|
eed7776e86 | ||
|
|
aface6b425 | ||
|
|
b0fb3a31f7 | ||
|
|
b01d37d085 | ||
|
|
72e6e2af24 | ||
|
|
0db11bf0f8 | ||
|
|
07e388c554 | ||
|
|
84c9ac7e82 | ||
|
|
e572c072a9 | ||
|
|
f6f7b2e4be | ||
|
|
5a0973dfa3 | ||
|
|
268f3b0a24 | ||
|
|
348de6da35 | ||
|
|
82958cd8c2 | ||
|
|
264bc50451 | ||
|
|
2ce7e9728f | ||
|
|
8c0bef06c6 | ||
|
|
7a493fad80 | ||
|
|
891835d542 | ||
|
|
1876ed1459 | ||
|
|
711f54662c | ||
|
|
f331dee8a1 | ||
|
|
3f0d94c157 | ||
|
|
f5576606e1 | ||
|
|
34de2c03c4 | ||
|
|
225be93610 | ||
|
|
089b03de38 | ||
|
|
785e8f0938 | ||
|
|
ea24918785 | ||
|
|
daa8e45582 | ||
|
|
aa45bf5f70 | ||
|
|
b64bfaeb92 | ||
|
|
659d673ffa | ||
|
|
65e0962111 | ||
|
|
a5cf1a0ac9 | ||
|
|
465f29531e | ||
|
|
88b0c70d0c | ||
|
|
4c1b30a081 | ||
|
|
afdd94ff9e | ||
|
|
0b8c1441ef | ||
|
|
83b1d85730 | ||
|
|
399664c65a | ||
|
|
2830bb722f | ||
|
|
7e733e60ee | ||
|
|
1f6e3c271b | ||
|
|
9c79654cf4 | ||
|
|
7ea04992e3 | ||
|
|
29a949d3d2 | ||
|
|
36ed2b4dc2 | ||
|
|
9d50eca251 | ||
|
|
c28a0291d7 | ||
|
|
e9ba9e089e | ||
|
|
01b58cf247 | ||
|
|
aa532806d0 | ||
|
|
6ddfe7a378 | ||
|
|
01a2690cf1 | ||
|
|
8692a107ab | ||
|
|
d8b0221c91 | ||
|
|
a6408bf398 | ||
|
|
433c8669f4 | ||
|
|
43aebcccff | ||
|
|
1e22b96d9a | ||
|
|
962abd34c7 | ||
|
|
c6a45789bc | ||
|
|
9d48bbf2f3 | ||
|
|
bdc002978a | ||
|
|
7ce1781f57 | ||
|
|
fde4d53f1d | ||
|
|
862265ab60 | ||
|
|
8ac41a28b9 | ||
|
|
fb4b0e3920 | ||
|
|
49297ee5e2 | ||
|
|
046be275a7 | ||
|
|
5054eec852 | ||
|
|
a7041e0399 | ||
|
|
5f5650f53a | ||
|
|
606f8fe557 | ||
|
|
fd6a0597a6 | ||
|
|
62fa764b4c | ||
|
|
9217d9977f | ||
|
|
31231a5f60 | ||
|
|
4cf8e2f2ea | ||
|
|
fd74671760 | ||
|
|
28d626f882 | ||
|
|
09d69945f1 | ||
|
|
b87e4277f2 | ||
|
|
24efe70335 | ||
|
|
a26b37c270 | ||
|
|
3d67143903 | ||
|
|
96219f406d | ||
|
|
4f5cb34f00 | ||
|
|
d4f3093ae3 | ||
|
|
cc89f26982 | ||
|
|
8155484ee9 | ||
|
|
97e3b30415 | ||
|
|
07b2c26bec | ||
|
|
afe431b72f | ||
|
|
f5f796344c | ||
|
|
8ee56d23ba | ||
|
|
f62dba4e1b | ||
|
|
87f84c694a | ||
|
|
f5a0727b8e | ||
|
|
4d5dcb82d6 | ||
|
|
7fa901bebb | ||
|
|
1159bde3eb | ||
|
|
9013062ae9 | ||
|
|
47b2fe7c7c | ||
|
|
cfaae63657 | ||
|
|
98e79d933c | ||
|
|
ae27e06675 | ||
|
|
209ab4dff9 | ||
|
|
cf18590b84 | ||
|
|
6c25cd1c85 | ||
|
|
0d3df6e1fe | ||
|
|
b11d0c5cd9 | ||
|
|
afc3ab8a8b | ||
|
|
1903f34dea | ||
|
|
ee7e50004a | ||
|
|
96d26d0d94 | ||
|
|
7c12ab82c5 | ||
|
|
5c152a9754 | ||
|
|
5a4fffbce6 | ||
|
|
220118f4bc | ||
|
|
5d214e5bd7 | ||
|
|
43fe968ad0 | ||
|
|
7daa7eb0bc | ||
|
|
a0274b083b | ||
|
|
04c7aae433 | ||
|
|
5a99950a8f | ||
|
|
4659d8e24a | ||
|
|
5e3a4fb1ab | ||
|
|
1839264f7a | ||
|
|
5f9d90a293 | ||
|
|
5c825e3206 | ||
|
|
a54a27d6ba | ||
|
|
16135fb92b | ||
|
|
f8d0472274 | ||
|
|
368e6a5c50 | ||
|
|
fb4ade70d2 | ||
|
|
6a0fcc1fd9 | ||
|
|
0eec533647 | ||
|
|
941b887b75 | ||
|
|
43595df977 | ||
|
|
8d652183a0 | ||
|
|
6af37fb40e | ||
|
|
d3ceeb3f14 | ||
|
|
7182b245b3 | ||
|
|
a48d6ae174 | ||
|
|
521d6bbd4d | ||
|
|
e4f0144bbc | ||
|
|
2c50107bea | ||
|
|
043ca2ff5a | ||
|
|
ab1e3c3fc8 | ||
|
|
230c2a1cf3 | ||
|
|
7bea15a7a9 | ||
|
|
2b2d44166d | ||
|
|
70dc03098c | ||
|
|
16b7d7f029 | ||
|
|
81dad796ee | ||
|
|
8a28c6e0ef | ||
|
|
fc5d14d223 | ||
|
|
0ec2238e4b | ||
|
|
8077a2e3b1 | ||
|
|
677cd54e1c | ||
|
|
a3a3dec68c | ||
|
|
bb6860532c | ||
|
|
68b4edd1e1 | ||
|
|
9dff94f1c8 | ||
|
|
f5e2d13c53 | ||
|
|
15e7441ab9 | ||
|
|
12e63a3eea | ||
|
|
4e1405ca39 | ||
|
|
0e1d82db8b | ||
|
|
952edd380f | ||
|
|
9b843a8ad5 | ||
|
|
d4e310d150 | ||
|
|
e0e57da5b8 | ||
|
|
00b881f49b | ||
|
|
080eeb29ec | ||
|
|
db74c99098 | ||
|
|
d3599dc8c0 | ||
|
|
6eba5f5318 | ||
|
|
16bca3c665 | ||
|
|
dcb32c1bb5 | ||
|
|
f76df2252d | ||
|
|
402e8620a9 | ||
|
|
ccf40fc89b | ||
|
|
660bede9c5 | ||
|
|
1db572e010 | ||
|
|
d4c4a0c05f | ||
|
|
6b7a3e73f1 | ||
|
|
55aab4004c | ||
|
|
c1de55f3d5 | ||
|
|
f9d84a09f1 |
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
packages/*
|
||||
temp/*
|
||||
.buildpath
|
||||
.project
|
||||
.settings/
|
||||
*.diff
|
||||
*~
|
||||
562
COPYING
@@ -1,281 +1,281 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
@@ -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(
|
||||
@@ -77,6 +87,24 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_adminmail_defname' => array(
|
||||
'label' => $lng['serversettings']['adminmail_defname'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'adminmail_defname',
|
||||
'type' => 'string',
|
||||
'default' => 'Froxlor Administrator',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_adminmail_return' => array(
|
||||
'label' => $lng['serversettings']['adminmail_return'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'adminmail_return',
|
||||
'type' => 'string',
|
||||
'string_type' => 'mail',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_decimal_places' => array(
|
||||
'label' => $lng['serversettings']['decimal_places'],
|
||||
'settinggroup' => 'panel',
|
||||
@@ -133,14 +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',
|
||||
@@ -54,6 +62,23 @@ return array(
|
||||
'default' => 900,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_password_min_length' => array(
|
||||
'label' => $lng['serversettings']['panel_password_min_length'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'password_min_length',
|
||||
'type' => 'int',
|
||||
'default' => 0,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'panel_password_regex' => array(
|
||||
'label' => $lng['serversettings']['panel_password_regex'],
|
||||
'settinggroup' => 'panel',
|
||||
'varname' => 'password_regex',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
/* 'plausibility_check_method' => 'checkValidRegEx', */
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'customer_accountprefix' => array(
|
||||
'label' => $lng['serversettings']['accountprefix'],
|
||||
'settinggroup' => 'customer',
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -27,8 +27,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,31 @@ return array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingHostname',
|
||||
'plausibility_check_method' => 'checkHostname',
|
||||
),
|
||||
'system_froxlordirectlyviahostname' => array(
|
||||
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'froxlordirectlyviahostname',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_validatedomain' => array(
|
||||
'label' => $lng['serversettings']['validate_domain'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'validate_domain',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_stdsubdomain' => array(
|
||||
'label' => $lng['serversettings']['stdsubdomainhost'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'stdsubdomain',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingHostname',
|
||||
),
|
||||
'system_mysql_access_host' => array(
|
||||
'label' => $lng['serversettings']['mysql_access_host'],
|
||||
@@ -67,15 +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',
|
||||
@@ -85,6 +103,14 @@ return array(
|
||||
'default' => 'html',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_store_index_file_subs' => array(
|
||||
'label' => $lng['serversettings']['system_store_index_file_subs'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'store_index_file_subs',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_httpuser' => array(
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'httpuser',
|
||||
@@ -97,6 +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' => 150,
|
||||
'default' => 90,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_report_trafficmax' => array(
|
||||
'label' => $lng['serversettings']['report']['trafficmax'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'report_trafficmax',
|
||||
'type' => 'int',
|
||||
'int_min' => 1,
|
||||
'int_max' => 150,
|
||||
'default' => 90,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_debug_cron' => array(
|
||||
'label' => $lng['serversettings']['cron']['debug'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -104,10 +159,10 @@ return array(
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -27,9 +27,26 @@ 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(
|
||||
@@ -59,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',
|
||||
@@ -111,6 +112,104 @@ 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',
|
||||
'varname' => 'enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'defaultwebsrverrhandler_err401' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err401'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err401',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'nginx')
|
||||
),
|
||||
'defaultwebsrverrhandler_err403' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err403'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err403',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'nginx')
|
||||
),
|
||||
'defaultwebsrverrhandler_err404' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err404'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err404',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'defaultwebsrverrhandler_err500' => array(
|
||||
'label' => $lng['serversettings']['defaultwebsrverrhandler_err500'],
|
||||
'settinggroup' => 'defaultwebsrverrhandler',
|
||||
'varname' => 'err500',
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'nginx')
|
||||
),
|
||||
'customredirect_enabled' => array(
|
||||
'label' => $lng['serversettings']['customredirect_enabled'],
|
||||
'settinggroup' => 'customredirect',
|
||||
'varname' => 'enabled',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'lighttpd')
|
||||
),
|
||||
'customredirect_default' => array(
|
||||
'label' => $lng['serversettings']['customredirect_default'],
|
||||
'settinggroup' => 'customredirect',
|
||||
'varname' => 'default',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options_method' => 'getRedirectCodes',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2', 'lighttpd')
|
||||
),
|
||||
),
|
||||
),
|
||||
'ssl' => array(
|
||||
@@ -123,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'],
|
||||
@@ -154,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',
|
||||
@@ -167,4 +277,4 @@ return array(
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
151
actions/admin/settings/135.fcgid.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'fcgid' => array(
|
||||
'title' => $lng['admin']['fcgid_settings'],
|
||||
'websrv_avail' => array('apache2', 'lighttpd'),
|
||||
'fields' => array(
|
||||
'system_mod_fcgid_enabled' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'plausibility_check_method' => 'checkFcgidPhpFpm',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_mod_fcgid_configdir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['configdir'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_configdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/www/php-fcgi-scripts/',
|
||||
'plausibility_check_method' => 'checkPathConflicts',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_tmpdir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['tmpdir'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_tmpdir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/customers/tmp/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_peardir' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['peardir'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_peardir',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'string_delimiter' => ':',
|
||||
'string_emptyallowed' => true,
|
||||
'default' => '/usr/share/php/:/usr/share/php5/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_mod_fcgid_wrapper' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['wrapper'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_wrapper',
|
||||
'type' => 'option',
|
||||
'option_options' => array(0 => 'ScriptAlias', 1=> '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')
|
||||
),
|
||||
'system_mod_fcgid_idle_timeout' => array(
|
||||
'label' => $lng['serversettings']['mod_fcgid']['idle_timeout'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'mod_fcgid_idle_timeout',
|
||||
'type' => 'int',
|
||||
'default' => 30,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
169
actions/admin/settings/136.phpfpm.php
Normal file
@@ -0,0 +1,169 @@
|
||||
<?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',
|
||||
),
|
||||
'system_phpfpm_idle_timeout' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout'],
|
||||
'settinggroup' => 'phpfpm',
|
||||
'varname' => 'idle_timeout',
|
||||
'type' => 'int',
|
||||
'default' => 30,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
65
actions/admin/settings/137.perl.php
Normal file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'perl' => array(
|
||||
'title' => $lng['admin']['perl_settings'],
|
||||
'fields' => array(
|
||||
'perl_path' => array(
|
||||
'label' => $lng['serversettings']['perl_path'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'perl_path',
|
||||
'type' => 'string',
|
||||
'default' => '/usr/bin/perl',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('lighttpd')
|
||||
),
|
||||
'system_perl_suexecworkaround' => array(
|
||||
'label' => $lng['serversettings']['perl']['suexecworkaround'],
|
||||
'settinggroup' => 'perl',
|
||||
'varname' => 'suexecworkaround',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'system_perl_suexeccgipath' => array(
|
||||
'label' => $lng['serversettings']['perl']['suexeccgipath'],
|
||||
'settinggroup' => 'perl',
|
||||
'varname' => 'suexecpath',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/var/www/cgi-bin/',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('apache2')
|
||||
),
|
||||
'perl_server' => array(
|
||||
'label' => $lng['serversettings']['perl_server'],
|
||||
'settinggroup' => 'serversettings',
|
||||
'varname' => 'perl_server',
|
||||
'type' => 'string',
|
||||
'default' => 'unix:/var/run/nginx/cgiwrap-dispatch.sock',
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array('nginx')
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -40,45 +40,45 @@ return array(
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_domain_file' => array(
|
||||
'label' => $lng['serversettings']['awstats_domain_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_domain_file',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/awstats/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_model_file' => array(
|
||||
'label' => $lng['serversettings']['awstats_model_file'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_model_file',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'default' => '/etc/awstats/awstats.model.conf.syscp',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_path' => array(
|
||||
'label' => $lng['serversettings']['awstats_path'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_path',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/usr/share/awstats/VERSION/webroot/cgi-bin/',
|
||||
'default' => '/usr/bin/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_updateall_command' => array(
|
||||
'label' => $lng['serversettings']['awstats_updateall_command'],
|
||||
'system_awstats_awstatspath' => array(
|
||||
'label' => $lng['serversettings']['awstats_awstatspath'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_updateall_command',
|
||||
'varname' => 'awstats_awstatspath',
|
||||
'type' => 'string',
|
||||
'string_type' => 'file',
|
||||
'default' => '/usr/bin/awstats_updateall.pl',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/usr/bin/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
'system_awstats_conf' => array(
|
||||
'label' => $lng['serversettings']['awstats_conf'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_conf',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/awstats/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_awstats_icons' => array(
|
||||
'label' => $lng['serversettings']['awstats_icons'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'awstats_icons',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/usr/share/awstats/icon/',
|
||||
'save_method' => 'storeSettingField',
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -75,7 +75,7 @@ return array(
|
||||
'default' => 100,
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'systen_autoresponder_enabled' => array(
|
||||
'system_autoresponder_enabled' => array(
|
||||
'label' => $lng['serversettings']['autoresponder_active'],
|
||||
'settinggroup' => 'autoresponder',
|
||||
'varname' => 'autoresponder_active',
|
||||
@@ -84,7 +84,7 @@ return array(
|
||||
'cronmodule' => 'froxlor/autoresponder',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'systen_last_autoresponder_run' => array(
|
||||
'system_last_autoresponder_run' => array(
|
||||
'settinggroup' => 'autoresponder',
|
||||
'varname' => 'last_autoresponder_run',
|
||||
'type' => 'hidden',
|
||||
|
||||
40
actions/admin/settings/155.ftpserver.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2003-2009 the SysCP Team (see authors).
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
'groups' => array(
|
||||
'ftpserver' => array(
|
||||
'title' => $lng['admin']['ftpserversettings'],
|
||||
'fields' => array(
|
||||
'ftpserver' => array(
|
||||
'label' => $lng['admin']['ftpserver'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'ftpserver',
|
||||
'type' => 'option',
|
||||
'default' => 'proftpd',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('proftpd' => 'Proftpd', 'pureftpd' => 'Pureftpd'),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -22,6 +22,15 @@ return array(
|
||||
'nameserver' => array(
|
||||
'title' => $lng['admin']['nameserversettings'],
|
||||
'fields' => array(
|
||||
'nameserver_enable' => array(
|
||||
'label' => $lng['serversettings']['bindenable'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'bind_enable',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'system_bindconf_directory' => array(
|
||||
'label' => $lng['serversettings']['bindconf_directory'],
|
||||
'settinggroup' => 'system',
|
||||
@@ -59,6 +68,24 @@ return array(
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'system_dns_createmailentry' => array(
|
||||
'label' => $lng['serversettings']['mail_also_with_mxservers'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'dns_createmailentry',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_defaultttl' => array(
|
||||
'label' => $lng['serversettings']['defaultttl'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'defaultttl',
|
||||
'type' => 'int',
|
||||
'default' => 604800, /* 1 week */
|
||||
'int_min' => 3600, /* 1 hour */
|
||||
'int_max' => 2147483647, /* integer max */
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -29,6 +29,7 @@ return array(
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'logger_severity' => array(
|
||||
'label' => $lng['serversettings']['logger']['severity'],
|
||||
|
||||
@@ -14,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(
|
||||
@@ -28,13 +28,15 @@ return array(
|
||||
'varname' => 'use_dkim',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
'overview_option' => true
|
||||
),
|
||||
'dkim_prefix' => array(
|
||||
'label' => $lng['dkim']['dkim_prefix'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_prefix',
|
||||
'type' => 'string',
|
||||
'string_type' => 'dir',
|
||||
'default' => '/etc/postfix/dkim/',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
@@ -56,6 +58,63 @@ return array(
|
||||
'default' => 'dkim-keys.conf',
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
'dkim_algorithm' => array(
|
||||
'label' => $lng['dkim']['dkim_algorithm'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_algorithm',
|
||||
'type' => 'option',
|
||||
'default' => 'all',
|
||||
'option_mode' => 'multiple',
|
||||
'option_options' => array('all' => 'All', 'sha1' => 'SHA1', 'sha256' => 'SHA256'),
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_servicetype' => array(
|
||||
'label' => $lng['dkim']['dkim_servicetype'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_servicetype',
|
||||
'type' => 'option',
|
||||
'default' => '0',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('0' => 'All', '1' => 'E-Mail'),
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_keylength' => array(
|
||||
'label' => $lng['dkim']['dkim_keylength'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_keylength',
|
||||
'type' => 'option',
|
||||
'default' => '1024',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('1024' => '1024 Bit', '2048' => '2048 Bit'),
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_notes' => array(
|
||||
'label' => $lng['dkim']['dkim_notes'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_notes',
|
||||
'type' => 'string',
|
||||
'string_regexp' => '/^[a-z0-9\._]+$/i',
|
||||
'default' => '',
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_add_adsp' => array(
|
||||
'label' => $lng['dkim']['dkim_add_adsp'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_add_adsp',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkim_add_adsppolicy' => array(
|
||||
'label' => $lng['dkim']['dkim_add_adsppolicy'],
|
||||
'settinggroup' => 'dkim',
|
||||
'varname' => 'dkim_add_adsppolicy',
|
||||
'type' => 'option',
|
||||
'default' => '1',
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array('0' => 'Unknown', '1' => 'All', '2' => 'Discardable'),
|
||||
'save_method' => 'storeSettingFieldInsertBindTask',
|
||||
),
|
||||
'dkimrestart_command' => array(
|
||||
'label' => $lng['dkim']['dkimrestart_command'],
|
||||
'settinggroup' => 'dkim',
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -26,7 +26,8 @@ return array(
|
||||
'varname' => 'use_spf',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'spf_entry' => array(
|
||||
'label' => $lng['spf']['spf_entry'],
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -30,6 +30,7 @@ return array(
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/ticket',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'ticket_noreply_email' => array(
|
||||
'label' => $lng['serversettings']['ticket']['noreply_email'],
|
||||
@@ -57,6 +58,7 @@ return array(
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(0 => html_entity_decode($lng['admin']['tickets']['daily']), 1 => html_entity_decode($lng['admin']['tickets']['weekly']), 2 => html_entity_decode($lng['admin']['tickets']['monthly']), 3 => html_entity_decode($lng['admin']['tickets']['yearly'])),
|
||||
'save_method' => 'storeSettingField',
|
||||
'plausibility_check_method' => 'setCycleOfCronjob',
|
||||
),
|
||||
'ticket_concurrently_open' => array(
|
||||
'label' => $lng['serversettings']['ticket']['concurrentlyopen'],
|
||||
@@ -124,9 +126,19 @@ return array(
|
||||
'type' => 'hidden',
|
||||
'default' => '',
|
||||
),
|
||||
'ticket_default_priority' => array(
|
||||
'label' => $lng['serversettings']['ticket']['default_priority'],
|
||||
'settinggroup' => 'ticket',
|
||||
'varname' => 'default_priority',
|
||||
'type' => 'option',
|
||||
'default' => 2,
|
||||
'option_mode' => 'one',
|
||||
'option_options' => array(1 => $lng['ticket']['high'], 2 => $lng['ticket']['normal'], 3 => $lng['ticket']['low']),
|
||||
'save_method' => 'storeSettingField',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -30,6 +30,7 @@ return array(
|
||||
'default' => false,
|
||||
'cronmodule' => 'froxlor/aps',
|
||||
'save_method' => 'storeSettingField',
|
||||
'overview_option' => true
|
||||
),
|
||||
'aps_items_per_page' => array(
|
||||
'label' => $lng['aps']['packages_per_page'],
|
||||
@@ -58,7 +59,7 @@ return array(
|
||||
'type' => 'option',
|
||||
'default' => '',
|
||||
'option_mode' => 'multiple',
|
||||
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap'),
|
||||
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring'),
|
||||
'save_method' => 'storeSettingApsPhpExtensions',
|
||||
),
|
||||
'aps_php-function' => array(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Settings
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
return array(
|
||||
@@ -38,68 +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',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
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
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
204
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++;
|
||||
@@ -93,6 +110,7 @@ if($page == 'admins'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$admincount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("admins/admins") . "\";");
|
||||
}
|
||||
elseif($action == 'su')
|
||||
@@ -154,6 +172,7 @@ if($page == 'admins'
|
||||
|
||||
$loginname = validate($_POST['loginname'], 'loginname');
|
||||
$password = validate($_POST['admin_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$customers = intval_ressource($_POST['customers']);
|
||||
|
||||
@@ -211,6 +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']))
|
||||
@@ -218,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']);
|
||||
@@ -250,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']);
|
||||
|
||||
@@ -336,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));
|
||||
@@ -379,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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -417,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'];
|
||||
@@ -491,18 +579,39 @@ 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']))
|
||||
{
|
||||
$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']);
|
||||
@@ -519,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']))
|
||||
@@ -560,6 +681,7 @@ if($page == 'admins'
|
||||
{
|
||||
if($password != '')
|
||||
{
|
||||
$password = validatePassword($password);
|
||||
$password = md5($password);
|
||||
}
|
||||
else
|
||||
@@ -592,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,
|
||||
@@ -670,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')
|
||||
@@ -723,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');
|
||||
@@ -95,10 +95,10 @@ if($userinfo['change_serversettings'] == '1')
|
||||
'<VIRTUAL_MAILBOX_BASE>' => $settings['system']['vmail_homedir'],
|
||||
'<VIRTUAL_UID_MAPS>' => $settings['system']['vmail_uid'],
|
||||
'<VIRTUAL_GID_MAPS>' => $settings['system']['vmail_gid'],
|
||||
'<AWSTATS_PATH>' => $settings['system']['awstats_path'],
|
||||
'<SSLPROTOCOLS>' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '',
|
||||
'<REALTIME_PORT>' => $settings['system']['realtime_port'],
|
||||
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? $settings['system']['mod_fcgid_tmpdir'] : '/tmp/'
|
||||
'<CUSTOMER_TMP>' => ($settings['system']['mod_fcgid_tmpdir'] != '') ? makeCorrectDir($settings['system']['mod_fcgid_tmpdir']) : '/tmp/',
|
||||
'<BASE_PATH>' => makeCorrectDir(dirname(__FILE__)),
|
||||
'<BIND_CONFIG_PATH>' => makeCorrectDir($settings['system']['bindconf_directory'])
|
||||
);
|
||||
$files = '';
|
||||
$configpage = '';
|
||||
@@ -111,6 +111,7 @@ if($userinfo['change_serversettings'] == '1')
|
||||
if(is_array($value))
|
||||
{
|
||||
$commands = implode("\n", $value);
|
||||
$commands = str_replace("\n\n", "\n", $commands);
|
||||
|
||||
if($commands != '')
|
||||
{
|
||||
|
||||
@@ -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');
|
||||
@@ -75,12 +75,6 @@ if($page == 'cronjobs'
|
||||
|
||||
$description = $lng['crondesc'][$row['desc_lng_key']];
|
||||
|
||||
/*
|
||||
* don't allow deletion of 'froxlor' cronjobs
|
||||
*/
|
||||
$vendor_a = explode('/', $row['module']);
|
||||
$vendor = $vendor_a[0];
|
||||
|
||||
eval("\$crons.=\"" . getTemplate("cronjobs/cronjobs_cronjob") . "\";");
|
||||
$count++;
|
||||
}
|
||||
@@ -94,21 +88,74 @@ if($page == 'cronjobs'
|
||||
elseif($action == 'new')
|
||||
{
|
||||
/*
|
||||
* @TODO Finish me
|
||||
* @TODO later
|
||||
*/
|
||||
}
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
/*
|
||||
* @TODO Finish me
|
||||
*/
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CRONRUNS . "` WHERE `id`='" . (int)$id . "'");
|
||||
|
||||
if ($result['cronfile'] != '')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$isactive = intval($_POST['isactive']);
|
||||
$interval_value = validate($_POST['interval_value'], 'interval_value', '/^([0-9]+)$/Di', 'stringisempty');
|
||||
$interval_interval = validate($_POST['interval_interval'], 'interval_interval');
|
||||
|
||||
if($isactive != 1)
|
||||
{
|
||||
$isactive = 0;
|
||||
}
|
||||
|
||||
$interval = $interval_value.' '.strtoupper($interval_interval);
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CRONRUNS . "`
|
||||
SET `isactive` = '".(int)$isactive."',
|
||||
`interval` = '".$interval."'
|
||||
WHERE `id` = '" . (int)$id . "'");
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
#$isactive = makeyesno('isactive', '1', '0', $result['isactive']);
|
||||
// interval
|
||||
$interval_nfo = explode(' ', $result['interval']);
|
||||
$interval_value = $interval_nfo[0];
|
||||
|
||||
$interval_interval = '';
|
||||
$interval_interval.= makeoption($lng['cronmgmt']['seconds'], 'SECOND', $interval_nfo[1]);
|
||||
$interval_interval.= makeoption($lng['cronmgmt']['minutes'], 'MINUTE', $interval_nfo[1]);
|
||||
$interval_interval.= makeoption($lng['cronmgmt']['hours'], 'HOUR', $interval_nfo[1]);
|
||||
$interval_interval.= makeoption($lng['cronmgmt']['days'], 'DAY', $interval_nfo[1]);
|
||||
$interval_interval.= makeoption($lng['cronmgmt']['weeks'], 'WEEK', $interval_nfo[1]);
|
||||
$interval_interval.= makeoption($lng['cronmgmt']['months'], 'MONTH', $interval_nfo[1]);
|
||||
// end of interval
|
||||
|
||||
$change_cronfile = false;
|
||||
if (substr($result['module'], 0, strpos($result['module'], '/')) != 'froxlor')
|
||||
{
|
||||
$change_cronfile = true;
|
||||
}
|
||||
|
||||
$cronjobs_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/cronjobs/formfield.cronjobs_edit.php';
|
||||
$cronjobs_edit_form = htmlform::genHTMLForm($cronjobs_edit_data);
|
||||
|
||||
$title = $cronjobs_edit_data['cronjobs_edit']['title'];
|
||||
$image = $cronjobs_edit_data['cronjobs_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("cronjobs/cronjob_edit") . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
&& $id != 0)
|
||||
{
|
||||
/*
|
||||
* @TODO Finish me
|
||||
* @TODO later
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'admin');
|
||||
@@ -40,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'],
|
||||
@@ -66,18 +71,29 @@ if($page == 'customers'
|
||||
'c.email_quota' => $lng['customer']['email_quota'],
|
||||
'c.email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')',
|
||||
'c.deactivated' => $lng['admin']['deactivated'],
|
||||
'c.phpenabled' => $lng['admin']['phpenabled']
|
||||
'c.lastlogin_succ' => $lng['admin']['lastlogin_succ'],
|
||||
'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($settings['panel']['natsorting']) . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng, true);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -96,7 +112,38 @@ if($page == 'customers'
|
||||
$row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']);
|
||||
$row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']);
|
||||
$row = str_replace_array('-1', 'UL', $row, 'diskspace traffic mysqls emails email_accounts email_forwarders ftps tickets subdomains');
|
||||
$last_login = ((int)$row['lastlogin_succ'] == 0) ? $lng['panel']['neverloggedin'] : date('d.m.Y', $row['lastlogin_succ']);
|
||||
|
||||
/**
|
||||
* percent-values for progressbar
|
||||
*/
|
||||
//For Disk usage
|
||||
if ($row['diskspace'] > 0) {
|
||||
$disk_percent = round(($row['diskspace_used']*100)/$row['diskspace'], 2);
|
||||
$disk_doublepercent = round($disk_percent*2, 2);
|
||||
} else {
|
||||
$disk_percent = 0;
|
||||
$disk_doublepercent = 0;
|
||||
}
|
||||
|
||||
if ($row['traffic'] > 0) {
|
||||
$traffic_percent = round(($row['traffic_used']*100)/$row['traffic'], 2);
|
||||
$traffic_doublepercent = round($traffic_percent*2, 2);
|
||||
} else {
|
||||
$traffic_percent = 0;
|
||||
$traffic_doublepercent = 0;
|
||||
}
|
||||
|
||||
$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 email_autoresponder');
|
||||
$row = htmlentities_array($row);
|
||||
eval("\$customers.=\"" . getTemplate("customers/customers_customer") . "\";");
|
||||
$count++;
|
||||
@@ -105,6 +152,7 @@ if($page == 'customers'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$customercount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("customers/customers") . "\";");
|
||||
}
|
||||
elseif($action == 'su'
|
||||
@@ -126,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)
|
||||
{
|
||||
@@ -138,7 +211,6 @@ if($page == 'customers'
|
||||
{
|
||||
$databases = $db->query("SELECT * FROM " . TABLE_PANEL_DATABASES . " WHERE customerid='" . (int)$id . "' ORDER BY `dbserver`");
|
||||
$db_root = new db($sql_root[0]['host'], $sql_root[0]['user'], $sql_root[0]['password'], '');
|
||||
unset($db_root->password);
|
||||
$last_dbserver = 0;
|
||||
|
||||
while($row_database = $db->fetch_array($databases))
|
||||
@@ -148,15 +220,14 @@ if($page == 'customers'
|
||||
$db_root->query('FLUSH PRIVILEGES;');
|
||||
$db_root->close();
|
||||
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
|
||||
unset($db_root->password);
|
||||
$last_dbserver = $row_database['dbserver'];
|
||||
}
|
||||
|
||||
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||
{
|
||||
$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) . '"');
|
||||
}
|
||||
|
||||
@@ -170,13 +241,39 @@ if($page == 'customers'
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$domains_deleted = $db->affected_rows();
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$id . "' AND `adminsession` = '0'");
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$result2 = $db->query("SELECT `username` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name`='" . $row['username'] . "'");
|
||||
}
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_GROUPS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
|
||||
|
||||
// Delete all waiting "create user" -tasks for this user, #276
|
||||
// Note: the WHERE selects part of a serialized array, but it should be safe this way
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '2' AND `data` LIKE '%:\"" . $db->escape($result['loginname']) . "\";%';");
|
||||
|
||||
// remove everything APS-related, #216
|
||||
$apsresult = $db->query("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
||||
while($apsrow = $db->fetch_array($apsresult))
|
||||
{
|
||||
// remove all package related settings
|
||||
$db->query("DELETE FROM `".TABLE_APS_SETTINGS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
||||
// maybe some leftovers in the tasks
|
||||
$db->query("DELETE FROM `".TABLE_APS_TASKS."` WHERE `InstanceID` = '".(int)$apsrow['ID']."'");
|
||||
}
|
||||
// now remove all user instances
|
||||
$db->query("DELETE FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
|
||||
// eventually some temp-setting-leftovers
|
||||
$db->query("DELETE FROM `".TABLE_APS_TEMP_SETTINGS."` WHERE `CustomerID`='".(int)$id."'");
|
||||
// eof APS-related removings, #216
|
||||
|
||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` - 1 ";
|
||||
$admin_update_query.= ", `domains_used` = `domains_used` - 0" . (int)($domains_deleted - $result['subdomains_used']);
|
||||
|
||||
@@ -205,6 +302,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'];
|
||||
@@ -220,6 +322,11 @@ if($page == 'customers'
|
||||
$admin_update_query.= ", `tickets_used` = `tickets_used` - 0" . (int)$result['tickets'];
|
||||
}
|
||||
|
||||
if($result['aps_packages'] != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `aps_packages` = `aps_packages` - 0" . (int)$result['aps_packages'];
|
||||
}
|
||||
|
||||
if(($result['diskspace'] / 1024) != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `diskspace_used` = `diskspace_used` - 0" . (int)$result['diskspace'];
|
||||
@@ -229,14 +336,25 @@ if($page == 'customers'
|
||||
$db->query($admin_update_query);
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "deleted user '" . $result['loginname'] . "'");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
|
||||
if(isset($_POST['delete_userfiles'])
|
||||
&& (int)$_POST['delete_userfiles'] == 1)
|
||||
{
|
||||
inserttask('6', $result['loginname']);
|
||||
}
|
||||
|
||||
|
||||
# Using filesystem - quota, insert a task which cleans the filesystem - quota
|
||||
if ($settings['system']['diskquota_enabled'])
|
||||
{
|
||||
inserttask('10');
|
||||
}
|
||||
|
||||
/*
|
||||
* move old tickets to archive
|
||||
*/
|
||||
@@ -254,8 +372,8 @@ if($page == 'customers'
|
||||
$mainticket->Archive();
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "archived ticket '" . $mainticket->Get('subject') . "'");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
@@ -284,6 +402,7 @@ if($page == 'customers'
|
||||
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
$gender = intval_ressource($_POST['gender']);
|
||||
|
||||
if(isset($_POST['diskspace_ul']))
|
||||
{
|
||||
@@ -339,9 +458,31 @@ if($page == 'customers'
|
||||
$email_quota = - 1;
|
||||
}
|
||||
|
||||
$email_imap = intval_ressource($_POST['email_imap']);
|
||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
if($settings['autoresponder']['autoresponder_active'] == '1')
|
||||
{
|
||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
||||
|
||||
if(isset($_POST['email_autoresponder_ul']))
|
||||
{
|
||||
$email_autoresponder = - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$email_autoresponder = 0;
|
||||
}
|
||||
|
||||
$email_imap = 0;
|
||||
if(isset($_POST['email_imap']))
|
||||
$email_imap = intval_ressource($_POST['email_imap']);
|
||||
|
||||
$email_pop3 = 0;
|
||||
if(isset($_POST['email_pop3']))
|
||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||
|
||||
$ftps = 0;
|
||||
if(isset($_POST['ftps']))
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
|
||||
if(isset($_POST['ftps_ul']))
|
||||
{
|
||||
@@ -377,10 +518,47 @@ if($page == 'customers'
|
||||
$number_of_aps_packages = 0;
|
||||
}
|
||||
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$password = validate($_POST['customer_password'], 'password');
|
||||
$sendpassword = intval($_POST['sendpassword']);
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
$createstdsubdomain = 0;
|
||||
if(isset($_POST['createstdsubdomain']))
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$password = validate($_POST['new_customer_password'], 'password');
|
||||
// only check if not empty,
|
||||
// cause empty == generate password automatically
|
||||
if($password != '')
|
||||
{
|
||||
$password = validatePassword($password);
|
||||
}
|
||||
|
||||
$backup_allowed = 0;
|
||||
if(isset($_POST['backup_allowed']))
|
||||
$backup_allowed = intval($_POST['backup_allowed']);
|
||||
|
||||
if ($backup_allowed != 0)
|
||||
{
|
||||
$backup_allowed = 1;
|
||||
}
|
||||
|
||||
// gender out of range? [0,2]
|
||||
if ($gender < 0 || $gender > 2) {
|
||||
$gender = 0;
|
||||
}
|
||||
|
||||
$sendpassword = 0;
|
||||
if(isset($_POST['sendpassword']))
|
||||
$sendpassword = intval($_POST['sendpassword']);
|
||||
|
||||
$phpenabled = 0;
|
||||
if(isset($_POST['phpenabled']))
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
|
||||
$perlenabled = 0;
|
||||
if(isset($_POST['perlenabled']))
|
||||
$perlenabled = intval($_POST['perlenabled']);
|
||||
|
||||
$store_defaultindex = 0;
|
||||
if(isset($_POST['store_defaultindex']))
|
||||
$store_defaultindex = intval($_POST['store_defaultindex']);
|
||||
|
||||
$diskspace = $diskspace * 1024;
|
||||
$traffic = $traffic * 1024 * 1024;
|
||||
|
||||
@@ -390,6 +568,7 @@ if($page == 'customers'
|
||||
|| ((($userinfo['email_accounts_used'] + $email_accounts) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|
||||
|| ((($userinfo['email_forwarders_used'] + $email_forwarders) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|
||||
|| ((($userinfo['email_quota_used'] + $email_quota) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||
|| ((($userinfo['email_autoresponder_used'] + $email_autoresponder) > $userinfo['email_autoresponder']) && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
||||
|| ((($userinfo['ftps_used'] + $ftps) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|
||||
|| ((($userinfo['tickets_used'] + $tickets) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|
||||
|| ((($userinfo['subdomains_used'] + $subdomains) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
|
||||
@@ -400,6 +579,7 @@ if($page == 'customers'
|
||||
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|
||||
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|
||||
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||
|| ($email_autoresponder == '-1' && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
||||
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|
||||
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|
||||
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
|
||||
@@ -431,11 +611,11 @@ if($page == 'customers'
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($_POST['loginname'])
|
||||
&& $_POST['loginname'] != '')
|
||||
if(isset($_POST['new_loginname'])
|
||||
&& $_POST['new_loginname'] != '')
|
||||
{
|
||||
$accountnumber = intval($settings['system']['lastaccountnumber']);
|
||||
$loginname = validate($_POST['loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
||||
$loginname = validate($_POST['new_loginname'], 'loginname', '/^[a-z0-9\-_]+$/i');
|
||||
|
||||
// Accounts which match systemaccounts are not allowed, filtering them
|
||||
|
||||
@@ -443,6 +623,11 @@ if($page == 'customers'
|
||||
{
|
||||
standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']);
|
||||
}
|
||||
|
||||
//Additional filtering for Bug #962
|
||||
if(function_exists('posix_getpwnam') && !in_array("posix_getpwnam",explode(",",ini_get('disable_functions'))) && posix_getpwnam($loginname)) {
|
||||
standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -483,12 +668,57 @@ if($page == 'customers'
|
||||
$phpenabled = '1';
|
||||
}
|
||||
|
||||
if($perlenabled != '0')
|
||||
{
|
||||
$perlenabled = '1';
|
||||
}
|
||||
|
||||
if($password == '')
|
||||
{
|
||||
$password = substr(md5(uniqid(microtime(), 1)), 12, 6);
|
||||
}
|
||||
|
||||
$result = $db->query("INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` (`adminid`, `loginname`, `password`, `name`, `firstname`, `company`, `street`, `zipcode`, `city`, `phone`, `fax`, `email`, `customernumber`, `def_language`, `documentroot`, `guid`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `standardsubdomain`, `phpenabled`, `imap`, `pop3`, `aps_packages`) VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($firstname) . "', '" . $db->escape($company) . "', '" . $db->escape($street) . "', '" . $db->escape($zipcode) . "', '" . $db->escape($city) . "', '" . $db->escape($phone) . "', '" . $db->escape($fax) . "', '" . $db->escape($email) . "', '" . $db->escape($customernumber) . "','" . $db->escape($def_language) . "', '" . $db->escape($documentroot) . "', '" . $db->escape($guid) . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '0', '" . $db->escape($phpenabled) . "', '" . $db->escape($email_imap) . "', '" . $db->escape($email_pop3) . "', '" . (int)$number_of_aps_packages . "')");
|
||||
$_theme = $settings['panel']['default_theme'];
|
||||
|
||||
$result = $db->query(
|
||||
"INSERT INTO `" . TABLE_PANEL_CUSTOMERS . "` SET
|
||||
`adminid` = '" . (int)$userinfo['adminid'] . "',
|
||||
`loginname` = '" . $db->escape($loginname) . "',
|
||||
`password` = '" . md5($password) . "',
|
||||
`name` = '" . $db->escape($name) . "',
|
||||
`firstname` = '" . $db->escape($firstname) . "',
|
||||
`gender` = '" . (int)$gender . "',
|
||||
`company` = '" . $db->escape($company) . "',
|
||||
`street` = '" . $db->escape($street) . "',
|
||||
`zipcode` = '" . $db->escape($zipcode) . "',
|
||||
`city` = '" . $db->escape($city) . "',
|
||||
`phone` = '" . $db->escape($phone) . "',
|
||||
`fax` = '" . $db->escape($fax) . "',
|
||||
`email` = '" . $db->escape($email) . "',
|
||||
`customernumber` = '" . $db->escape($customernumber) . "',
|
||||
`def_language` = '" . $db->escape($def_language) . "',
|
||||
`documentroot` = '" . $db->escape($documentroot) . "',
|
||||
`guid` = '" . $db->escape($guid) . "',
|
||||
`diskspace` = '" . $db->escape($diskspace) . "',
|
||||
`traffic` = '" . $db->escape($traffic) . "',
|
||||
`subdomains` = '" . $db->escape($subdomains) . "',
|
||||
`emails` = '" . $db->escape($emails) . "',
|
||||
`email_accounts` = '" . $db->escape($email_accounts) . "',
|
||||
`email_forwarders` = '" . $db->escape($email_forwarders) . "',
|
||||
`email_quota` = '" . $db->escape($email_quota) . "',
|
||||
`ftps` = '" . $db->escape($ftps) . "',
|
||||
`tickets` = '" . $db->escape($tickets) . "',
|
||||
`mysqls` = '" . $db->escape($mysqls) . "',
|
||||
`standardsubdomain` = '0',
|
||||
`phpenabled` = '" . $db->escape($phpenabled) . "',
|
||||
`imap` = '" . $db->escape($email_imap) . "',
|
||||
`pop3` = '" . $db->escape($email_pop3) . "',
|
||||
`aps_packages` = '" . (int)$number_of_aps_packages . "',
|
||||
`perlenabled` = '" . $db->escape($perlenabled) . "',
|
||||
`email_autoresponder` = '" . $db->escape($email_autoresponder) . "',
|
||||
`backup_allowed` = '" . $db->escape($backup_allowed) . "',
|
||||
`theme` = '" . $db->escape($_theme) . "'"
|
||||
);
|
||||
$customerid = $db->insert_id();
|
||||
$admin_update_query = "UPDATE `" . TABLE_PANEL_ADMINS . "` SET `customers_used` = `customers_used` + 1";
|
||||
|
||||
@@ -517,6 +747,12 @@ if($page == 'customers'
|
||||
$admin_update_query.= ", `email_quota_used` = `email_quota_used` + 0" . (int)$email_quota;
|
||||
}
|
||||
|
||||
if($email_autoresponder != '-1'
|
||||
&& $settings['autoresponder']['autoresponder_active'] == 1)
|
||||
{
|
||||
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` + 0" . (int)$email_autoresponder;
|
||||
}
|
||||
|
||||
if($subdomains != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `subdomains_used` = `subdomains_used` + 0" . (int)$subdomains;
|
||||
@@ -553,8 +789,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)
|
||||
@@ -567,36 +808,50 @@ if($page == 'customers'
|
||||
$htpasswdPassword = crypt($password);
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
|
||||
|
||||
if($settings['system']['awstats_enabled'] == '1')
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/awstats/')) . "')");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added awstats htpasswd for user '" . $loginname . "'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_HTPASSWDS . "` " . "(`customerid`, `username`, `password`, `path`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($htpasswdPassword) . "', '" . $db->escape(makeCorrectDir($documentroot . '/webalizer/')) . "')");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added webalizer htpasswd for user '" . $loginname . "'");
|
||||
}
|
||||
|
||||
inserttask('1');
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_USERS . "` " . "(`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($documentroot) . "', 'y', '" . (int)$guid . "', '" . (int)$guid . "')");
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_GROUPS . "` " . "(`customerid`, `groupname`, `gid`, `members`) " . "VALUES ('" . (int)$customerid . "', '" . $db->escape($loginname) . "', '" . $db->escape($guid) . "', '" . $db->escape($loginname) . "')");
|
||||
$result = $db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($loginname) . "', 'user', '0', '0', '0', '0', '0', '0')");
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "automatically added ftp-account for user '" . $loginname . "'");
|
||||
|
||||
if($createstdsubdomain == '1')
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
|
||||
"`domain` = '". $db->escape($loginname . '.' . $settings['system']['hostname']) . "', " .
|
||||
if (isset($settings['system']['stdsubdomain'])
|
||||
&& $settings['system']['stdsubdomain'] != ''
|
||||
) {
|
||||
$_stdsubdomain = $loginname . '.' . $settings['system']['stdsubdomain'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$_stdsubdomain = $loginname . '.' . $settings['system']['hostname'];
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET " .
|
||||
"`domain` = '". $db->escape($_stdsubdomain) . "', " .
|
||||
"`customerid` = '" . (int)$customerid . "', " .
|
||||
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
|
||||
"`adminid` = '" . (int)$userinfo['adminid'] . "', " .
|
||||
"`parentdomainid` = '-1', " .
|
||||
"`ipandport` = '" . $db->escape($settings['system']['defaultip']) . "', " .
|
||||
"`documentroot` = '" . $db->escape($documentroot) . "', " .
|
||||
"`ipandport` = '" . $db->escape($settings['system']['defaultip']) . "', " .
|
||||
"`documentroot` = '" . $db->escape($documentroot) . "', " .
|
||||
"`zonefile` = '', " .
|
||||
"`isemaildomain` = '0', " .
|
||||
"`caneditdomain` = '0', " .
|
||||
"`caneditdomain` = '0', " .
|
||||
"`openbasedir` = '1', " .
|
||||
"`safemode` = '1', " .
|
||||
"`speciallogfile` = '0', " .
|
||||
"`specialsettings` = ''");
|
||||
"`specialsettings` = '', " .
|
||||
"`add_date` = '".date('Y-m-d')."'");
|
||||
$domainid = $db->insert_id();
|
||||
$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 . "'");
|
||||
@@ -608,7 +863,6 @@ if($page == 'customers'
|
||||
$replace_arr = array(
|
||||
'FIRSTNAME' => $firstname,
|
||||
'NAME' => $name,
|
||||
'TITLE' => $title,
|
||||
'COMPANY' => $company,
|
||||
'SALUTATION' => getCorrectUserSalutation(array('firstname' => $firstname, 'name' => $name, 'company' => $company)),
|
||||
'USERNAME' => $loginname,
|
||||
@@ -655,7 +909,7 @@ if($page == 'customers'
|
||||
|
||||
while(list($language_file, $language_name) = each($languages))
|
||||
{
|
||||
$language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true);
|
||||
$language_options.= makeoption($language_name, $language_file, $settings['panel']['standardlanguage'], true);
|
||||
}
|
||||
|
||||
$diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true);
|
||||
@@ -665,15 +919,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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -699,8 +968,9 @@ if($page == 'customers'
|
||||
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
||||
$customernumber = validate($_POST['customernumber'], 'customer number', '/^[A-Za-z0-9 \-]*$/Di');
|
||||
$def_language = validate($_POST['def_language'], 'default language');
|
||||
$password = validate($_POST['customer_password'], 'new password');
|
||||
$password = validate($_POST['new_customer_password'], 'new password');
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
$gender = intval_ressource($_POST['gender']);
|
||||
|
||||
if(isset($_POST['diskspace_ul']))
|
||||
{
|
||||
@@ -756,9 +1026,31 @@ if($page == 'customers'
|
||||
$email_quota = - 1;
|
||||
}
|
||||
|
||||
$email_imap = intval_ressource($_POST['email_imap']);
|
||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
if($settings['autoresponder']['autoresponder_active'] == '1')
|
||||
{
|
||||
$email_autoresponder = intval_ressource($_POST['email_autoresponder']);
|
||||
|
||||
if(isset($_POST['email_autoresponder_ul']))
|
||||
{
|
||||
$email_autoresponder = - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$email_autoresponder = 0;
|
||||
}
|
||||
|
||||
$email_imap = 0;
|
||||
if(isset($_POST['email_imap']))
|
||||
$email_imap = intval_ressource($_POST['email_imap']);
|
||||
|
||||
$email_pop3 = 0;
|
||||
if(isset($_POST['email_pop3']))
|
||||
$email_pop3 = intval_ressource($_POST['email_pop3']);
|
||||
|
||||
$ftps = 0;
|
||||
if(isset($_POST['ftps']))
|
||||
$ftps = intval_ressource($_POST['ftps']);
|
||||
|
||||
if(isset($_POST['ftps_ul']))
|
||||
{
|
||||
@@ -773,7 +1065,22 @@ if($page == 'customers'
|
||||
$tickets = - 1;
|
||||
}
|
||||
|
||||
$mysqls = intval_ressource($_POST['mysqls']);
|
||||
$backup_allowed = 0;
|
||||
if (isset($_POST['backup_allowed']))
|
||||
$backup_allowed = intval($_POST['backup_allowed']);
|
||||
|
||||
if($backup_allowed != '0'){
|
||||
$backup_allowed = 1;
|
||||
}
|
||||
|
||||
// gender out of range? [0,2]
|
||||
if ($gender < 0 || $gender > 2) {
|
||||
$gender = 0;
|
||||
}
|
||||
|
||||
$mysqls = 0;
|
||||
if(isset($_POST['mysqls']))
|
||||
$mysqls = intval_ressource($_POST['mysqls']);
|
||||
|
||||
if(isset($_POST['mysqls_ul']))
|
||||
{
|
||||
@@ -781,7 +1088,7 @@ if($page == 'customers'
|
||||
}
|
||||
|
||||
if($settings['aps']['aps_active'] == '1')
|
||||
{
|
||||
{
|
||||
$number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']);
|
||||
|
||||
if(isset($_POST['number_of_aps_packages_ul']))
|
||||
@@ -794,9 +1101,21 @@ if($page == 'customers'
|
||||
$number_of_aps_packages = 0;
|
||||
}
|
||||
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
$deactivated = intval($_POST['deactivated']);
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
$createstdsubdomain = 0;
|
||||
if(isset($_POST['createstdsubdomain']))
|
||||
$createstdsubdomain = intval($_POST['createstdsubdomain']);
|
||||
|
||||
$deactivated = 0;
|
||||
if(isset($_POST['deactivated']))
|
||||
$deactivated = intval($_POST['deactivated']);
|
||||
|
||||
$phpenabled = 0;
|
||||
if(isset($_POST['phpenabled']))
|
||||
$phpenabled = intval($_POST['phpenabled']);
|
||||
|
||||
$perlenabled = 0;
|
||||
if(isset($_POST['perlenabled']))
|
||||
$perlenabled = intval($_POST['perlenabled']);
|
||||
$diskspace = $diskspace * 1024;
|
||||
$traffic = $traffic * 1024 * 1024;
|
||||
|
||||
@@ -806,6 +1125,7 @@ if($page == 'customers'
|
||||
|| ((($userinfo['email_accounts_used'] + $email_accounts - $result['email_accounts']) > $userinfo['email_accounts']) && $userinfo['email_accounts'] != '-1')
|
||||
|| ((($userinfo['email_forwarders_used'] + $email_forwarders - $result['email_forwarders']) > $userinfo['email_forwarders']) && $userinfo['email_forwarders'] != '-1')
|
||||
|| ((($userinfo['email_quota_used'] + $email_quota - $result['email_quota']) > $userinfo['email_quota']) && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||
|| ((($userinfo['email_autoresponder_used'] + $email_autoresponder - $result['email_autoresponder']) > $userinfo['email_autoresponder']) && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
||||
|| ((($userinfo['ftps_used'] + $ftps - $result['ftps']) > $userinfo['ftps']) && $userinfo['ftps'] != '-1')
|
||||
|| ((($userinfo['tickets_used'] + $tickets - $result['tickets']) > $userinfo['tickets']) && $userinfo['tickets'] != '-1')
|
||||
|| ((($userinfo['subdomains_used'] + $subdomains - $result['subdomains']) > $userinfo['subdomains']) && $userinfo['subdomains'] != '-1')
|
||||
@@ -816,6 +1136,7 @@ if($page == 'customers'
|
||||
|| ($email_accounts == '-1' && $userinfo['email_accounts'] != '-1')
|
||||
|| ($email_forwarders == '-1' && $userinfo['email_forwarders'] != '-1')
|
||||
|| ($email_quota == '-1' && $userinfo['email_quota'] != '-1' && $settings['system']['mail_quota_enabled'] == '1')
|
||||
|| ($email_autoresponder == '-1' && $userinfo['email_autoresponder'] != '-1' && $settings['autoresponder']['autoresponder_active'] == '1')
|
||||
|| ($ftps == '-1' && $userinfo['ftps'] != '-1')
|
||||
|| ($tickets == '-1' && $userinfo['tickets'] != '-1')
|
||||
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
|
||||
@@ -849,6 +1170,7 @@ if($page == 'customers'
|
||||
{
|
||||
if($password != '')
|
||||
{
|
||||
$password = validatePassword($password);
|
||||
$password = md5($password);
|
||||
}
|
||||
else
|
||||
@@ -864,7 +1186,17 @@ if($page == 'customers'
|
||||
if($createstdsubdomain == '1'
|
||||
&& $result['standardsubdomain'] == '0')
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `parentdomainid`, `ipandport`, `documentroot`, `zonefile`, `isemaildomain`, `caneditdomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($result['loginname'] . '.' . $settings['system']['hostname']) . "', '" . (int)$result['customerid'] . "', '" . (int)$userinfo['adminid'] . "', '-1', '" . $db->escape($settings['system']['defaultip']) . "', '" . $db->escape($result['documentroot']) . "', '', '0', '0', '1', '1', '0', '')");
|
||||
if (isset($settings['system']['stdsubdomain'])
|
||||
&& $settings['system']['stdsubdomain'] != ''
|
||||
) {
|
||||
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['stdsubdomain'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$_stdsubdomain = $result['loginname'] . '.' . $settings['system']['hostname'];
|
||||
}
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`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'] . "'");
|
||||
@@ -890,7 +1222,13 @@ if($page == 'customers'
|
||||
$phpenabled = '1';
|
||||
}
|
||||
|
||||
if($phpenabled != $result['phpenabled'])
|
||||
if($perlenabled != '0')
|
||||
{
|
||||
$perlenabled = '1';
|
||||
}
|
||||
|
||||
if($phpenabled != $result['phpenabled']
|
||||
|| $perlenabled != $result['perlenabled'])
|
||||
{
|
||||
inserttask('1');
|
||||
}
|
||||
@@ -900,6 +1238,45 @@ 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'], '');
|
||||
$last_dbserver = 0;
|
||||
|
||||
/* For each of them */
|
||||
while($row_database = $db->fetch_array($databases))
|
||||
{
|
||||
if($last_dbserver != $row_database['dbserver'])
|
||||
{
|
||||
$db_root->query('FLUSH PRIVILEGES;');
|
||||
$db_root->close();
|
||||
$db_root = new db($sql_root[$row_database['dbserver']]['host'], $sql_root[$row_database['dbserver']]['user'], $sql_root[$row_database['dbserver']]['password'], '');
|
||||
$last_dbserver = $row_database['dbserver'];
|
||||
}
|
||||
|
||||
foreach(array_unique(explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||
{
|
||||
$mysql_access_host = trim($mysql_access_host);
|
||||
|
||||
/* Prevent access, if deactivated */
|
||||
if($deactivated)
|
||||
{
|
||||
$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');
|
||||
}
|
||||
@@ -918,9 +1295,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')
|
||||
{
|
||||
@@ -1001,6 +1385,22 @@ if($page == 'customers'
|
||||
}
|
||||
}
|
||||
|
||||
if($email_autoresponder != '-1'
|
||||
|| $result['email_autoresponder'] != '-1')
|
||||
{
|
||||
$admin_update_query.= ", `email_autoresponder_used` = `email_autoresponder_used` ";
|
||||
|
||||
if($email_autoresponder != '-1')
|
||||
{
|
||||
$admin_update_query.= " + 0" . (int)$email_autoresponder . " ";
|
||||
}
|
||||
|
||||
if($result['email_autoresponder'] != '-1')
|
||||
{
|
||||
$admin_update_query.= " - 0" . (int)$result['email_autoresponder'] . " ";
|
||||
}
|
||||
}
|
||||
|
||||
if($subdomains != '-1'
|
||||
|| $result['subdomains'] != '-1')
|
||||
{
|
||||
@@ -1153,6 +1553,13 @@ if($page == 'customers'
|
||||
$result['email_quota'] = '';
|
||||
}
|
||||
|
||||
$email_autoresponder_ul = makecheckbox('email_autoresponder_ul', $lng['customer']['unlimited'], '-1', false, $result['email_autoresponder'], true, true);
|
||||
|
||||
if($result['email_autoresponder'] == '-1')
|
||||
{
|
||||
$result['email_autoresponder'] = '';
|
||||
}
|
||||
|
||||
$ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true);
|
||||
|
||||
if($result['ftps'] == '-1')
|
||||
@@ -1181,13 +1588,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');
|
||||
@@ -130,6 +130,8 @@ if($page == 'domains'
|
||||
$i++;
|
||||
}
|
||||
|
||||
$domainscount = $db->num_rows($result);
|
||||
|
||||
// Display the list
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domains") . "\";");
|
||||
@@ -142,12 +144,28 @@ 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')
|
||||
{
|
||||
$query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"';
|
||||
/*
|
||||
* check for APS packages used with this domain, #110
|
||||
*/
|
||||
if(domainHasApsInstances($id))
|
||||
{
|
||||
standard_error('domains_cantdeletedomainwithapsinstances');
|
||||
}
|
||||
|
||||
// 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();
|
||||
|
||||
@@ -167,20 +185,34 @@ 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');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,11 +232,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'] . "' ") . " ");
|
||||
|
||||
@@ -232,7 +278,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')
|
||||
{
|
||||
@@ -298,7 +345,7 @@ if($page == 'domains'
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpsettingid = '1';
|
||||
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
|
||||
$mod_fcgid_starter = '-1';
|
||||
$mod_fcgid_maxrequests = '-1';
|
||||
}
|
||||
@@ -307,7 +354,7 @@ if($page == 'domains'
|
||||
{
|
||||
$openbasedir = '1';
|
||||
$safemode = '1';
|
||||
$phpsettingid = '1';
|
||||
$phpsettingid = $settings['system']['mod_fcgid_defaultini'];
|
||||
$mod_fcgid_starter = '-1';
|
||||
$mod_fcgid_maxrequests = '-1';
|
||||
}
|
||||
@@ -334,12 +381,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);
|
||||
|
||||
@@ -359,7 +409,14 @@ if($page == 'domains'
|
||||
|
||||
if(!preg_match('/^https?\:\/\//', $documentroot))
|
||||
{
|
||||
$documentroot = makeCorrectDir($documentroot);
|
||||
if(strstr($documentroot, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
else
|
||||
{
|
||||
$documentroot = makeCorrectDir($documentroot);
|
||||
}
|
||||
}
|
||||
|
||||
$domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'");
|
||||
@@ -369,7 +426,8 @@ if($page == 'domains'
|
||||
|
||||
if($aliasdomain != 0)
|
||||
{
|
||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||
// also check ip/port combination to be the same, #176
|
||||
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
||||
}
|
||||
|
||||
if($openbasedir != '1')
|
||||
@@ -428,11 +486,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'));
|
||||
}
|
||||
@@ -481,13 +545,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)
|
||||
@@ -497,18 +563,24 @@ 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 . "'");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
@@ -555,7 +627,7 @@ if($page == 'domains'
|
||||
$row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']';
|
||||
}
|
||||
|
||||
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id']);
|
||||
$ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id'], $settings['system']['defaultip']);
|
||||
}
|
||||
|
||||
$ssl_ipsandports = '';
|
||||
@@ -595,28 +667,42 @@ 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 . "`");
|
||||
|
||||
while($row = $db->fetch_array($configs))
|
||||
{
|
||||
$phpconfigs.= makeoption($row['description'], $row['id'], '1', true, true);
|
||||
$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -624,10 +710,10 @@ if($page == 'domains'
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `d`.*, `c`.`customerid` FROM `" . TABLE_PANEL_DOMAINS . "` `d`
|
||||
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
|
||||
WHERE `d`.`parentdomainid`='0'
|
||||
AND `d`.`id`='" . (int)$id . "'"
|
||||
$result = $db->query_first("SELECT `d`.*, `c`.`customerid` FROM `" . TABLE_PANEL_DOMAINS . "` `d`
|
||||
LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`)
|
||||
WHERE `d`.`parentdomainid`='0'
|
||||
AND `d`.`id`='" . (int)$id . "'"
|
||||
. ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' "));
|
||||
|
||||
if($result['domain'] != '')
|
||||
@@ -705,12 +791,28 @@ 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']);
|
||||
|
||||
$speciallogfile = 0;
|
||||
if(isset($_POST['speciallogfile']))
|
||||
$speciallogfile = intval($_POST['speciallogfile']);
|
||||
|
||||
|
||||
if($userinfo['change_serversettings'] == '1')
|
||||
{
|
||||
@@ -733,6 +835,12 @@ if($page == 'domains'
|
||||
{
|
||||
$documentroot = $customer['documentroot'];
|
||||
}
|
||||
|
||||
if(!preg_match('/^https?\:\/\//', $documentroot)
|
||||
&& strstr($documentroot, ":") !== FALSE
|
||||
) {
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -802,12 +910,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);
|
||||
|
||||
@@ -882,7 +993,8 @@ if($page == 'domains'
|
||||
|
||||
if($aliasdomain != 0)
|
||||
{
|
||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||
// also check ip/port combination to be the same, #176
|
||||
$aliasdomain_check = $db->query_first('SELECT `d`.`id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$ipandport.'\'');
|
||||
}
|
||||
|
||||
if($aliasdomain_check['id'] != $aliasdomain)
|
||||
@@ -890,6 +1002,11 @@ if($page == 'domains'
|
||||
standard_error('domainisaliasorothercustomer');
|
||||
}
|
||||
|
||||
if($issubof <= '0')
|
||||
{
|
||||
$issubof = '0';
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'id' => $id,
|
||||
'page' => $page,
|
||||
@@ -916,11 +1033,13 @@ 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,
|
||||
'speciallogfile' => $speciallogfile
|
||||
);
|
||||
|
||||
$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)
|
||||
@@ -950,11 +1069,16 @@ 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']
|
||||
|| ($speciallogfile != $result['speciallogfile'] && $_POST['speciallogverified'] == '1'))
|
||||
{
|
||||
inserttask('1');
|
||||
}
|
||||
|
||||
if($speciallogfile != $result['speciallogfile'] && $_POST['speciallogverified'] != '1') $speciallogfile = $result['speciallogfile'];
|
||||
|
||||
if($isbinddomain != $result['isbinddomain']
|
||||
|| $zonefile != $result['zonefile']
|
||||
|| $dkim != $result['dkim']
|
||||
@@ -1004,15 +1128,15 @@ if($page == 'domains'
|
||||
if($ssfs == 1)
|
||||
{
|
||||
$upd_specialsettings = ", `specialsettings`='" . $db->escape($specialsettings) . "' ";
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
$upd_specialsettings = '';
|
||||
$db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `specialsettings`='' WHERE `parentdomainid`='" . (int)$id . "'");
|
||||
$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) . "', `speciallogfile`='" . $db->escape($speciallogfile) . "', `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(
|
||||
@@ -1068,6 +1192,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");
|
||||
@@ -1105,20 +1237,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']);
|
||||
|
||||
@@ -1130,9 +1262,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`,
|
||||
@@ -100,13 +101,13 @@ if($page == 'overview')
|
||||
&& count($latestversion) >= 1)
|
||||
{
|
||||
$_version = $latestversion[0];
|
||||
$_message = $latestversion[1];
|
||||
$_message = isset($latestversion[1]) ? $latestversion[1] : '';
|
||||
$_link = isset($latestversion[2]) ? $latestversion[2] : htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes');
|
||||
|
||||
$lookfornewversion_lable = $_version;
|
||||
$lookfornewversion_link = $_link;
|
||||
$lookfornewversion_addinfo = $_message;
|
||||
|
||||
|
||||
if (version_compare($version, $_version) == -1) {
|
||||
$isnewerversion = 1;
|
||||
} else {
|
||||
@@ -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');
|
||||
@@ -104,7 +104,12 @@ if($page == 'ipsandports'
|
||||
$db->query("DELETE FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$id . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_WARNING, "deleted IP/port '" . $result['ip'] . ":" . $result['port'] . "'");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
@@ -141,11 +146,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 +203,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 +225,23 @@ if($page == 'ipsandports'
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "` (`ip`, `port`, `listen_statement`, `namevirtualhost_statement`, `vhostcontainer`, `vhostcontainer_servername_statement`, `specialsettings`, `ssl`, `ssl_cert_file`, `ssl_key_file`, `ssl_ca_file`, `default_vhostconf_domain`) VALUES ('" . $db->escape($ip) . "', '" . (int)$port . "', '" . (int)$listen_statement . "', '" . (int)$namevirtualhost_statement . "', '" . (int)$vhostcontainer . "', '" . (int)$vhostcontainer_servername_statement . "', '" . $db->escape($specialsettings) . "', '" . (int)$ssl . "', '" . $db->escape($ssl_cert_file) . "', '" . $db->escape($ssl_key_file) . "', '" . $db->escape($ssl_ca_file) . "', '" . $db->escape($default_vhostconf_domain) . "')");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_IPSANDPORTS . "`
|
||||
SET
|
||||
`ip` = '" . $db->escape($ip) . "',
|
||||
`port` = '" . (int)$port . "',
|
||||
`listen_statement` = '" . (int)$listen_statement . "',
|
||||
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
|
||||
`vhostcontainer` = '" . (int)$vhostcontainer . "',
|
||||
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
|
||||
`specialsettings` = '" . $db->escape($specialsettings) . "',
|
||||
`ssl` = '" . (int)$ssl . "',
|
||||
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
|
||||
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
|
||||
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
|
||||
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
|
||||
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
|
||||
`docroot` = '" . $db->escape($docroot) . "';
|
||||
");
|
||||
|
||||
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
||||
{
|
||||
@@ -204,17 +250,29 @@ if($page == 'ipsandports'
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_WARNING, "added IP/port '" . $ip . ":" . $port . "'");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$enable_ssl = makeyesno('ssl', '1', '0', '0');
|
||||
$listen_statement = makeyesno('listen_statement', '1', '0', '1');
|
||||
$namevirtualhost_statement = makeyesno('namevirtualhost_statement', '1', '0', '1');
|
||||
$vhostcontainer = makeyesno('vhostcontainer', '1', '0', '1');
|
||||
$vhostcontainer_servername_statement = makeyesno('vhostcontainer_servername_statement', '1', '0', '1');
|
||||
#$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 +295,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 +352,20 @@ if($page == 'ipsandports'
|
||||
$ssl_ca_file = makeCorrectFile($ssl_ca_file);
|
||||
}
|
||||
|
||||
if($ssl_cert_chainfile != '')
|
||||
{
|
||||
$ssl_cert_chainfile = makeCorrectFile($ssl_cert_chainfile);
|
||||
}
|
||||
|
||||
if(strlen(trim($docroot)) > 0)
|
||||
{
|
||||
$docroot = makeCorrectDir($docroot);
|
||||
}
|
||||
else
|
||||
{
|
||||
$docroot = '';
|
||||
}
|
||||
|
||||
if($result['ip'] != $ip
|
||||
&& $result['ip'] == $settings['system']['ipaddress']
|
||||
&& $result_sameipotherport['id'] == '')
|
||||
@@ -296,21 +379,52 @@ if($page == 'ipsandports'
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "` SET `ip`='" . $db->escape($ip) . "', `port`='" . (int)$port . "', `listen_statement`='" . (int)$listen_statement . "', `namevirtualhost_statement`='" . (int)$namevirtualhost_statement . "', `vhostcontainer`='" . (int)$vhostcontainer . "', `vhostcontainer_servername_statement`='" . (int)$vhostcontainer_servername_statement . "', `specialsettings`='" . $db->escape($specialsettings) . "', `ssl`='" . (int)$ssl . "', `ssl_cert_file`='" . $db->escape($ssl_cert_file) . "', `ssl_key_file`='" . $db->escape($ssl_key_file) . "', `ssl_ca_file`='" . $db->escape($ssl_ca_file) . "', `default_vhostconf_domain`='" . $db->escape($default_vhostconf_domain) . "' WHERE `id`='" . (int)$id . "'");
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_IPSANDPORTS . "`
|
||||
SET
|
||||
`ip` = '" . $db->escape($ip) . "',
|
||||
`port` = '" . (int)$port . "',
|
||||
`listen_statement` = '" . (int)$listen_statement . "',
|
||||
`namevirtualhost_statement` = '" . (int)$namevirtualhost_statement . "',
|
||||
`vhostcontainer` = '" . (int)$vhostcontainer . "',
|
||||
`vhostcontainer_servername_statement` = '" . (int)$vhostcontainer_servername_statement . "',
|
||||
`specialsettings` = '" . $db->escape($specialsettings) . "',
|
||||
`ssl` = '" . (int)$ssl . "',
|
||||
`ssl_cert_file` = '" . $db->escape($ssl_cert_file) . "',
|
||||
`ssl_key_file` = '" . $db->escape($ssl_key_file) . "',
|
||||
`ssl_ca_file` = '" . $db->escape($ssl_ca_file) . "',
|
||||
`ssl_cert_chainfile` = '" . $db->escape($ssl_cert_chainfile) . "',
|
||||
`default_vhostconf_domain` = '" . $db->escape($default_vhostconf_domain) . "',
|
||||
`docroot` = '" . $db->escape($docroot) . "'
|
||||
WHERE `id`='" . (int)$id . "'
|
||||
");
|
||||
|
||||
$log->logAction(ADM_ACTION, LOG_WARNING, "changed IP/port from '" . $result['ip'] . ":" . $result['port'] . "' to '" . $ip . ":" . $port . "'");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
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") . "\";");
|
||||
}
|
||||
|
||||
@@ -97,12 +99,19 @@ if($page == 'overview')
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "'");
|
||||
inserttask('1');
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $value . "' has been created by '" . $userinfo['loginname'] . "'");
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been created by '" . $userinfo['loginname'] . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1");
|
||||
|
||||
$phpconfig_add_data = include_once dirname(__FILE__).'/lib/formfields/admin/phpconfig/formfield.phpconfig_add.php';
|
||||
$phpconfig_add_form = htmlform::genHTMLForm($phpconfig_add_data);
|
||||
|
||||
$title = $phpconfig_add_data['phpconfig_add']['title'];
|
||||
$image = $phpconfig_add_data['phpconfig_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -172,6 +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');
|
||||
@@ -31,20 +31,93 @@ if(($page == 'settings' || $page == 'overview')
|
||||
&& $userinfo['change_serversettings'] == '1')
|
||||
{
|
||||
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
|
||||
$settings = loadSettings(&$settings_data, &$db);
|
||||
|
||||
$settings = loadSettings($settings_data, $db);
|
||||
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
if(processForm(&$settings_data, &$_POST, array('filename' => $filename, 'action' => $action, 'page' => $page)))
|
||||
$_part = isset($_GET['part']) ? $_GET['part'] : '';
|
||||
|
||||
if($_part == '')
|
||||
{
|
||||
$_part = isset($_POST['part']) ? $_POST['part'] : '';
|
||||
}
|
||||
|
||||
if($_part != '')
|
||||
{
|
||||
if($_part == 'all')
|
||||
{
|
||||
$settings_all = true;
|
||||
$settings_part = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings_all = false;
|
||||
$settings_part = true;
|
||||
}
|
||||
|
||||
$only_enabledisable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$settings_all = false;
|
||||
$settings_part = false;
|
||||
$only_enabledisable = true;
|
||||
}
|
||||
|
||||
// check if the session timeout is too low #815
|
||||
if (isset($_POST['session_sessiontimeout']) && $_POST['session_sessiontimeout'] <= 60) {
|
||||
standard_error($lng['error']['session_timeout'], $lng['error']['session_timeout_desc']);
|
||||
}
|
||||
|
||||
if(processFormEx(
|
||||
$settings_data,
|
||||
$_POST,
|
||||
array('filename' => $filename, 'action' => $action, 'page' => $page),
|
||||
$_part,
|
||||
$settings_all,
|
||||
$settings_part,
|
||||
$only_enabledisable
|
||||
)
|
||||
) {
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting");
|
||||
inserttask('1');
|
||||
inserttask('5');
|
||||
inserttask('9');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
standard_success('settingssaved', '', array('filename' => $filename, 'action' => $action, 'page' => $page));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$fields = buildForm(&$settings_data);
|
||||
eval("echo \"" . getTemplate("settings/settings") . "\";");
|
||||
$_part = isset($_GET['part']) ? $_GET['part'] : '';
|
||||
|
||||
if($_part == '')
|
||||
{
|
||||
$_part = isset($_POST['part']) ? $_POST['part'] : '';
|
||||
}
|
||||
|
||||
$fields = buildFormEx($settings_data, $_part);
|
||||
|
||||
$settings_page = '';
|
||||
if($_part == '')
|
||||
{
|
||||
eval("\$settings_page .= \"" . getTemplate("settings/settings_overview") . "\";");
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("\$settings_page .= \"" . getTemplate("settings/settings") . "\";");
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("settings/settings_form_begin") . "\";");
|
||||
eval("echo \$settings_page;");
|
||||
eval("echo \"" . getTemplate("settings/settings_form_end") . "\";");
|
||||
|
||||
}
|
||||
}
|
||||
elseif($page == 'rebuildconfigs'
|
||||
@@ -55,9 +128,16 @@ elseif($page == 'rebuildconfigs'
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
inserttask('5');
|
||||
redirectTo('admin_index.php', array('s' => $s));
|
||||
inserttask('9');
|
||||
inserttask('10');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
standard_success('rebuildingconfigs', '', array('filename' => 'admin_index.php'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -157,5 +237,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');
|
||||
@@ -32,6 +32,19 @@ if(isset($_POST['id']))
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
$id = intval($_GET['id']);
|
||||
|
||||
if (!$userinfo['customers_see_all']) {
|
||||
/*
|
||||
* Check if the current user is allowed to see the current ticket.
|
||||
*/
|
||||
$sql = "SELECT `id` FROM `panel_tickets` WHERE `id` = '".$id."' AND `adminid` = '".$userinfo['admindid']."'";
|
||||
|
||||
$result = $db->query_first($sql);
|
||||
if ($result == null) {
|
||||
// no rights to see the requested ticket
|
||||
standard_error(array('ticketnotaccessible'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($page == 'tickets'
|
||||
@@ -41,7 +54,7 @@ if($page == 'tickets'
|
||||
|
||||
$countcustomers = $db->query_first("SELECT COUNT(`customerid`) as `countcustomers` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . "");
|
||||
$countcustomers = (int)$countcustomers['countcustomers'];
|
||||
|
||||
|
||||
if($action == '')
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets");
|
||||
@@ -56,7 +69,7 @@ if($page == 'tickets'
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$paging->sortfield = 'lastchange';
|
||||
$paging->sortorder = 'desc';
|
||||
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `adminid` = "' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query('SELECT `main`.`id`, `main`.`customerid`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" ' . ($userinfo['customers_see_all'] ? '' : ' AND `adminid` = "' . (int)$userinfo['adminid'] . '"') . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -102,15 +115,16 @@ if($page == 'tickets'
|
||||
if($_cid != $row['customerid'])
|
||||
{
|
||||
$cid = $row['customerid'];
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"');
|
||||
|
||||
|
||||
if(isset($usr['loginname'])) {
|
||||
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
|
||||
//$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||
} else {
|
||||
$customer = $lng['ticket']['nonexistingcustomer'];
|
||||
}
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
|
||||
}
|
||||
|
||||
$tickets_count++;
|
||||
@@ -139,12 +153,13 @@ if($page == 'tickets'
|
||||
$cananswer = 1;
|
||||
}
|
||||
|
||||
$row['subject'] = html_entity_decode($row['subject']);
|
||||
if(strlen($row['subject']) > 20)
|
||||
{
|
||||
$row['subject'] = substr($row['subject'], 0, 17) . '...';
|
||||
}
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";");
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/tickets_tickets") . "\";");
|
||||
$count++;
|
||||
$_cid = $row['customerid'];
|
||||
}
|
||||
@@ -153,7 +168,7 @@ if($page == 'tickets'
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
|
||||
}
|
||||
elseif($action == 'new')
|
||||
{
|
||||
@@ -167,8 +182,8 @@ if($page == 'tickets'
|
||||
$newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
|
||||
$newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
|
||||
$newticket->Set('category', validate($_POST['category'], 'category'), true, false);
|
||||
$newticket->Set('customer', validate($_POST['customer'], 'customer'), true, false);
|
||||
$newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
|
||||
$newticket->Set('customer', (int)$_POST['customer'], true, false);
|
||||
$newticket->Set('message', validate(htmlentities(str_replace("\r\n", "\n", $_POST['message'])), 'message', '/^[^\0]*$/'), true, false);
|
||||
|
||||
if($newticket->Get('subject') == null)
|
||||
{
|
||||
@@ -197,12 +212,12 @@ if($page == 'tickets'
|
||||
else
|
||||
{
|
||||
$categories = '';
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `name` ASC');
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
|
||||
|
||||
if(isset($result['name'])
|
||||
&& $result['name'] != '')
|
||||
{
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `name` ASC');
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `adminid` = "' . $userinfo['adminid'] . '" ORDER BY `logicalorder`, `name` ASC');
|
||||
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
@@ -219,28 +234,20 @@ if($page == 'tickets'
|
||||
|
||||
while($row_customer = $db->fetch_array($result_customers))
|
||||
{
|
||||
if($row_customer['company'] == '')
|
||||
{
|
||||
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($row_customer['name'] != ''
|
||||
&& $row_customer['firstname'] != '')
|
||||
{
|
||||
$customers.= makeoption($row_customer['name'] . ', ' . $row_customer['firstname'] . ' | ' . $row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$customers.= makeoption($row_customer['company'] . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
}
|
||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1');
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
|
||||
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
|
||||
|
||||
$ticket_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_new.php';
|
||||
$ticket_new_form = htmlform::genHTMLForm($ticket_new_data);
|
||||
|
||||
$title = $ticket_new_data['ticket_new']['title'];
|
||||
$image = $ticket_new_data['ticket_new']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_new") . "\";");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -257,7 +264,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)
|
||||
{
|
||||
@@ -319,7 +326,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);
|
||||
@@ -341,7 +348,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);
|
||||
@@ -351,8 +358,13 @@ if($page == 'tickets'
|
||||
$ticket_replies_count = $db->num_rows($andere) + 1;
|
||||
|
||||
// don't forget the main-ticket!
|
||||
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.ticket_reply.php';
|
||||
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
|
||||
$title = $ticket_reply_data['ticket_reply']['title'];
|
||||
$image = $ticket_reply_data['ticket_reply']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_reply") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'close'
|
||||
@@ -435,10 +447,11 @@ elseif($page == 'categories'
|
||||
{
|
||||
$log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_tickets::categories");
|
||||
$fields = array(
|
||||
'name' => $lng['ticket']['category']
|
||||
'name' => $lng['ticket']['category'],
|
||||
'logicalorder' => $lng['ticket']['logicalorder']
|
||||
);
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKET_CATS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$result = $db->query("SELECT `main`.`id`, `main`.`name`, (
|
||||
$result = $db->query("SELECT `main`.`id`, `main`.`name`, `main`.`logicalorder`, (
|
||||
SELECT COUNT(`sub`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub`
|
||||
WHERE `sub`.`category` = `main`.`id`
|
||||
AND `sub`.`answerto` = '0' AND `sub`.`adminid` = '" . $userinfo['adminid'] . "')
|
||||
@@ -466,14 +479,14 @@ elseif($page == 'categories'
|
||||
{
|
||||
$row = htmlentities_array($row);
|
||||
$closedtickets_count = ($row['ticketcount'] - $row['ticketcountnotclosed']);
|
||||
eval("\$ticketcategories.=\"" . getTemplate("ticket/tickets_categories") . "\";");
|
||||
eval("\$ticketcategories.=\"" . getTemplate("tickets/tickets_categories") . "\";");
|
||||
$count++;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/categories") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/categories") . "\";");
|
||||
}
|
||||
elseif($action == 'addcategory')
|
||||
{
|
||||
@@ -481,6 +494,13 @@ elseif($page == 'categories'
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$category = validate($_POST['category'], 'category');
|
||||
$order = validate($_POST['logicalorder'], 'logicalorder');
|
||||
|
||||
if($order < 1 || $order >= 1000)
|
||||
{
|
||||
// use the latest available
|
||||
$order = ticket::getHighestOrderNumber($db) + 1;
|
||||
}
|
||||
|
||||
if($category == '')
|
||||
{
|
||||
@@ -488,14 +508,22 @@ elseif($page == 'categories'
|
||||
}
|
||||
else
|
||||
{
|
||||
ticket::addCategory($db, $category, $userinfo['adminid']);
|
||||
ticket::addCategory($db, $category, $userinfo['adminid'], $order);
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "added ticket-category '" . $category . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("echo \"" . getTemplate("ticket/tickets_newcategory") . "\";");
|
||||
$order = ticket::getHighestOrderNumber($db) + 1;
|
||||
|
||||
$category_new_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_new.php';
|
||||
$category_new_form = htmlform::genHTMLForm($category_new_data);
|
||||
|
||||
$title = $category_new_data['category_new']['title'];
|
||||
$image = $category_new_data['category_new']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_newcategory") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'editcategory'
|
||||
@@ -505,6 +533,12 @@ elseif($page == 'categories'
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$category = validate($_POST['category'], 'category');
|
||||
$order = validate($_POST['logicalorder'], 'logicalorder');
|
||||
|
||||
if($order < 1 || $order >= 1000)
|
||||
{
|
||||
$order = 1;
|
||||
}
|
||||
|
||||
if($category == '')
|
||||
{
|
||||
@@ -512,7 +546,7 @@ elseif($page == 'categories'
|
||||
}
|
||||
else
|
||||
{
|
||||
ticket::editCategory($db, $category, $id);
|
||||
ticket::editCategory($db, $category, $id, $order);
|
||||
$log->logAction(ADM_ACTION, LOG_INFO, "edited ticket-category '" . $category . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
@@ -520,7 +554,14 @@ elseif($page == 'categories'
|
||||
else
|
||||
{
|
||||
$row = $db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$id . '"');
|
||||
eval("echo \"" . getTemplate("ticket/tickets_editcategory") . "\";");
|
||||
|
||||
$category_edit_data = include_once dirname(__FILE__).'/lib/formfields/admin/tickets/formfield.category_edit.php';
|
||||
$category_edit_form = htmlform::genHTMLForm($category_edit_data);
|
||||
|
||||
$title = $category_edit_data['category_edit']['title'];
|
||||
$image = $category_edit_data['category_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_editcategory") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'deletecategory'
|
||||
@@ -569,8 +610,7 @@ elseif($page == 'archive'
|
||||
{
|
||||
$categories[$x] = isset($_POST['category' . $x]) ? $_POST['category' . $x] : '';
|
||||
}
|
||||
|
||||
$query = ticket::getArchiveSearchStatement($subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
|
||||
$query = ticket::getArchiveSearchStatement($db, $subject, $priority, $fromdate, $todate, $message, $customer, $userinfo['adminid'], $categories);
|
||||
$fields = array(
|
||||
'lastchange' => $lng['ticket']['lastchange'],
|
||||
'ticket_answers' => $lng['ticket']['ticket_answers'],
|
||||
@@ -628,24 +668,34 @@ elseif($page == 'archive'
|
||||
{
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
$ticket = htmlentities_array($ticket);
|
||||
$ticket['lastchange'] = date("d.m.y H:i", $ticket['lastchange']);
|
||||
|
||||
if($_cid != $ticket['customerid'])
|
||||
{
|
||||
$cid = $ticket['customerid'];
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
$usr = $db->query_first('SELECT `firstname`, `name`, `company`, `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
WHERE `customerid` = "' . (int)$cid . '"');
|
||||
|
||||
|
||||
if(isset($usr['loginname'])) {
|
||||
$customer = $usr['firstname'] . " " . $usr['name'] . " (" . $usr['loginname'] . ")";
|
||||
$customer = getCorrectFullUserDetails($usr) . ' (' . $usr['loginname'] . ')';
|
||||
} else {
|
||||
$customer = $lng['ticket']['nonexistingcustomer'];
|
||||
}
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_customer") . "\";");
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/tickets_customer") . "\";");
|
||||
}
|
||||
|
||||
$tickets_count++;
|
||||
switch ($ticket['priority'])
|
||||
{
|
||||
case 1: $ticket['display'] = 'high';
|
||||
break;
|
||||
case 2: $ticket['display'] = 'normal';
|
||||
break;
|
||||
case 3: $ticket['display'] = 'low';
|
||||
break;
|
||||
default: $ticket['display'] = 'unknown';
|
||||
}
|
||||
$ticket['priority'] = ticket::getPriorityText($lng, $ticket['priority']);
|
||||
|
||||
if($ticket['lastreplier'] == '1')
|
||||
@@ -661,8 +711,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 +721,7 @@ elseif($page == 'archive'
|
||||
$i++;
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/archivesearch") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/archivesearch") . "\";");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -700,13 +750,13 @@ elseif($page == 'archive'
|
||||
$ticket['subject'] = substr($ticket['subject'], 0, 17) . '...';
|
||||
}
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/archived_tickets") . "\";");
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/archived_tickets") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
$priorities_options = makecheckbox('priority1', $lng['ticket']['unf_high'], '1');
|
||||
$priorities_options.= makecheckbox('priority2', $lng['ticket']['unf_normal'], '2');
|
||||
$priorities_options.= makecheckbox('priority3', $lng['ticket']['unf_low'], '3');
|
||||
$priorities_options = makecheckbox('priority1', $lng['ticket']['high'], '1');
|
||||
$priorities_options.= makecheckbox('priority2', $lng['ticket']['normal'], '2');
|
||||
$priorities_options.= makecheckbox('priority3', $lng['ticket']['low'], '3');
|
||||
$category_options = '';
|
||||
$ccount = 0;
|
||||
$result = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||
@@ -718,21 +768,14 @@ elseif($page == 'archive'
|
||||
}
|
||||
|
||||
$customers = makeoption($lng['ticket']['nocustomer'], '-1', '-1');
|
||||
$result = $db->query_first('SELECT `customerid` FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . 'ORDER BY `name` ASC');
|
||||
$result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY `name` ASC");
|
||||
|
||||
if(isset($result['customerid'])
|
||||
&& $result['customerid'] != '')
|
||||
while($row_customer = $db->fetch_array($result_customers))
|
||||
{
|
||||
$result2 = $db->query('SELECT `customerid`, `loginname`, `firstname`, `name`
|
||||
FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . ($userinfo['customers_see_all'] ? '' : ' WHERE `adminid` = "' . (int)$userinfo['adminid'] . '" ') . ' ORDER BY `name` ASC');
|
||||
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
$customers.= makeoption($row['name'] . ', ' . $row['firstname'] . ' (' . $row['loginname'] . ')', $row['customerid']);
|
||||
}
|
||||
$customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/archive") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/archive") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'view'
|
||||
@@ -755,9 +798,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);
|
||||
@@ -777,20 +820,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');
|
||||
@@ -57,30 +57,54 @@ if($page == 'overview')
|
||||
|
||||
if(hasUpdates($version))
|
||||
{
|
||||
$successful_update = false;
|
||||
$message = '';
|
||||
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
|
||||
eval("echo \"" . getTemplate("update/update_start") . "\";");
|
||||
|
||||
include_once('./install/updatesql.php');
|
||||
|
||||
$redirect_url = 'admin_index.php';
|
||||
eval("echo \"" . getTemplate("update/update_end") . "\";");
|
||||
|
||||
updateCounters();
|
||||
inserttask('1');
|
||||
@chmod('./lib/userdata.inc.php', 0440);
|
||||
if((isset($_POST['update_preconfig'])
|
||||
&& isset($_POST['update_changesagreed'])
|
||||
&& intval($_POST['update_changesagreed']) != 0)
|
||||
|| !isset($_POST['update_preconfig'])
|
||||
) {
|
||||
eval("echo \"" . getTemplate("update/update_start") . "\";");
|
||||
|
||||
include_once './install/updatesql.php';
|
||||
|
||||
$redirect_url = 'admin_index.php?s=' . $s;
|
||||
eval("echo \"" . getTemplate("update/update_end") . "\";");
|
||||
|
||||
updateCounters();
|
||||
inserttask('1');
|
||||
@chmod('./lib/userdata.inc.php', 0440);
|
||||
|
||||
$successful_update = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = '<br /><strong style="color:#ff0000;">You have to agree that you have read the update notifications.</strong>';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if(!$successful_update)
|
||||
{
|
||||
$current_version = $settings['panel']['version'];
|
||||
$new_version = $version;
|
||||
|
||||
$ui_text = $lng['update']['update_information'];
|
||||
$ui_text = $lng['update']['update_information']['part_a'];
|
||||
$ui_text = str_replace('%curversion', $current_version, $ui_text);
|
||||
$ui_text = str_replace('%newversion', $new_version, $ui_text);
|
||||
$update_information = $ui_text;
|
||||
|
||||
include_once './install/updates/preconfig.php';
|
||||
$preconfig = getPreConfig($current_version);
|
||||
if($preconfig != '')
|
||||
{
|
||||
$update_information .= '<br />'.$preconfig.$message;
|
||||
}
|
||||
|
||||
$update_information .= $lng['update']['update_information']['part_b'];
|
||||
|
||||
eval("echo \"" . getTemplate("update/index") . "\";");
|
||||
}
|
||||
@@ -92,7 +116,7 @@ if($page == 'overview')
|
||||
*/
|
||||
|
||||
$success_message = $lng['update']['noupdatesavail'];
|
||||
$redirect_url = 'admin_index.php';
|
||||
$redirect_url = 'admin_index.php?s=' . $s;
|
||||
eval("echo \"" . getTemplate("update/noupdatesavail") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
1
cache/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*
|
||||
0
cache/.keep
vendored
Normal file
226
css/jquery.jqplot.css
Normal file
@@ -0,0 +1,226 @@
|
||||
/*rules for the plot target div. These will be cascaded down to all plot elements according to css rules*/
|
||||
.jqplot-target {
|
||||
position: relative;
|
||||
color: #666666;
|
||||
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
/* height: 300px;
|
||||
width: 400px;*/
|
||||
}
|
||||
|
||||
/*rules applied to all axes*/
|
||||
.jqplot-axis {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
.jqplot-xaxis {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.jqplot-x2axis {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.jqplot-yaxis {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.jqplot-y2axis, .jqplot-y3axis, .jqplot-y4axis, .jqplot-y5axis, .jqplot-y6axis, .jqplot-y7axis, .jqplot-y8axis, .jqplot-y9axis {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/*rules applied to all axis tick divs*/
|
||||
.jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick, .jqplot-x2axis-tick, .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
.jqplot-xaxis-tick {
|
||||
top: 0px;
|
||||
/* initial position untill tick is drawn in proper place */
|
||||
left: 15px;
|
||||
/* padding-top: 10px;*/
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.jqplot-x2axis-tick {
|
||||
bottom: 0px;
|
||||
/* initial position untill tick is drawn in proper place */
|
||||
left: 15px;
|
||||
/* padding-bottom: 10px;*/
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.jqplot-yaxis-tick {
|
||||
right: 0px;
|
||||
/* initial position untill tick is drawn in proper place */
|
||||
top: 15px;
|
||||
/* padding-right: 10px;*/
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.jqplot-yaxis-tick.jqplot-breakTick {
|
||||
right: -20px;
|
||||
margin-right: 0px;
|
||||
padding:1px 5px 1px 5px;
|
||||
/* background-color: white;*/
|
||||
z-index: 2;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick {
|
||||
left: 0px;
|
||||
/* initial position untill tick is drawn in proper place */
|
||||
top: 15px;
|
||||
/* padding-left: 10px;*/
|
||||
/* padding-right: 15px;*/
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.jqplot-meterGauge-tick {
|
||||
font-size: 0.75em;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.jqplot-meterGauge-label {
|
||||
font-size: 1em;
|
||||
color: #999999;
|
||||
}
|
||||
.jqplot-xaxis-label {
|
||||
margin-top: 10px;
|
||||
font-size: 11pt;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.jqplot-x2axis-label {
|
||||
margin-bottom: 10px;
|
||||
font-size: 11pt;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.jqplot-yaxis-label {
|
||||
margin-right: 10px;
|
||||
/* text-align: center;*/
|
||||
font-size: 11pt;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.jqplot-y2axis-label, .jqplot-y3axis-label, .jqplot-y4axis-label, .jqplot-y5axis-label, .jqplot-y6axis-label, .jqplot-y7axis-label, .jqplot-y8axis-label, .jqplot-y9axis-label {
|
||||
/* text-align: center;*/
|
||||
font-size: 11pt;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
table.jqplot-table-legend {
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
margin-left: 12px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
table.jqplot-table-legend, table.jqplot-cursor-legend {
|
||||
background-color: rgba(255,255,255,0.6);
|
||||
border: 1px solid #cccccc;
|
||||
position: absolute;
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
td.jqplot-table-legend {
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
td.jqplot-seriesToggle:hover, td.jqplot-seriesToggle:active {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
td.jqplot-table-legend > div {
|
||||
border: 1px solid #cccccc;
|
||||
padding:1px;
|
||||
}
|
||||
|
||||
div.jqplot-table-legend-swatch {
|
||||
width:0px;
|
||||
height:0px;
|
||||
border-top-width: 5px;
|
||||
border-bottom-width: 5px;
|
||||
border-left-width: 6px;
|
||||
border-right-width: 6px;
|
||||
border-top-style: solid;
|
||||
border-bottom-style: solid;
|
||||
border-left-style: solid;
|
||||
border-right-style: solid;
|
||||
}
|
||||
|
||||
.jqplot-title {
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
padding-bottom: 0.5em;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
table.jqplot-cursor-tooltip {
|
||||
border: 1px solid #cccccc;
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
|
||||
.jqplot-cursor-tooltip {
|
||||
border: 1px solid #cccccc;
|
||||
font-size: 0.75em;
|
||||
white-space: nowrap;
|
||||
background: rgba(208,208,208,0.5);
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.jqplot-highlighter-tooltip {
|
||||
border: 1px solid #cccccc;
|
||||
font-size: 0.75em;
|
||||
white-space: nowrap;
|
||||
background: rgba(208,208,208,0.5);
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.jqplot-point-label {
|
||||
font-size: 0.75em;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
td.jqplot-cursor-legend-swatch {
|
||||
vertical-align:middle;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
div.jqplot-cursor-legend-swatch {
|
||||
width:1.2em;
|
||||
height:0.7em;
|
||||
}
|
||||
|
||||
.jqplot-error {
|
||||
/* Styles added to the plot target container when there is an error go here.*/
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.jqplot-error-message {
|
||||
/* Styling of the custom error message div goes here.*/
|
||||
position: relative;
|
||||
top: 46%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
div.jqplot-bubble-label {
|
||||
font-size: 0.8em;
|
||||
/* background: rgba(90%, 90%, 90%, 0.15);*/
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
color: rgb(20%, 20%, 20%);
|
||||
}
|
||||
|
||||
div.jqplot-bubble-label.jqplot-bubble-label-highlight {
|
||||
background: rgba(90%, 90%, 90%, 0.7);
|
||||
}
|
||||
|
||||
div.jqplot-noData-container {
|
||||
text-align: center;
|
||||
background-color: rgba(96%, 96%, 96%, 0.3);
|
||||
}
|
||||
1
css/jquery.jqplot.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.jqplot-target{position:relative;color:#666;font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;font-size:1em;}.jqplot-axis{font-size:.75em;}.jqplot-xaxis{margin-top:10px;}.jqplot-x2axis{margin-bottom:10px;}.jqplot-yaxis{margin-right:10px;}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis{margin-left:10px;margin-right:10px;}.jqplot-axis-tick,.jqplot-xaxis-tick,.jqplot-yaxis-tick,.jqplot-x2axis-tick,.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{position:absolute;}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top;}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom;}.jqplot-yaxis-tick{right:0;top:15px;text-align:right;}.jqplot-yaxis-tick.jqplot-breakTick{right:-20px;margin-right:0;padding:1px 5px 1px 5px;z-index:2;font-size:1.5em;}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left;}.jqplot-meterGauge-tick{font-size:.75em;color:#999;}.jqplot-meterGauge-label{font-size:1em;color:#999;}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute;}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute;}.jqplot-yaxis-label{margin-right:10px;font-size:11pt;position:absolute;}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;position:absolute;}table.jqplot-table-legend{margin-top:12px;margin-bottom:12px;margin-left:12px;margin-right:12px;}table.jqplot-table-legend,table.jqplot-cursor-legend{background-color:rgba(255,255,255,0.6);border:1px solid #ccc;position:absolute;font-size:.75em;}td.jqplot-table-legend{vertical-align:middle;}td.jqplot-seriesToggle:hover,td.jqplot-seriesToggle:active{cursor:pointer;}td.jqplot-table-legend>div{border:1px solid #ccc;padding:1px;}div.jqplot-table-legend-swatch{width:0;height:0;border-top-width:5px;border-bottom-width:5px;border-left-width:6px;border-right-width:6px;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid;}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em;}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;}.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px;}.jqplot-highlighter-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px;}.jqplot-point-label{font-size:.75em;z-index:2;}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center;}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em;}.jqplot-error{text-align:center;}.jqplot-error-message{position:relative;top:46%;display:inline-block;}div.jqplot-bubble-label{font-size:.8em;padding-left:2px;padding-right:2px;color:rgb(20%,20%,20%);}div.jqplot-bubble-label.jqplot-bubble-label-highlight{background:rgba(90%,90%,90%,0.7);}div.jqplot-noData-container{text-align:center;background-color:rgba(96%,96%,96%,0.3);}
|
||||
563
css/jquery.jquery-ui.css
Normal file
@@ -0,0 +1,563 @@
|
||||
/*
|
||||
* jQuery UI CSS Framework 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
||||
.ui-helper-clearfix:after { clear: both; }
|
||||
.ui-helper-clearfix { zoom: 1; }
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
/*
|
||||
* jQuery UI Accordion 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion#theming
|
||||
*/
|
||||
/* IE/Win - Fix animation bug - #4615 */
|
||||
.ui-accordion { width: 100%; }
|
||||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
||||
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }
|
||||
/*
|
||||
* jQuery UI Autocomplete 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||
*/
|
||||
.ui-autocomplete { position: absolute; cursor: default; }
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/*
|
||||
* jQuery UI Menu 1.8.17
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
float: left;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: -1px;
|
||||
}
|
||||
/*
|
||||
* jQuery UI Button 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button#theming
|
||||
*/
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
/*
|
||||
* jQuery UI Datepicker 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}/*
|
||||
* jQuery UI Dialog 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Dialog#theming
|
||||
*/
|
||||
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
/*
|
||||
* jQuery UI Progressbar 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Progressbar#theming
|
||||
*/
|
||||
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/*
|
||||
* jQuery UI Resizable 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
|
||||
* jQuery UI Selectable 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Selectable#theming
|
||||
*/
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
/*
|
||||
* jQuery UI Slider 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider#theming
|
||||
*/
|
||||
.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
|
||||
* jQuery UI Tabs 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs#theming
|
||||
*/
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
||||
/*
|
||||
* jQuery UI CSS Framework 1.8.17
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
|
||||
.ui-widget-content a { color: #222222/*{fcContent}*/; }
|
||||
.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
|
||||
.ui-widget-header a { color: #222222/*{fcHeader}*/; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
|
||||
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
|
||||
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
|
||||
.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
|
||||
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
|
||||
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
|
||||
.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }
|
||||
@@ -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
|
||||
@@ -32,13 +32,13 @@ if($action == "add")
|
||||
$account = trim($_POST['account']);
|
||||
$subject = trim($_POST['subject']);
|
||||
$message = trim($_POST['message']);
|
||||
|
||||
|
||||
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
|
||||
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
|
||||
|
||||
|
||||
/*
|
||||
* @TODO validate date (DD-MM-YYYY)
|
||||
*/
|
||||
* @TODO validate date (DD-MM-YYYY)
|
||||
*/
|
||||
$ts_from = -1;
|
||||
$ts_until = -1;
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -105,11 +106,19 @@ if($action == "add")
|
||||
{
|
||||
$accounts.= "<option value=\"" . $row['email'] . "\">" . $row['email'] . "</option>";
|
||||
}
|
||||
|
||||
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||
$date_until_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||
|
||||
eval("echo \"" . getTemplate("email/autoresponder_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);
|
||||
|
||||
#$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
|
||||
@@ -127,10 +136,10 @@ if($action == "edit")
|
||||
|
||||
$date_from_off = isset($_POST['date_from_off']) ? -1 : 0;
|
||||
$date_until_off = isset($_POST['date_until_off']) ? -1 : 0;
|
||||
|
||||
|
||||
/*
|
||||
* @TODO validate date (DD-MM-YYYY)
|
||||
*/
|
||||
* @TODO validate date (DD-MM-YYYY)
|
||||
*/
|
||||
$ts_from = -1;
|
||||
$ts_until = -1;
|
||||
|
||||
@@ -143,7 +152,7 @@ if($action == "edit")
|
||||
{
|
||||
$date_until = $_POST['date_until'];
|
||||
$ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4));
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($account)
|
||||
|| empty($subject)
|
||||
@@ -182,7 +191,7 @@ if($action == "edit")
|
||||
SET `message` = '" . $db->escape($message) . "',
|
||||
`enabled` = '" . (int)$ResponderActive . "',
|
||||
`date_from` = '" . (int)$ts_from . "',
|
||||
`date_until` = '" . (int)$ts_until . "',
|
||||
`date_until` = '" . (int)$ts_until . "',
|
||||
`subject` = '" . $db->escape($subject) . "'
|
||||
WHERE `email` = '" . $db->escape($account) . "'
|
||||
AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "'
|
||||
@@ -204,13 +213,14 @@ if($action == "edit")
|
||||
$row = $db->fetch_array($result);
|
||||
$subject = htmlspecialchars($row['subject']);
|
||||
$message = htmlspecialchars($row['message']);
|
||||
|
||||
|
||||
$date_from = (int)$row['date_from'];
|
||||
$date_until = (int)$row['date_until'];
|
||||
|
||||
|
||||
if($date_from == -1)
|
||||
{
|
||||
$deactivated = '-1';
|
||||
$date_from = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -218,27 +228,28 @@ if($action == "edit")
|
||||
$date_from = date('d-m-Y', $date_from);
|
||||
}
|
||||
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||
|
||||
|
||||
if($date_until == -1)
|
||||
{
|
||||
$deactivated = '-1';
|
||||
$date_until = '-1';
|
||||
$date_until = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$deactivated = '0';
|
||||
$date_until = date('d-m-Y', $date_until);
|
||||
}
|
||||
$date_from_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||
|
||||
$checked = '';
|
||||
#$isactive = makeyesno('active', '1', '0', $row['enabled']);
|
||||
|
||||
if($row['enabled'] == 1)
|
||||
{
|
||||
$checked = "checked=\"checked\"";
|
||||
}
|
||||
$autoresponder_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/autoresponder/formfield.autoresponder_edit.php';
|
||||
$autoresponder_edit_form = htmlform::genHTMLForm($autoresponder_edit_data);
|
||||
|
||||
eval("echo \"" . getTemplate("email/autoresponder_edit") . "\";");
|
||||
$title = $autoresponder_edit_data['autoresponder_edit']['title'];
|
||||
$image = $autoresponder_edit_data['autoresponder_edit']['image'];
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
@@ -274,9 +286,10 @@ if($action == "delete")
|
||||
|
||||
// List existing autoresponders
|
||||
|
||||
else
|
||||
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))
|
||||
@@ -292,15 +305,14 @@ else
|
||||
elseif($row['date_from'] != -1 && $row['date_until'] == -1)
|
||||
{
|
||||
$activated_date = $lng['autoresponder']['date_from'].': '.date('d-m-Y', $row['date_from']);
|
||||
}
|
||||
}
|
||||
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');
|
||||
@@ -68,13 +68,13 @@ elseif($page == 'domains')
|
||||
$row['domainalias'] = $idna_convert->decode($row['domainalias']);
|
||||
|
||||
if($row['parentdomainid'] == '0'
|
||||
&& $row['iswildcarddomain'] != '1'
|
||||
&& $row['caneditdomain'] == '1')
|
||||
{
|
||||
$parentdomains_count++;
|
||||
}
|
||||
|
||||
$domains_count++;
|
||||
/*
|
||||
$domainparts = explode('.', $row['domain']);
|
||||
$domainparts = array_reverse($domainparts);
|
||||
$sortkey = '';
|
||||
@@ -82,8 +82,9 @@ elseif($page == 'domains')
|
||||
{
|
||||
$sortkey.= $part . '.';
|
||||
}
|
||||
|
||||
$domain_array[$sortkey] = $row;
|
||||
*/
|
||||
$domain_array[$row['domain']] = $row;
|
||||
}
|
||||
|
||||
ksort($domain_array);
|
||||
@@ -125,6 +126,11 @@ elseif($page == 'domains')
|
||||
if($paging->checkDisplay($i))
|
||||
{
|
||||
$row = htmlentities_array($domain_array[$sortkey]);
|
||||
if($settings['system']['awstats_enabled'] == '1') {
|
||||
$statsapp = 'awstats';
|
||||
} else {
|
||||
$statsapp = 'webalizer';
|
||||
}
|
||||
eval("\$domains.=\"" . getTemplate("domains/domains_delimiter") . "\";");
|
||||
|
||||
if($paging->sortfield == 'd.domain'
|
||||
@@ -178,11 +184,24 @@ elseif($page == 'domains')
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* check for APS packages used with this domain, #110
|
||||
*/
|
||||
if(domainHasApsInstances($id))
|
||||
{
|
||||
standard_error('domains_cantdeletedomainwithapsinstances');
|
||||
}
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted subdomain '" . $idna_convert->decode($result['domain']) . "'");
|
||||
$result = $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`-1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
@@ -205,17 +224,19 @@ elseif($page == 'domains')
|
||||
{
|
||||
$subdomain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['subdomain'], 'subdomain', '', 'subdomainiswrong')));
|
||||
$domain = $idna_convert->encode($_POST['domain']);
|
||||
$domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' ");
|
||||
$domain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($domain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ");
|
||||
$completedomain = $subdomain . '.' . $domain;
|
||||
$completedomain_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain`='" . $db->escape($completedomain) . "' AND `customerid`='" . (int)$userinfo['customerid'] . "' AND `email_only`='0' AND `caneditdomain` = '1'");
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
$aliasdomain_check = array(
|
||||
'id' => 0
|
||||
);
|
||||
$_doredirect = false;
|
||||
|
||||
if($aliasdomain != 0)
|
||||
{
|
||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\'');
|
||||
// also check ip/port combination to be the same, #176
|
||||
$aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$userinfo['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\' AND `d`.`ipandport` = \''.(int)$domain_check['ipandport'].'\'');
|
||||
}
|
||||
|
||||
if(isset($_POST['url'])
|
||||
@@ -223,6 +244,7 @@ elseif($page == 'domains')
|
||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||
{
|
||||
$path = $_POST['url'];
|
||||
$_doredirect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -234,6 +256,14 @@ elseif($page == 'domains')
|
||||
{
|
||||
$path = $userinfo['documentroot'] . '/' . $path;
|
||||
$path = makeCorrectDir($path);
|
||||
if (strstr($path, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_doredirect = true;
|
||||
}
|
||||
|
||||
if(isset($_POST['openbasedir_path'])
|
||||
@@ -286,17 +316,53 @@ elseif($page == 'domains')
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`customerid`, `domain`, `documentroot`, `ipandport`, `aliasdomain`, `parentdomainid`, `isemaildomain`, `openbasedir`, `openbasedir_path`, `safemode`, `speciallogfile`, `specialsettings`, `ssl_redirect`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($completedomain) . "', '" . $db->escape($path) . "', '" . $db->escape($domain_check['ipandport']) . "', " . (($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") . ", '" . (int)$domain_check['id'] . "', '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "', '" . $db->escape($domain_check['openbasedir']) . "', '" . $db->escape($openbasedir_path) . "', '" . $db->escape($domain_check['safemode']) . "', '" . $db->escape($domain_check['speciallogfile']) . "', '" . $db->escape($domain_check['specialsettings']) . "', '" . $ssl_redirect . "')");
|
||||
// get the phpsettingid from parentdomain, #107
|
||||
$phpsid_result = $db->query_first("SELECT `phpsettingid` FROM `".TABLE_PANEL_DOMAINS."` WHERE `id` = '".(int)$domain_check['id']."'");
|
||||
if(!isset($phpsid_result['phpsettingid'])
|
||||
|| (int)$phpsid_result['phpsettingid'] <= 0
|
||||
) {
|
||||
// assign default config
|
||||
$phpsid_result['phpsettingid'] = 1;
|
||||
}
|
||||
|
||||
$result = $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` SET
|
||||
`customerid` = '" . (int)$userinfo['customerid'] . "',
|
||||
`domain` = '" . $db->escape($completedomain) . "',
|
||||
`documentroot` = '" . $db->escape($path) . "',
|
||||
`ipandport` = '" . $db->escape($domain_check['ipandport']) . "',
|
||||
`aliasdomain` = ".(($aliasdomain != 0) ? "'" . $db->escape($aliasdomain) . "'" : "NULL") .",
|
||||
`parentdomainid` = '" . (int)$domain_check['id'] . "',
|
||||
`isemaildomain` = '" . ($domain_check['subcanemaildomain'] == '3' ? '1' : '0') . "',
|
||||
`openbasedir` = '" . $db->escape($domain_check['openbasedir']) . "',
|
||||
`openbasedir_path` = '" . $db->escape($openbasedir_path) . "',
|
||||
`safemode` = '" . $db->escape($domain_check['safemode']) . "',
|
||||
`speciallogfile` = '" . $db->escape($domain_check['speciallogfile']) . "',
|
||||
`specialsettings` = '" . $db->escape($domain_check['specialsettings']) . "',
|
||||
`ssl_redirect` = '" . $ssl_redirect . "',
|
||||
`phpsettingid` = '" . $phpsid_result['phpsettingid'] . "'");
|
||||
|
||||
if($_doredirect)
|
||||
{
|
||||
$did = $db->insert_id();
|
||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : $settings['customredirect']['default'];
|
||||
addRedirectToDomain($did, $redirect);
|
||||
}
|
||||
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used`=`subdomains_used`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added subdomain '" . $completedomain . "'");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `iswildcarddomain`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC");
|
||||
$result = $db->query("SELECT `id`, `domain`, `documentroot`, `ssl_redirect`,`isemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `email_only`='0' AND `caneditdomain`='1' ORDER BY `domain` ASC");
|
||||
$domains = '';
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
@@ -312,9 +378,26 @@ elseif($page == 'domains')
|
||||
$aliasdomains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$redirectcode = '';
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $settings['customredirect']['default']);
|
||||
}
|
||||
}
|
||||
|
||||
#$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -322,9 +405,10 @@ elseif($page == 'domains')
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path` ,`pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||
$result = $db->query_first("SELECT `d`.`id`, `d`.`customerid`, `d`.`domain`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`iswildcarddomain`, `d`.`parentdomainid`, `d`.`ssl_redirect`, `d`.`aliasdomain`, `d`.`openbasedir_path`, `d`.`ipandport`, `pd`.`subcanemaildomain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_DOMAINS . "` `pd` WHERE `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `d`.`id`='" . (int)$id . "' AND ((`d`.`parentdomainid`!='0' AND `pd`.`id`=`d`.`parentdomainid`) OR (`d`.`parentdomainid`='0' AND `pd`.`id`=`d`.`id`)) AND `d`.`caneditdomain`='1'");
|
||||
$alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\'');
|
||||
$alias_check = $alias_check['count'];
|
||||
$_doredirect = false;
|
||||
|
||||
if(isset($result['customerid'])
|
||||
&& $result['customerid'] == $userinfo['customerid'])
|
||||
@@ -337,6 +421,7 @@ elseif($page == 'domains')
|
||||
&& validateUrl($idna_convert->encode($_POST['url'])))
|
||||
{
|
||||
$path = $_POST['url'];
|
||||
$_doredirect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -348,6 +433,14 @@ elseif($page == 'domains')
|
||||
{
|
||||
$path = $userinfo['documentroot'] . '/' . $path;
|
||||
$path = makeCorrectDir($path);
|
||||
if (strstr($path, ":") !== FALSE)
|
||||
{
|
||||
standard_error('pathmaynotcontaincolon');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_doredirect = true;
|
||||
}
|
||||
|
||||
$aliasdomain = intval($_POST['alias']);
|
||||
@@ -355,16 +448,7 @@ elseif($page == 'domains')
|
||||
if(isset($_POST['iswildcarddomain'])
|
||||
&& $_POST['iswildcarddomain'] == '1'
|
||||
&& $result['parentdomainid'] == '0'
|
||||
&& $userinfo['subdomains'] != '0')
|
||||
{
|
||||
$wildcarddomaincheck = $db->query("SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid` = '" . (int)$result['id'] . "'");
|
||||
|
||||
if($db->num_rows($wildcarddomaincheck) != '0')
|
||||
{
|
||||
standard_error('firstdeleteallsubdomains');
|
||||
exit;
|
||||
}
|
||||
|
||||
){
|
||||
$iswildcarddomain = '1';
|
||||
}
|
||||
else
|
||||
@@ -431,6 +515,12 @@ elseif($page == 'domains')
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "automatically deleted mail-table entries for '" . $idna_convert->decode($result['domain']) . "'");
|
||||
}
|
||||
|
||||
if($_doredirect)
|
||||
{
|
||||
$redirect = isset($_POST['redirectcode']) ? (int)$_POST['redirectcode'] : false;
|
||||
updateRedirectOfDomain($id, $redirect);
|
||||
}
|
||||
|
||||
if($path != $result['documentroot']
|
||||
|| $isemaildomain != $result['isemaildomain']
|
||||
|| $iswildcarddomain != $result['iswildcarddomain']
|
||||
@@ -441,7 +531,12 @@ elseif($page == 'domains')
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited domain '" . $idna_convert->decode($result['domain']) . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot`='" . $db->escape($path) . "', `isemaildomain`='" . (int)$isemaildomain . "', `iswildcarddomain`='" . (int)$iswildcarddomain . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ",`openbasedir_path`='" . $db->escape($openbasedir_path) . "', `ssl_redirect`='" . $ssl_redirect . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
inserttask('1');
|
||||
inserttask('4');
|
||||
|
||||
# Using nameserver, insert a task which rebuilds the server config
|
||||
if ($settings['system']['bind_enable'])
|
||||
{
|
||||
inserttask('4');
|
||||
}
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
@@ -451,7 +546,8 @@ elseif($page == 'domains')
|
||||
{
|
||||
$result['domain'] = $idna_convert->decode($result['domain']);
|
||||
$domains = makeoption($lng['domains']['noaliasdomain'], 0, $result['aliasdomain'], true);
|
||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC");
|
||||
// also check ip/port combination to be the same, #176
|
||||
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$userinfo['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` AND `d`.`ipandport` = '".(int)$result['ipandport']."' ORDER BY `d`.`domain` ASC");
|
||||
|
||||
while($row_domain = $db->fetch_array($result_domains))
|
||||
{
|
||||
@@ -460,10 +556,17 @@ elseif($page == 'domains')
|
||||
|
||||
if(preg_match('/^https?\:\/\//', $result['documentroot'])
|
||||
&& validateUrl($idna_convert->encode($result['documentroot']))
|
||||
&& $settings['panel']['pathedit'] == 'Dropdown')
|
||||
{
|
||||
$urlvalue = $result['documentroot'];
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
) {
|
||||
if($settings['panel']['pathedit'] == 'Dropdown')
|
||||
{
|
||||
$urlvalue = $result['documentroot'];
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$urlvalue = '';
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot'], true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -471,15 +574,35 @@ elseif($page == 'domains')
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $result['documentroot']);
|
||||
}
|
||||
|
||||
$ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']);
|
||||
$iswildcarddomain = makeyesno('iswildcarddomain', '1', '0', $result['iswildcarddomain']);
|
||||
$isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']);
|
||||
$redirectcode = '';
|
||||
if($settings['customredirect']['enabled'] == '1')
|
||||
{
|
||||
$def_code = getDomainRedirectId($id);
|
||||
$codes = getRedirectCodesArray();
|
||||
foreach($codes as $rc)
|
||||
{
|
||||
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $def_code);
|
||||
}
|
||||
}
|
||||
|
||||
#$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']."'");
|
||||
if(filter_var($result_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
||||
{
|
||||
$result_ipandport['ip'] = '[' . $result_ipandport['ip'] . ']';
|
||||
}
|
||||
$domainip = $result_ipandport['ip'];
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
if($settings['system']['use_ssl'] == "1")
|
||||
{
|
||||
}
|
||||
$subdomain_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_edit.php';
|
||||
$subdomain_edit_form = htmlform::genHTMLForm($subdomain_edit_data);
|
||||
|
||||
$title = $subdomain_edit_data['domain_edit']['title'];
|
||||
$image = $subdomain_edit_data['domain_edit']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
@@ -139,8 +139,10 @@ elseif($page == 'emails')
|
||||
}
|
||||
}
|
||||
|
||||
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . $userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
||||
$emaildomains_count = $db->query_first("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `isemaildomain`='1' ORDER BY `domain` ASC");
|
||||
$emaildomains_count = $emaildomains_count['count'];
|
||||
|
||||
$emailscount = $db->num_rows($result);
|
||||
eval("echo \"" . getTemplate("email/emails") . "\";");
|
||||
}
|
||||
elseif($action == 'delete'
|
||||
@@ -182,6 +184,12 @@ elseif($page == 'emails')
|
||||
$number_forwarders = 0;
|
||||
}
|
||||
|
||||
if(isset($_POST['delete_userfiles'])
|
||||
&& (int)$_POST['delete_userfiles'] == 1)
|
||||
{
|
||||
inserttask('7', $userinfo['loginname'], $result['email_full']);
|
||||
}
|
||||
|
||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `emails_used`=`emails_used` - 1 , `email_forwarders_used` = `email_forwarders_used` - " . (int)$number_forwarders . " $update_users_query_addon WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted email address '" . $result['email'] . "'");
|
||||
@@ -189,7 +197,12 @@ elseif($page == 'emails')
|
||||
}
|
||||
else
|
||||
{
|
||||
ask_yesno('email_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
||||
if(maildirExists($result)) {
|
||||
$show_checkbox = true;
|
||||
} else {
|
||||
$show_checkbox = false;
|
||||
}
|
||||
ask_yesno_withcheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']), $show_checkbox);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -268,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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -308,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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -372,6 +399,7 @@ elseif($page == 'accounts')
|
||||
$email_full = $result['email_full'];
|
||||
$username = $idna_convert->decode($email_full);
|
||||
$password = validate($_POST['email_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
if($settings['panel']['sendalternativemail'] == 1)
|
||||
{
|
||||
@@ -446,7 +474,7 @@ elseif($page == 'accounts')
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $email);
|
||||
standard_error('errorsendingmail', $email_full);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
@@ -491,6 +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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -518,17 +553,24 @@ elseif($page == 'accounts')
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed email password for '" . $result['email_full'] . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'");
|
||||
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||
}
|
||||
|
||||
$password = validatePassword($password);
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "changed email password for '" . $result['email_full'] . "'");
|
||||
$result = $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET " . ($settings['system']['mailpwcleartext'] == '1' ? "`password` = '" . $db->escape($password) . "', " : '') . " `password_enc`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$result['popaccountid'] . "'");
|
||||
redirectTo($filename, Array('page' => 'emails', 'action' => 'edit', 'id' => $id, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
$result['email_full'] = $idna_convert->decode($result['email_full']);
|
||||
$result = htmlentities_array($result);
|
||||
|
||||
$account_changepw_data = include_once dirname(__FILE__).'/lib/formfields/customer/email/formfield.emails_accountchangepasswd.php';
|
||||
$account_changepw_form = htmlform::genHTMLForm($account_changepw_data);
|
||||
|
||||
$title = $account_changepw_data['emails_accountchangepasswd']['title'];
|
||||
$image = $account_changepw_data['emails_accountchangepasswd']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("email/account_changepw") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -570,6 +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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -599,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']));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -658,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") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
219
customer_ftp.php
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -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,12 +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_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'";
|
||||
@@ -112,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
|
||||
@@ -135,6 +142,13 @@ elseif($page == 'accounts')
|
||||
{
|
||||
$path = validate($_POST['path'], 'path');
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
$sendinfomail = intval($_POST['sendinfomail']);
|
||||
if($sendinfomail != 1)
|
||||
{
|
||||
$sendinfomail = 0;
|
||||
}
|
||||
|
||||
if($settings['customer']['ftpatdomain'] == '1')
|
||||
{
|
||||
@@ -172,26 +186,172 @@ elseif($page == 'accounts')
|
||||
}
|
||||
else
|
||||
{
|
||||
$userpath = makeCorrectDir($path);
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
|
||||
$db->query("INSERT INTO `" . TABLE_FTP_USERS . "` (`customerid`, `username`, `password`, `homedir`, `login_enabled`, `uid`, `gid`) VALUES ('" . (int)$userinfo['customerid'] . "', '" . $db->escape($username) . "', ENCRYPT('" . $db->escape($password) . "'), '" . $db->escape($path) . "', 'y', '" . (int)$userinfo['guid'] . "', '" . (int)$userinfo['guid'] . "')");
|
||||
$result = $db->query("SELECT `bytes_in_used` FROM `" . TABLE_FTP_QUOTATALLIES . "` WHERE `name` = '" . $userinfo['loginname'] . "'");
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$db->query("INSERT INTO `" . TABLE_FTP_QUOTATALLIES . "` (`name`, `quota_type`, `bytes_in_used`, `bytes_out_used`, `bytes_xfer_used`, `files_in_used`, `files_out_used`, `files_xfer_used`) VALUES ('" . $db->escape($username) . "', 'user', '" . $db->escape($row['bytes_in_used']) . "', '0', '0', '0', '0', '0')");
|
||||
}
|
||||
$db->query("UPDATE `" . TABLE_FTP_GROUPS . "` SET `members`=CONCAT_WS(',',`members`,'" . $db->escape($username) . "') WHERE `customerid`='" . $userinfo['customerid'] . "' AND `gid`='" . (int)$userinfo['guid'] . "'");
|
||||
|
||||
// $db->query("INSERT INTO `".TABLE_FTP_GROUPS."` (`customerid`, `groupname`, `gid`, `members`) VALUES ('".$userinfo['customerid']."', '$username', '$uid', '$username')");
|
||||
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `ftps_used`=`ftps_used`+1, `ftp_lastaccountnumber`=`ftp_lastaccountnumber`+1 WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||
|
||||
// $db->query("UPDATE `".TABLE_PANEL_SETTINGS."` SET `value`='$uid' WHERE settinggroup='ftp' AND varname='lastguid'");
|
||||
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "added ftp-account '" . $username . " (" . $path . ")'");
|
||||
inserttask(5);
|
||||
|
||||
if($sendinfomail == 1)
|
||||
{
|
||||
$replace_arr = array(
|
||||
'CUST_NAME' => getCorrectUserSalutation($userinfo),
|
||||
'USR_NAME' => $username,
|
||||
'USR_PASS' => $password,
|
||||
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
|
||||
);
|
||||
|
||||
$def_language = $userinfo['def_language'];
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_subject\'');
|
||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_subject']), $replace_arr));
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_ftpaccount_by_customer_mailbody\'');
|
||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['ftp_add']['infomail_body']['main']), $replace_arr));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $userinfo['email']);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
|
||||
$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))
|
||||
{
|
||||
$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');
|
||||
|
||||
$ftp_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_add.php';
|
||||
$ftp_add_form = htmlform::genHTMLForm($ftp_add_data);
|
||||
|
||||
$title = $ftp_add_data['ftp_add']['title'];
|
||||
$image = $ftp_add_data['ftp_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `id`, `username`, `homedir`, `uid`, `gid` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
|
||||
if(isset($result['username'])
|
||||
&& $result['username'] != '')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$path = validate($_POST['path'], 'path');
|
||||
|
||||
$_setnewpass = false;
|
||||
if(isset($_POST['ftp_password']) && $_POST['ftp_password'] != '')
|
||||
{
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
$_setnewpass = true;
|
||||
}
|
||||
|
||||
if($_setnewpass)
|
||||
{
|
||||
if($password == '')
|
||||
{
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$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'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($path != '')
|
||||
{
|
||||
$path = makeCorrectDir($userinfo['documentroot'] . '/' . $path);
|
||||
|
||||
if($path != $result['homedir'])
|
||||
{
|
||||
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'] . "'");
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `homedir`= '" . $db->escape($path) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
}
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(strpos($result['homedir'], $userinfo['documentroot']) === 0)
|
||||
{
|
||||
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
|
||||
}
|
||||
else
|
||||
{
|
||||
$homedir = $result['homedir'];
|
||||
}
|
||||
$homedir = makeCorrectDir($homedir);
|
||||
|
||||
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit'], $homedir);
|
||||
|
||||
if($settings['customer']['ftpatdomain'] == '1')
|
||||
{
|
||||
@@ -205,41 +365,16 @@ elseif($page == 'accounts')
|
||||
}
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("ftp/accounts_add") . "\";");
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif($action == 'edit'
|
||||
&& $id != 0)
|
||||
{
|
||||
$result = $db->query_first("SELECT `id`, `username`, `homedir` FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$ftp_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/ftp/formfield.ftp_edit.php';
|
||||
$ftp_edit_form = htmlform::genHTMLForm($ftp_edit_data);
|
||||
|
||||
if(isset($result['username'])
|
||||
&& $result['username'] != '')
|
||||
{
|
||||
if(isset($_POST['send'])
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$password = validate($_POST['ftp_password'], 'password');
|
||||
$title = $ftp_edit_data['ftp_edit']['title'];
|
||||
$image = $ftp_edit_data['ftp_edit']['image'];
|
||||
|
||||
if($password == '')
|
||||
{
|
||||
standard_error(array('stringisempty', 'mypassword'));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "edited ftp-account '" . $result['username'] . "'");
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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'] . '"
|
||||
@@ -97,8 +97,8 @@ elseif($page == 'change_password')
|
||||
exit;
|
||||
}
|
||||
|
||||
$new_password = validate($_POST['new_password'], 'new password');
|
||||
$new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm');
|
||||
$new_password = validatePassword($_POST['new_password'], 'new password');
|
||||
$new_password_confirm = validatePassword($_POST['new_password_confirm'], 'new password confirm');
|
||||
|
||||
if($old_password == '')
|
||||
{
|
||||
@@ -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,23 @@ 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'], '');
|
||||
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 +86,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'] != '')
|
||||
@@ -96,7 +102,6 @@ elseif($page == 'mysqls')
|
||||
// Begin root-session
|
||||
|
||||
$db_root = new db($sql_root[$result['dbserver']]['host'], $sql_root[$result['dbserver']]['user'], $sql_root[$result['dbserver']]['password'], '');
|
||||
unset($db_root->password);
|
||||
foreach(array_map('trim', array_unique(explode(',', $settings['system']['mysql_access_host']))) as $mysql_access_host)
|
||||
{
|
||||
$db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '`');
|
||||
@@ -126,7 +131,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,6 +148,13 @@ elseif($page == 'mysqls')
|
||||
&& $_POST['send'] == 'send')
|
||||
{
|
||||
$password = validate($_POST['mysql_password'], 'password');
|
||||
$password = validatePassword($password);
|
||||
|
||||
$sendinfomail = intval($_POST['sendinfomail']);
|
||||
if($sendinfomail != 1)
|
||||
{
|
||||
$sendinfomail = 0;
|
||||
}
|
||||
|
||||
if($password == '')
|
||||
{
|
||||
@@ -165,7 +181,6 @@ elseif($page == 'mysqls')
|
||||
// Begin root-session
|
||||
|
||||
$db_root = new db($sql_root[$dbserver]['host'], $sql_root[$dbserver]['user'], $sql_root[$dbserver]['password'], '');
|
||||
unset($db_root->password);
|
||||
$db_root->query('CREATE DATABASE `' . $db_root->escape($username) . '`');
|
||||
$log->logAction(USR_ACTION, LOG_INFO, "created database '" . $username . "'");
|
||||
foreach(array_map('trim', explode(',', $settings['system']['mysql_access_host'])) as $mysql_access_host)
|
||||
@@ -184,6 +199,53 @@ elseif($page == 'mysqls')
|
||||
$databasedescription = validate($_POST['description'], 'description');
|
||||
$result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`) VALUES ("' . (int)$userinfo['customerid'] . '", "' . $db->escape($username) . '", "' . $db->escape($databasedescription) . '", "' . $db->escape($dbserver) . '")');
|
||||
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1, `mysql_lastaccountnumber`=`mysql_lastaccountnumber`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"');
|
||||
|
||||
if($sendinfomail == 1)
|
||||
{
|
||||
$pma = $lng['admin']['notgiven'];
|
||||
if($settings['panel']['phpmyadmin_url'] != '')
|
||||
{
|
||||
$pma = $settings['panel']['phpmyadmin_url'];
|
||||
}
|
||||
|
||||
$replace_arr = array(
|
||||
'CUST_NAME' => getCorrectUserSalutation($userinfo),
|
||||
'DB_NAME' => $username,
|
||||
'DB_PASS' => $password,
|
||||
'DB_DESC' => $databasedescription,
|
||||
'DB_SRV' => $sql_root[$dbserver]['host'],
|
||||
'PMA_URI' => $pma
|
||||
);
|
||||
|
||||
$def_language = $userinfo['def_language'];
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_subject\'');
|
||||
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_subject']), $replace_arr));
|
||||
$result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($def_language) . '\' AND `templategroup`=\'mails\' AND `varname`=\'new_database_by_customer_mailbody\'');
|
||||
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $lng['customer']['mysql_add']['infomail_body']['main']), $replace_arr));
|
||||
|
||||
$_mailerror = false;
|
||||
try {
|
||||
$mail->Subject = $mail_subject;
|
||||
$mail->AltBody = $mail_body;
|
||||
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
|
||||
$mail->AddAddress($userinfo['email'], getCorrectUserSalutation($userinfo));
|
||||
$mail->Send();
|
||||
} catch(phpmailerException $e) {
|
||||
$mailerr_msg = $e->errorMessage();
|
||||
$_mailerror = true;
|
||||
} catch (Exception $e) {
|
||||
$mailerr_msg = $e->getMessage();
|
||||
$_mailerror = true;
|
||||
}
|
||||
|
||||
if ($_mailerror) {
|
||||
$log->logAction(USR_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
|
||||
standard_error('errorsendingmail', $userinfo['email']);
|
||||
}
|
||||
|
||||
$mail->ClearAddresses();
|
||||
}
|
||||
|
||||
redirectTo($filename, Array('page' => $page, 's' => $s));
|
||||
}
|
||||
}
|
||||
@@ -196,6 +258,14 @@ elseif($page == 'mysqls')
|
||||
$mysql_servers .= makeoption($mysql_server_details['caption'], $mysql_server);
|
||||
}
|
||||
|
||||
#$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") . "\";");
|
||||
}
|
||||
}
|
||||
@@ -217,15 +287,15 @@ 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');
|
||||
|
||||
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)
|
||||
{
|
||||
$db_root->query('SET PASSWORD FOR `' . $db_root->escape($result['databasename']) . '`@`' . $db_root->escape($mysql_access_host) . '` = PASSWORD(\'' . $db_root->escape($password) . '\')');
|
||||
@@ -246,10 +316,16 @@ 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');
|
||||
@@ -28,6 +28,17 @@ require ("./lib/init.php");
|
||||
if(isset($_POST['id']))
|
||||
{
|
||||
$id = intval($_POST['id']);
|
||||
|
||||
/*
|
||||
* Check if the current user is allowed to see the current ticket.
|
||||
*/
|
||||
$sql = "SELECT `id` FROM `panel_tickets` WHERE `id` = '".$id."' AND `customerid` = '".$userinfo['customerid']."'";
|
||||
|
||||
$result = $db->query_first($sql);
|
||||
if ($result == null) {
|
||||
// no rights to see the requested ticket
|
||||
standard_error(array('ticketnotaccessible'));
|
||||
}
|
||||
}
|
||||
elseif(isset($_GET['id']))
|
||||
{
|
||||
@@ -37,7 +48,7 @@ elseif(isset($_GET['id']))
|
||||
if($page == 'overview')
|
||||
{
|
||||
$log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets");
|
||||
eval("echo \"" . getTemplate("ticket/ticket") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/ticket") . "\";");
|
||||
}
|
||||
elseif($page == 'tickets')
|
||||
{
|
||||
@@ -55,7 +66,7 @@ elseif($page == 'tickets')
|
||||
$paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
|
||||
$paging->sortfield = 'lastchange';
|
||||
$paging->sortorder = 'desc';
|
||||
$result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int)$userinfo['customerid'] . '" AND `adminid`="' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int)$userinfo['customerid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
|
||||
$paging->setEntries($db->num_rows($result));
|
||||
$sortcode = $paging->getHtmlSortCode($lng);
|
||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||
@@ -98,12 +109,13 @@ elseif($page == 'tickets')
|
||||
$cananswer = 0;
|
||||
}
|
||||
|
||||
$row['subject'] = html_entity_decode($row['subject']);
|
||||
if(strlen($row['subject']) > 20)
|
||||
{
|
||||
$row['subject'] = substr($row['subject'], 0, 17) . '...';
|
||||
}
|
||||
|
||||
eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";");
|
||||
eval("\$tickets.=\"" . getTemplate("tickets/tickets_tickets") . "\";");
|
||||
$count++;
|
||||
}
|
||||
|
||||
@@ -156,7 +168,7 @@ elseif($page == 'tickets')
|
||||
}
|
||||
|
||||
$ticketsopen = (int)$opentickets['count'];
|
||||
eval("echo \"" . getTemplate("ticket/tickets") . "\";");
|
||||
eval("echo \"" . getTemplate("tickets/tickets") . "\";");
|
||||
}
|
||||
elseif($action == 'new')
|
||||
{
|
||||
@@ -209,12 +221,12 @@ elseif($page == 'tickets')
|
||||
else
|
||||
{
|
||||
$categories = '';
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||
$result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
|
||||
|
||||
if(isset($result['name'])
|
||||
&& $result['name'] != '')
|
||||
{
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC');
|
||||
$result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `logicalorder`, `name` ASC');
|
||||
|
||||
while($row = $db->fetch_array($result2))
|
||||
{
|
||||
@@ -226,9 +238,9 @@ elseif($page == 'tickets')
|
||||
$categories = makeoption($lng['ticket']['no_cat'], '0');
|
||||
}
|
||||
|
||||
$priorities = makeoption($lng['ticket']['unf_high'], '1');
|
||||
$priorities.= makeoption($lng['ticket']['unf_normal'], '2');
|
||||
$priorities.= makeoption($lng['ticket']['unf_low'], '3');
|
||||
$priorities = makeoption($lng['ticket']['high'], '1', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['normal'], '2', $settings['ticket']['default_priority']);
|
||||
$priorities.= makeoption($lng['ticket']['low'], '3', $settings['ticket']['default_priority']);
|
||||
$ticketsopen = 0;
|
||||
$opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '`
|
||||
WHERE `customerid` = "' . $userinfo['customerid'] . '"
|
||||
@@ -246,7 +258,14 @@ elseif($page == 'tickets')
|
||||
}
|
||||
|
||||
$ticketsopen = (int)$opentickets['count'];
|
||||
eval("echo \"" . getTemplate("ticket/tickets_new") . "\";");
|
||||
|
||||
$ticket_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/tickets/formfield.ticket_add.php';
|
||||
$ticket_add_form = htmlform::genHTMLForm($ticket_add_data);
|
||||
|
||||
$title = $ticket_add_data['ticket_add']['title'];
|
||||
$image = $ticket_add_data['ticket_add']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_new") . "\";");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -326,7 +345,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 +367,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 +378,13 @@ elseif($page == 'tickets')
|
||||
|
||||
// don't forget the main-ticket!
|
||||
|
||||
eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";");
|
||||
$ticket_reply_data = include_once dirname(__FILE__).'/lib/formfields/customer/tickets/formfield.ticket_reply.php';
|
||||
$ticket_reply_form = htmlform::genHTMLForm($ticket_reply_data);
|
||||
|
||||
$title = $ticket_reply_data['ticket_reply']['title'];
|
||||
$image = $ticket_reply_data['ticket_reply']['image'];
|
||||
|
||||
eval("echo \"" . getTemplate("tickets/tickets_reply") . "\";");
|
||||
}
|
||||
}
|
||||
elseif($action == 'close'
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Panel
|
||||
* @version $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
define('AREA', 'customer');
|
||||
@@ -22,7 +22,7 @@ define('AREA', 'customer');
|
||||
/**
|
||||
* Include our init.php, which manages Sessions, Language etc.
|
||||
*/
|
||||
|
||||
$intrafficpage = 1;
|
||||
require ("./lib/init.php");
|
||||
$traffic = '';
|
||||
$month = null;
|
||||
@@ -70,14 +70,6 @@ if(!is_null($month)
|
||||
&& !is_null($year))
|
||||
{
|
||||
$traf['byte'] = 0;
|
||||
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
|
||||
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||
WHERE `customerid`='" . $userinfo['customerid'] . "'
|
||||
AND `month` = '" . $month . "'
|
||||
AND `year` = '" . $year . "'");
|
||||
$row = mysql_fetch_row($result);
|
||||
rsort($row);
|
||||
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));;
|
||||
$result = $db->query("SELECT
|
||||
SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail',
|
||||
`day`, `month`, `year`
|
||||
@@ -99,57 +91,26 @@ if(!is_null($month)
|
||||
$traffic_complete['http']+= $http;
|
||||
$traffic_complete['ftp']+= $ftp;
|
||||
$traffic_complete['mail']+= $mail;
|
||||
$traf['day'] = $row['day'];
|
||||
$traf['day'] = $row['day'] . ".";
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
$traf['ftptext'] = bcdiv($row['ftp_up'], 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($row['ftp_down'], 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
|
||||
$traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
|
||||
$traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
|
||||
$traf['ftp'] = bcdiv($ftp, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['ftptext'] = round($row['ftp_up'] / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($row['ftp_down'] / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
|
||||
$traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
|
||||
$traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
|
||||
}
|
||||
|
||||
if($traf['byte'] != 0
|
||||
&& $traf['max'] != 0)
|
||||
{
|
||||
$proz = $traf['max'] / 100;
|
||||
$traf['http'] = round($http / $proz, 0);
|
||||
$traf['ftp'] = round($ftp / $proz, 0);
|
||||
$traf['mail'] = round($mail / $proz, 0);
|
||||
|
||||
if($traf['http'] == 0)
|
||||
{
|
||||
$traf['http'] = 1;
|
||||
}
|
||||
|
||||
if($traf['ftp'] == 0)
|
||||
{
|
||||
$traf['ftp'] = 1;
|
||||
}
|
||||
|
||||
if($traf['mail'] == 0)
|
||||
{
|
||||
$traf['mail'] = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['http'] = 0;
|
||||
$traf['ftp'] = 0;
|
||||
$traf['mail'] = 0;
|
||||
}
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
$traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['http'] = round($http, $settings['panel']['decimal_places']);
|
||||
$traf['ftp'] = round($ftp, $settings['panel']['decimal_places']);
|
||||
$traf['mail'] = round($mail, $settings['panel']['decimal_places']);
|
||||
$traf['byte'] = round($traf['byte'] / 1024, $settings['panel']['decimal_places']);
|
||||
}
|
||||
|
||||
@@ -174,13 +135,7 @@ if(!is_null($month)
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`)
|
||||
FROM `" . TABLE_PANEL_TRAFFIC . "`
|
||||
WHERE `customerid`='" . $userinfo['customerid'] . "'
|
||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||
$row = mysql_fetch_row($result);
|
||||
rsort($row);
|
||||
$traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));
|
||||
|
||||
$result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail
|
||||
FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "'
|
||||
GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12");
|
||||
@@ -204,53 +159,23 @@ else
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
$traf['ftptext'] = bcdiv($ftp_up, 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . bcdiv($ftp_down, 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)";
|
||||
$traf['httptext'] = bcdiv($http, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)";
|
||||
$traf['mailtext'] = bcdiv($mail, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)";
|
||||
$traf['ftptext'] = bcdiv($ftp_up, 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($ftp_down, 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
|
||||
$traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
|
||||
$traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
|
||||
$traf['ftp'] = bcdiv(($ftp_up + $ftp_down), 1024, $settings['panel']['decimal_places']);
|
||||
$traf['http'] = bcdiv($http, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['mail'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']);
|
||||
$traf['byte'] = bcdiv($traf['byte'], 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['ftptext'] = round($ftp_up / 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . round($ftp_down / 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)";
|
||||
$traf['httptext'] = round($http / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)";
|
||||
$traf['mailtext'] = round($mail / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)";
|
||||
}
|
||||
|
||||
if($traf['max'] != 0)
|
||||
{
|
||||
$proz = $traf['max'] / 100;
|
||||
$traf['ftp'] = round(($ftp_up + $ftp_down) / $proz, 0);
|
||||
$traf['http'] = round($http / $proz, 0);
|
||||
$traf['mail'] = round($mail / $proz, 0);
|
||||
|
||||
if($traf['http'] == 0)
|
||||
{
|
||||
$traf['http'] = 1;
|
||||
}
|
||||
|
||||
if($traf['ftp'] == 0)
|
||||
{
|
||||
$traf['ftp'] = 1;
|
||||
}
|
||||
|
||||
if($traf['mail'] == 0)
|
||||
{
|
||||
$traf['mail'] = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['ftp'] = 0;
|
||||
$traf['http'] = 0;
|
||||
$traf['mail'] = 0;
|
||||
}
|
||||
|
||||
if(extension_loaded('bcmath'))
|
||||
{
|
||||
$traf['byte'] = bcadd($traf['byte'] / (1024 * 1024), 0.0000, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
$traf['byte'] = round($traf['byte'] + (1024 * 1024), 4);
|
||||
$traf['ftptext'] = round($ftp_up / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($ftp_down / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)";
|
||||
$traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)";
|
||||
$traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)";
|
||||
$traf['ftp'] = round(($ftp_up + $ftp_down) / 1024, $settings['panel']['decimal_places']);
|
||||
$traf['http'] = round($http / 1024, $settings['panel']['decimal_places']);
|
||||
$traf['mail'] = round($mail / 1024, $settings['panel']['decimal_places']);
|
||||
$traf['byte'] = round($traf['byte'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
}
|
||||
|
||||
eval("\$traffic.=\"" . getTemplate("traffic/traffic_traffic") . "\";");
|
||||
@@ -264,9 +189,9 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
$traffic_complete['http'] = round($traffic_complete['http'] / 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['mail'] = round($traffic_complete['mail'] / 1024 * 1024, $settings['panel']['decimal_places']);
|
||||
$traffic_complete['http'] = round($traffic_complete['http'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$traffic_complete['ftp'] = round($traffic_complete['ftp'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
$traffic_complete['mail'] = round($traffic_complete['mail'] / (1024 * 1024), $settings['panel']['decimal_places']);
|
||||
}
|
||||
|
||||
eval("echo \"" . getTemplate("traffic/traffic") . "\";");
|
||||
|
||||
|
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 |