Compare commits
590 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f928fe84c8 | ||
![]() |
3443fca913 | ||
![]() |
212f68b5ac | ||
![]() |
ec9db046e7 | ||
![]() |
0884b469f0 | ||
![]() |
873fbab56b | ||
![]() |
1e0a919137 | ||
![]() |
6667289679 | ||
![]() |
8d27f2a0c0 | ||
![]() |
caeef10df2 | ||
![]() |
ff2dfe1175 | ||
![]() |
7edcb04727 | ||
![]() |
68fcbf1a49 | ||
![]() |
beaf06bb1c | ||
![]() |
9095ef077a | ||
![]() |
2e307339ab | ||
![]() |
5a5585d5bd | ||
![]() |
4ec9b47c96 | ||
![]() |
93fd4e0c83 | ||
![]() |
4a740ecb03 | ||
![]() |
06131d7f85 | ||
![]() |
a5dc0addea | ||
![]() |
134ac64e07 | ||
![]() |
0337402acd | ||
![]() |
41b5531fa2 | ||
![]() |
98b7cf95df | ||
![]() |
5b85f90f72 | ||
![]() |
5eb834c51d | ||
![]() |
e2bfe73ea8 | ||
![]() |
a10a0b3df5 | ||
![]() |
b240e8c138 | ||
![]() |
226c60eb92 | ||
![]() |
3817907eed | ||
![]() |
442a8ca1db | ||
![]() |
7e4410f713 | ||
![]() |
c1db51b1ce | ||
![]() |
96e315521e | ||
![]() |
63c0dc6da1 | ||
![]() |
f1d970bb3d | ||
![]() |
9a1ff17545 | ||
![]() |
0021d7920c | ||
![]() |
f959cc338b | ||
![]() |
ad2dd5af45 | ||
![]() |
6cfa2fc423 | ||
![]() |
ef2da05473 | ||
![]() |
7834d9d193 | ||
![]() |
1016e982c9 | ||
![]() |
061f7c1b13 | ||
![]() |
380e99b1cc | ||
![]() |
63ccd77af5 | ||
![]() |
1db714be71 | ||
![]() |
632f2e58a8 | ||
![]() |
3eaafb87bd | ||
![]() |
8171cf23b7 | ||
![]() |
50a4ad363e | ||
![]() |
ecec740961 | ||
![]() |
12bbef14a6 | ||
![]() |
f46de71aa7 | ||
![]() |
6079d338d4 | ||
![]() |
e00a6c10c5 | ||
![]() |
2848ca7344 | ||
![]() |
58b831b95c | ||
![]() |
9ff5a3c69a | ||
![]() |
9833141c13 | ||
![]() |
b156c9e576 | ||
![]() |
eb4111aa96 | ||
![]() |
d140513e9d | ||
![]() |
750a40b926 | ||
![]() |
179c458fa5 | ||
![]() |
298a2e3ccb | ||
![]() |
1954f6d6fd | ||
![]() |
c4b3bdd77b | ||
![]() |
4d7fd05d1c | ||
![]() |
fd80820e0b | ||
![]() |
46fa8a1fab | ||
![]() |
3416afe4e3 | ||
![]() |
2388ce23c1 | ||
![]() |
9dc4af618c | ||
![]() |
8ab515b402 | ||
![]() |
647724f0ed | ||
![]() |
392656bce8 | ||
![]() |
3c6b227699 | ||
![]() |
8f15321bfb | ||
![]() |
c8f96e2901 | ||
![]() |
e75066a961 | ||
![]() |
ac94b829e1 | ||
![]() |
5186720775 | ||
![]() |
0530aaa3b8 | ||
![]() |
a8b4b26c57 | ||
![]() |
017cbfa667 | ||
![]() |
de6e3b2a3f | ||
![]() |
f9c5bc0174 | ||
![]() |
f42961dd80 | ||
![]() |
45ca449d5a | ||
![]() |
7e76de099d | ||
![]() |
bbdc8afcaf | ||
![]() |
7ae53cfd63 | ||
![]() |
2e2b5a179a | ||
![]() |
6b9a07752e | ||
![]() |
de01180cc6 | ||
![]() |
8a5599023c | ||
![]() |
f4ddf8f1c2 | ||
![]() |
6fdac98ba8 | ||
![]() |
9da3300b90 | ||
![]() |
0e53d07757 | ||
![]() |
d570ad6644 | ||
![]() |
78ab655c57 | ||
![]() |
29c8341b2f | ||
![]() |
edeb603541 | ||
![]() |
c0a15930f9 | ||
![]() |
f2acafd6db | ||
![]() |
f8bfdf2957 | ||
![]() |
ab414ae645 | ||
![]() |
867fc1d50d | ||
![]() |
8c38957d8c | ||
![]() |
5cd6283caf | ||
![]() |
35483e0d30 | ||
![]() |
4d0912308d | ||
![]() |
d42e8665a5 | ||
![]() |
53e8cb5243 | ||
![]() |
f14dab7444 | ||
![]() |
8e44ed3227 | ||
![]() |
84a053c6da | ||
![]() |
9022e707bd | ||
![]() |
42ca4fe7a7 | ||
![]() |
1ce60f86f6 | ||
![]() |
786d1dee98 | ||
![]() |
c417c52656 | ||
![]() |
b6c55228b5 | ||
![]() |
b0cf336089 | ||
![]() |
80a7940f2b | ||
![]() |
c85f357eb7 | ||
![]() |
8d2056dfac | ||
![]() |
8194be5e4d | ||
![]() |
27d6b5037a | ||
![]() |
f48fcaf997 | ||
![]() |
b62194a3c3 | ||
![]() |
3e15163240 | ||
![]() |
908cba2d9d | ||
![]() |
697aadf375 | ||
![]() |
b86dc069a1 | ||
![]() |
52149ad4d4 | ||
![]() |
b67c6355a1 | ||
![]() |
e758ba5fc1 | ||
![]() |
95ae4e5061 | ||
![]() |
ff57081e3a | ||
![]() |
bc4f532b97 | ||
![]() |
696fa1c406 | ||
![]() |
7c8bad72c5 | ||
![]() |
bbf59daef3 | ||
![]() |
5021608b03 | ||
![]() |
0268cd0a72 | ||
![]() |
033ba81da8 | ||
![]() |
9fff6afa0b | ||
![]() |
5ac88f0daa | ||
![]() |
4eb81c775c | ||
![]() |
b510c59bab | ||
![]() |
8b025ebe81 | ||
![]() |
b9a474311b | ||
![]() |
f0e9bc62a2 | ||
![]() |
006e87daf1 | ||
![]() |
55bb7c4eeb | ||
![]() |
a39d3fff7f | ||
![]() |
1a208b0642 | ||
![]() |
2b504938ec | ||
![]() |
c7c8998367 | ||
![]() |
142159a8e9 | ||
![]() |
c943506ff8 | ||
![]() |
4e257937b7 | ||
![]() |
952aedf175 | ||
![]() |
e212598c21 | ||
![]() |
8a1338b186 | ||
![]() |
5f2a840890 | ||
![]() |
bc5039c7e2 | ||
![]() |
30737fef7b | ||
![]() |
e624adc0a4 | ||
![]() |
e0ed79f8de | ||
![]() |
72344d2e13 | ||
![]() |
63f9d392f7 | ||
![]() |
4f3f40a6c4 | ||
![]() |
bc79794784 | ||
![]() |
a028395cc2 | ||
![]() |
22974f8731 | ||
![]() |
985b4c0279 | ||
![]() |
b33ca79480 | ||
![]() |
7891d3ad3e | ||
![]() |
a614b1066e | ||
![]() |
968d9d6221 | ||
![]() |
3d803e0c08 | ||
![]() |
f53460a05a | ||
![]() |
5ecca546ea | ||
![]() |
fcc72096ce | ||
![]() |
5e82ff7e81 | ||
![]() |
54a761ec91 | ||
![]() |
711686bd9f | ||
![]() |
ada0b61ee1 | ||
![]() |
7dae1725bb | ||
![]() |
c5977fc0cb | ||
![]() |
b86f317a2c | ||
![]() |
bee66af492 | ||
![]() |
b5afd44195 | ||
![]() |
da94b43e84 | ||
![]() |
ff8b3e323b | ||
![]() |
aa09eb1351 | ||
![]() |
3617ce9b88 | ||
![]() |
21a48609c2 | ||
![]() |
b35172b286 | ||
![]() |
bf0f31993b | ||
![]() |
582dd26243 | ||
![]() |
e153a20417 | ||
![]() |
00cd81002e | ||
![]() |
091c5798c1 | ||
![]() |
1df1522144 | ||
![]() |
40b3c36358 | ||
![]() |
239da3bd40 | ||
![]() |
b10ee19033 | ||
![]() |
2e8536cc04 | ||
![]() |
0340a18dc1 | ||
![]() |
b272020b37 | ||
![]() |
8df8d5f7dd | ||
![]() |
c0dfe40d1b | ||
![]() |
d84d0065d5 | ||
![]() |
a31f11d8c6 | ||
![]() |
fe8ad3c064 | ||
![]() |
3c72a8eafb | ||
![]() |
23237cb05d | ||
![]() |
5857970461 | ||
![]() |
a9640ff6b5 | ||
![]() |
3dd31b9d11 | ||
![]() |
7aba5362c6 | ||
![]() |
323ab6462b | ||
![]() |
7092697112 | ||
![]() |
72b6908899 | ||
![]() |
cc73f609e4 | ||
![]() |
2e44c6fd8c | ||
![]() |
4662bde3b9 | ||
![]() |
e8547253fd | ||
![]() |
83e8cf74c1 | ||
![]() |
82501c9c9c | ||
![]() |
b021a42f66 | ||
![]() |
e3dbf79863 | ||
![]() |
7441ccc003 | ||
![]() |
0a23a60901 | ||
![]() |
1258182265 | ||
![]() |
e50721eb8e | ||
![]() |
7af9c53472 | ||
![]() |
7596018c73 | ||
![]() |
b1fc6cd0be | ||
![]() |
44f8c77abe | ||
![]() |
3cd7fa7720 | ||
![]() |
0cfb161e53 | ||
![]() |
5779635bd4 | ||
![]() |
d6f0073446 | ||
![]() |
f81c909cbc | ||
![]() |
b69f795038 | ||
![]() |
6a51889f4d | ||
![]() |
84cf8d923e | ||
![]() |
016754b67c | ||
![]() |
88765e15f9 | ||
![]() |
7a6d13de26 | ||
![]() |
289a2bb167 | ||
![]() |
10c263b507 | ||
![]() |
b021019ec1 | ||
![]() |
87c487bdcb | ||
![]() |
e259257c53 | ||
![]() |
42a2d1e144 | ||
![]() |
5a4edaf924 | ||
![]() |
125d1f01fd | ||
![]() |
1ea94a4f0b | ||
![]() |
239b868cc4 | ||
![]() |
2fd6d17229 | ||
![]() |
7228a3df52 | ||
![]() |
e226468036 | ||
![]() |
fe2d640969 | ||
![]() |
51cdedbdb4 | ||
![]() |
8b4ea87bf4 | ||
![]() |
9b67ec6dac | ||
![]() |
d0b286ee0e | ||
![]() |
29b96802d7 | ||
![]() |
752778bc66 | ||
![]() |
284ecc4256 | ||
![]() |
987cbd3be8 | ||
![]() |
600345ee57 | ||
![]() |
febd7256e4 | ||
![]() |
2c773ac1a4 | ||
![]() |
6ae0f06ca9 | ||
![]() |
237d28d396 | ||
![]() |
a1bb333153 | ||
![]() |
ce3d52736f | ||
![]() |
cbb8c0653e | ||
![]() |
8de04fc4cc | ||
![]() |
aff0a0220c | ||
![]() |
49027a3bad | ||
![]() |
37396e8dec | ||
![]() |
1aed4d0666 | ||
![]() |
0d2c962da8 | ||
![]() |
0dc9904d62 | ||
![]() |
f317d8cff7 | ||
![]() |
baa835cb8c | ||
![]() |
95448a76c3 | ||
![]() |
3704838436 | ||
![]() |
e2a2e5f315 | ||
![]() |
bcff43603a | ||
![]() |
ff4f166962 | ||
![]() |
787538e1ca | ||
![]() |
b9f190ec88 | ||
![]() |
c5f895b72f | ||
![]() |
7b1ae6d86e | ||
![]() |
9f81ab8ab0 | ||
![]() |
4e5d8ff5dd | ||
![]() |
61628ff56d | ||
![]() |
dd037a96ea | ||
![]() |
141b1a8145 | ||
![]() |
d1f7e32885 | ||
![]() |
f0af06dbed | ||
![]() |
68407ad75e | ||
![]() |
c3cccaf42d | ||
![]() |
8427c84403 | ||
![]() |
4c194a97dc | ||
![]() |
f49c3c7a47 | ||
![]() |
78f3b0aee5 | ||
![]() |
76da5e9aa2 | ||
![]() |
77e85e70b9 | ||
![]() |
99cdf11632 | ||
![]() |
4c095f9ffc | ||
![]() |
a4fc00aa63 | ||
![]() |
1d5b686619 | ||
![]() |
93e6b2a622 | ||
![]() |
9ed95e2918 | ||
![]() |
fc2387bcb9 | ||
![]() |
3d87b6597d | ||
![]() |
b35efdcf2f | ||
![]() |
b552944ad7 | ||
![]() |
05a17e9122 | ||
![]() |
10ba5625da | ||
![]() |
801c2ba9e9 | ||
![]() |
749cf37fa8 | ||
![]() |
ec7769251b | ||
![]() |
1f1cd4e3ec | ||
![]() |
4e0d00c9ca | ||
![]() |
0dff931595 | ||
![]() |
9962b0ba48 | ||
![]() |
18778226eb | ||
![]() |
de2cfeb66e | ||
![]() |
38092a051c | ||
![]() |
b32bc1e054 | ||
![]() |
7c1db136b1 | ||
![]() |
07df697618 | ||
![]() |
9d436f8a76 | ||
![]() |
1419483708 | ||
![]() |
03835e8b04 | ||
![]() |
7ca3c85645 | ||
![]() |
d2f6ea7b8d | ||
![]() |
3066c091d2 | ||
![]() |
6403421769 | ||
![]() |
3fa5a420c2 | ||
![]() |
dc8320d46f | ||
![]() |
a526e71cd2 | ||
![]() |
aa17de9665 | ||
![]() |
be088e4704 | ||
![]() |
3c71e7ee60 | ||
![]() |
8d06d47318 | ||
![]() |
20b672cd09 | ||
![]() |
f978de490f | ||
![]() |
c0bf0f6583 | ||
![]() |
8aeceff207 | ||
![]() |
a6137fbb8f | ||
![]() |
ff6504172a | ||
![]() |
76265608b3 | ||
![]() |
db70a147f3 | ||
![]() |
8ab9af8bb2 | ||
![]() |
82dabaf925 | ||
![]() |
99bcc33b38 | ||
![]() |
27917f3f6e | ||
![]() |
8dba57f23d | ||
![]() |
26586cc268 | ||
![]() |
ba525a3366 | ||
![]() |
07dbde6f36 | ||
![]() |
30a4354207 | ||
![]() |
2ef0c95cae | ||
![]() |
2f63e920b0 | ||
![]() |
940e0783d7 | ||
![]() |
32382dce22 | ||
![]() |
546c525b23 | ||
![]() |
3d56d85a89 | ||
![]() |
22393dee13 | ||
![]() |
3ad63a1d9e | ||
![]() |
2d535ad612 | ||
![]() |
d0843a4070 | ||
![]() |
3ab8c4c0a6 | ||
![]() |
185ae09393 | ||
![]() |
1295d219ab | ||
![]() |
b529b8da9c | ||
![]() |
98acc58597 | ||
![]() |
5e5957cca1 | ||
![]() |
2b542e58d0 | ||
![]() |
e548d75e3e | ||
![]() |
c16741808f | ||
![]() |
54868df652 | ||
![]() |
bdf585b8db | ||
![]() |
3343d61984 | ||
![]() |
c72f936017 | ||
![]() |
c14e86f96f | ||
![]() |
89b4c5fc92 | ||
![]() |
820b1c7207 | ||
![]() |
86fa5bd2b3 | ||
![]() |
5297354e3b | ||
![]() |
ee31f42424 | ||
![]() |
75ec5f32f3 | ||
![]() |
6b1020f0c4 | ||
![]() |
300e0a27d6 | ||
![]() |
2adc555846 | ||
![]() |
fc56f55a13 | ||
![]() |
a9e9c6934a | ||
![]() |
b5af783845 | ||
![]() |
d8c4a72a33 | ||
![]() |
142635c9be | ||
![]() |
72156aa72c | ||
![]() |
08be96e504 | ||
![]() |
fddd4ec921 | ||
![]() |
a23221cce8 | ||
![]() |
41c0bb062c | ||
![]() |
133f072266 | ||
![]() |
a2b326f6bc | ||
![]() |
3ee994e77d | ||
![]() |
d21c393270 | ||
![]() |
f59f55f5d4 | ||
![]() |
0f867720a5 | ||
![]() |
b21b12abb6 | ||
![]() |
9ffec02bb2 | ||
![]() |
a7bb4abc95 | ||
![]() |
c279e10453 | ||
![]() |
f030d5bd52 | ||
![]() |
e35e91cbd9 | ||
![]() |
7202359b42 | ||
![]() |
949bd9832f | ||
![]() |
5102832a25 | ||
![]() |
878207abfa | ||
![]() |
36c64875b3 | ||
![]() |
a9bfd931bd | ||
![]() |
e455020956 | ||
![]() |
c8af1c1d4d | ||
![]() |
60f1b37441 | ||
![]() |
c3425d2406 | ||
![]() |
ef9a99f4b1 | ||
![]() |
f2e12e6821 | ||
![]() |
3500813695 | ||
![]() |
3fc2c2bb74 | ||
![]() |
ff5df92944 | ||
![]() |
ea81099b59 | ||
![]() |
dea1e09b30 | ||
![]() |
c98864733a | ||
![]() |
c39922d95d | ||
![]() |
a5180135f6 | ||
![]() |
3058904fd2 | ||
![]() |
4365147a40 | ||
![]() |
59a6440fd8 | ||
![]() |
29bc6c1ef7 | ||
![]() |
ad96ae579d | ||
![]() |
e82b8c4e70 | ||
![]() |
b9e5161177 | ||
![]() |
721099aa4f | ||
![]() |
efacadf46c | ||
![]() |
78cacae128 | ||
![]() |
58639f40be | ||
![]() |
d81925d706 | ||
![]() |
8376906d9c | ||
![]() |
db3db63f35 | ||
![]() |
1b20c10513 | ||
![]() |
d5e3e110f8 | ||
![]() |
56eb4a3a93 | ||
![]() |
19d9493c83 | ||
![]() |
8b0ff80efb | ||
![]() |
d847b58907 | ||
![]() |
c861aa35f4 | ||
![]() |
df02325251 | ||
![]() |
ed7eb6186b | ||
![]() |
d43fa9e4b4 | ||
![]() |
2643c9ff1f | ||
![]() |
75ac3c3400 | ||
![]() |
43923882cd | ||
![]() |
785965db35 | ||
![]() |
088179f1fb | ||
![]() |
306a12fe56 | ||
![]() |
0d73c039f2 | ||
![]() |
24230fb099 | ||
![]() |
7335196208 | ||
![]() |
7442afd59c | ||
![]() |
de99190341 | ||
![]() |
e1f32f3462 | ||
![]() |
9689d5a63a | ||
![]() |
ec7e0aaf4c | ||
![]() |
4ba410d742 | ||
![]() |
3ac67971cc | ||
![]() |
c238dacb20 | ||
![]() |
d5695da0b1 | ||
![]() |
79095de5ca | ||
![]() |
293209447b | ||
![]() |
8f7ee3fec1 | ||
![]() |
eb31e298da | ||
![]() |
376a7c6909 | ||
![]() |
565c933be0 | ||
![]() |
57c36a47b4 | ||
![]() |
0a8b154795 | ||
![]() |
36f26aad35 | ||
![]() |
6db9c59dd5 | ||
![]() |
7a2a8e85d6 | ||
![]() |
8fc358a168 | ||
![]() |
bf061d6fff | ||
![]() |
0a7d63c512 | ||
![]() |
060dc2fd29 | ||
![]() |
1dae01c021 | ||
![]() |
1255cddf7d | ||
![]() |
629f43350c | ||
![]() |
03e035cb98 | ||
![]() |
0eacad9a95 | ||
![]() |
09e48db992 | ||
![]() |
a1a7a7fd38 | ||
![]() |
8ff877bf37 | ||
![]() |
307516579d | ||
![]() |
c13b8f903e | ||
![]() |
4770184521 | ||
![]() |
f9f556e639 | ||
![]() |
b2c22426e4 | ||
![]() |
8233163ddd | ||
![]() |
1dc3f067dc | ||
![]() |
0a1a97893f | ||
![]() |
4091b7de11 | ||
![]() |
06cf589021 | ||
![]() |
9b6b9e2ad9 | ||
![]() |
0b193b3fe6 | ||
![]() |
1c09fc29a7 | ||
![]() |
6f4b677e69 | ||
![]() |
7a6ac85a4a | ||
![]() |
e1123cb72b | ||
![]() |
2f03407626 | ||
![]() |
38fe91c6af | ||
![]() |
df9d09e810 | ||
![]() |
8b17ba7a09 | ||
![]() |
90e770ee9c | ||
![]() |
fd29f1ce11 | ||
![]() |
dd8e13f904 | ||
![]() |
b430dd1cfe | ||
![]() |
c0d3b86355 | ||
![]() |
36cd6886d4 | ||
![]() |
1fa3e28183 | ||
![]() |
346d573197 | ||
![]() |
2c08ce5535 | ||
![]() |
cb92db72e9 | ||
![]() |
5648e8313c | ||
![]() |
2bbf79cde9 | ||
![]() |
ba800b9bd4 | ||
![]() |
640dd1560e | ||
![]() |
fb6b0e5611 | ||
![]() |
0bf63ed78b | ||
![]() |
7ae0a559a3 | ||
![]() |
3564ab1d8f | ||
![]() |
bd559904ec | ||
![]() |
6560816099 | ||
![]() |
a1f6e698f2 | ||
![]() |
b69ba4512c | ||
![]() |
3157f125a7 | ||
![]() |
d1d8180e39 | ||
![]() |
bec7336044 | ||
![]() |
445287f04c | ||
![]() |
9ba78e0776 | ||
![]() |
9eb5d583b6 | ||
![]() |
52587968ca | ||
![]() |
be5a8ad517 | ||
![]() |
74b68e507a | ||
![]() |
7e6a5cd28c | ||
![]() |
a9372ccce3 | ||
![]() |
2eea4cd3ba | ||
![]() |
f58c4d7f69 | ||
![]() |
adaa98e1be | ||
![]() |
8624f32e15 | ||
![]() |
e95a4808e6 | ||
![]() |
e7412d0534 | ||
![]() |
2aa5bea756 | ||
![]() |
02beb3de11 | ||
![]() |
8400d7eaba | ||
![]() |
bae332c794 | ||
![]() |
7fba1f42cb | ||
![]() |
78bffdd037 | ||
![]() |
1c2d2a6d99 | ||
![]() |
7dc32a6b1b | ||
![]() |
2d90b91027 | ||
![]() |
7db7051180 | ||
![]() |
6d14969a62 | ||
![]() |
14c893bb77 |
15
.github/issue_template.md
vendored
@ -1,9 +1,16 @@
|
||||
### Describe your problem
|
||||
|
||||
### Expected behavior
|
||||
|
||||
### Actual behavior
|
||||
Complete here.
|
||||
|
||||
### Steps to reproduce the problem
|
||||
Complete here.
|
||||
|
||||
### Bludit version
|
||||
Complete here.
|
||||
|
||||
### PHP version
|
||||
If you do not know delete this line.
|
||||
|
||||
### PHP logs
|
||||
If you do not know delete this line.
|
||||
|
||||
The default settings of the PHP Error Log file varies from OS to OS. The location of the error log file itself can be set manually in the php.ini file. On a Windows server, in IIS, it may be something like `error_log = C:\log_files\php_errors.log` in Linux it may be a value of `/var/log/php_errors.log`.
|
||||
|
9
.gitignore
vendored
@ -1,14 +1,20 @@
|
||||
.DS_Store
|
||||
dbgenerator.php
|
||||
bl-content/*
|
||||
bl-content-migrator
|
||||
bl-plugins/timemachine
|
||||
bl-plugins/timemachine-x
|
||||
bl-plugins/discovery
|
||||
bl-plugins/updater
|
||||
bl-plugins/medium-editor
|
||||
bl-plugins/quill
|
||||
bl-plugins/yandex-metrica/
|
||||
bl-plugins/domain-migrator/
|
||||
bl-plugins/tail-writer/
|
||||
bl-kernel/bludit.pro.php
|
||||
bl-kernel/admin/themes/gris
|
||||
bl-themes/docs
|
||||
bl-themes/typerite
|
||||
bl-themes/docsx
|
||||
bl-themes/editorial
|
||||
bl-themes/mediumish
|
||||
@ -19,3 +25,6 @@ bl-themes/hyperspace
|
||||
bl-themes/striped
|
||||
bl-themes/log
|
||||
bl-themes/micro
|
||||
bl-themes/tagg
|
||||
bl-themes/future-imperfect
|
||||
bl-themes/social-network
|
@ -6,13 +6,14 @@ AddDefaultCharset UTF-8
|
||||
RewriteEngine on
|
||||
|
||||
# Base directory
|
||||
# RewriteBase /
|
||||
#RewriteBase /
|
||||
|
||||
# Deny direct access to the next directories
|
||||
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
|
||||
|
||||
# All URL process by index.php
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*) index.php [PT,L]
|
||||
|
||||
</IfModule>
|
2
LICENSE
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2018 Diego Najar
|
||||
Copyright (c) 2015-2020 Diego Najar
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
30
README.md
@ -1,6 +1,6 @@
|
||||
[Bludit](https://www.bludit.com/)
|
||||
================================
|
||||
**Simple**, **Fast** and **Flexible** CMS
|
||||
**Simple**, **Fast** and **Flexible** CMS.
|
||||
|
||||
Bludit is a web application to build your own **website** or **blog** in seconds, it's completely **free and open source**. Bludit uses files in JSON format to store the content, you don't need to install or configure a database. You only need a web server with PHP support.
|
||||
|
||||
@ -13,21 +13,20 @@ Bludit supports **Markdown** and **HTML code** for the content.
|
||||
- [Documentation](https://docs.bludit.com)
|
||||
- Help and Support [Forum](https://forum.bludit.org) and [Chat](https://gitter.im/bludit/support)
|
||||
|
||||
[](https://pro.bludit.com/)
|
||||
|
||||
Social Networks
|
||||
Follow Bludit
|
||||
---------------
|
||||
|
||||
- [Blog](https://blog.bludit.com)
|
||||
- [Twitter](https://twitter.com/bludit)
|
||||
- [Facebook](https://www.facebook.com/bluditcms)
|
||||
- [Youtube](https://www.youtube.com/channel/UCuLu0Z_CHBsTiYTDz129x9Q?view_as=subscriber)
|
||||
- [Youtube](https://www.youtube.com/c/Bluditcms)
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
You just need a web server with PHP support.
|
||||
|
||||
- PHP v5.3 or higher.
|
||||
- PHP v5.6 or higher.
|
||||
- PHP [mbstring](http://php.net/manual/en/book.mbstring.php) module for full UTF-8 support.
|
||||
- PHP [gd](http://php.net/manual/en/book.image.php) module for image processing.
|
||||
- PHP [dom](http://php.net/manual/en/book.dom.php) module for DOM manipulation.
|
||||
@ -47,25 +46,24 @@ Installation Guide
|
||||
|
||||
Docker Image
|
||||
------------
|
||||
Bludit provides an official Docker image.
|
||||
Official Docker image on Docker Hub.
|
||||
- https://hub.docker.com/r/bludit/docker/
|
||||
|
||||
Backers
|
||||
Also we provide Kubernetes deployments yaml files.
|
||||
- https://github.com/bludit/docker/tree/master/kubernetes
|
||||
|
||||
Support Bludit!
|
||||
-------
|
||||
Become a **Backer** and support Bludit with a monthly contribution to help us continue development.
|
||||
- [Become a Backer](https://www.patreon.com/bePatron?c=921115&rid=2458859)
|
||||
Bludit is open soruce and free, but if you really like the project and is useful for your you can contribute in [Patreon](https://www.patreon.com/bePatron?c=921115&rid=2458860), also for the supporters we provide Bludit PRO.
|
||||
|
||||
Sponsors
|
||||
--------
|
||||
Become a **Sponsor** and support Bludit with a monthly contribution to help us continue development.
|
||||
[](https://pro.bludit.com/)
|
||||
|
||||
[](https://www.patreon.com/bePatron?c=921115&rid=2458860)
|
||||
### Golden sponsors in Patreon!
|
||||
|
||||
- <a href="https://www.patreon.com/clickwork" target="_blank">Clickwork</a>
|
||||
- <a href="https://www.patreon.com/user/creators?u=10331784" target="_blank">KreativMind</a>
|
||||
- <a href="https://www.patreon.com/pinguinsreisende" target="_blank">Gerriet Selent</a>
|
||||
- <a href="https://www.patreon.com/user/creators?u=12261033" target="_blank">Jan Rippl</a>
|
||||
- <a href="https://www.patreon.com/user/creators?u=9828204" target="_blank">Wesleigh Walker</a>
|
||||
- <a href="https://www.patreon.com/user/creators?u=28428918" target="_blank">Curious Activity</a>
|
||||
|
||||
License
|
||||
-------
|
||||
|
@ -30,7 +30,6 @@ class dbJSON {
|
||||
|
||||
// Unserialize, JSON to Array
|
||||
$array = $this->unserialize($implode);
|
||||
|
||||
if (empty($array)) {
|
||||
$this->db = array();
|
||||
$this->dbBackup = array();
|
||||
@ -99,7 +98,8 @@ class dbJSON {
|
||||
{
|
||||
// NULL is returned if the json cannot be decoded
|
||||
$decode = json_decode($data, true);
|
||||
if (empty($decode)) {
|
||||
if ($decode===NULL) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error trying to read the JSON file: '.$this->file, LOG_TYPE_ERROR);
|
||||
return false;
|
||||
}
|
||||
return $decode;
|
||||
@ -110,4 +110,11 @@ class dbJSON {
|
||||
return $this->db;
|
||||
}
|
||||
|
||||
// Truncate all the rows
|
||||
public function truncate()
|
||||
{
|
||||
$this->db = array();
|
||||
return $this->save();
|
||||
}
|
||||
|
||||
}
|
@ -80,9 +80,9 @@ class dbList extends dbJSON
|
||||
{
|
||||
$key = $this->generateKey($args['name']);
|
||||
|
||||
$this->db[$key]['name'] = $args['name'];
|
||||
$this->db[$key]['template'] = isset($args['template'])?$args['template']:'';
|
||||
$this->db[$key]['description'] = isset($args['description'])?$args['description']:'';
|
||||
$this->db[$key]['name'] = Sanitize::removeTags($args['name']);
|
||||
$this->db[$key]['template'] = isset($args['template'])?Sanitize::removeTags($args['template']):'';
|
||||
$this->db[$key]['description'] = isset($args['description'])?Sanitize::removeTags($args['description']):'';
|
||||
$this->db[$key]['list'] = isset($args['list'])?$args['list']:array();
|
||||
|
||||
$this->sortAlphanumeric();
|
||||
@ -110,9 +110,9 @@ class dbList extends dbJSON
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->db[$args['newKey']]['name'] = $args['name'];
|
||||
$this->db[$args['newKey']]['template'] = isset($args['template'])?$args['template']:'';
|
||||
$this->db[$args['newKey']]['description'] = isset($args['description'])?$args['description']:'';
|
||||
$this->db[$args['newKey']]['name'] = Sanitize::removeTags($args['name']);
|
||||
$this->db[$args['newKey']]['template'] = isset($args['template'])?Sanitize::removeTags($args['template']):'';
|
||||
$this->db[$args['newKey']]['description'] = isset($args['description'])?Sanitize::removeTags($args['description']):'';
|
||||
$this->db[$args['newKey']]['list'] = $this->db[$args['oldKey']]['list'];
|
||||
|
||||
// Remove the old category
|
||||
@ -126,7 +126,7 @@ class dbList extends dbJSON
|
||||
}
|
||||
|
||||
// Sort the categories by "Natural order"
|
||||
private function sortAlphanumeric()
|
||||
public function sortAlphanumeric()
|
||||
{
|
||||
// Sort key alphanumeric strings, a01, a10, b10, c02
|
||||
return ksort($this->db);
|
||||
|
@ -6,11 +6,11 @@ class Plugin {
|
||||
// Ex: sitemap
|
||||
public $directoryName;
|
||||
|
||||
// (string) Absoulute database filename and path
|
||||
// (string) Absolute database filename and path
|
||||
// Ex: /www/bludit/bl-content/plugins/sitemap/db.php
|
||||
public $filenameDb;
|
||||
|
||||
// (string) Absoulute metadata filename and path
|
||||
// (string) Absolute metadata filename and path
|
||||
// Ex: /www/bludit/bl-plugins/sitemap/metadata.json
|
||||
public $filenameMetadata;
|
||||
|
||||
@ -31,9 +31,13 @@ class Plugin {
|
||||
// (boolean) Enable or disable default Save and Cancel button on plugin settings
|
||||
public $formButtons;
|
||||
|
||||
// (array) List of custom hooks
|
||||
public $customHooks;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->dbFields = array();
|
||||
$this->customHooks = array();
|
||||
|
||||
$reflector = new ReflectionClass(get_class($this));
|
||||
|
||||
@ -82,16 +86,22 @@ class Plugin {
|
||||
return '<script charset="utf-8" src="'.$this->domainPath().'js/'.$filename.'?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
// Returns absolute URL and path of the plugin directory
|
||||
// This function helps to include CSS or Javascript files with absolute URL
|
||||
public function domainPath()
|
||||
{
|
||||
return DOMAIN_PLUGINS.$this->directoryName.'/';
|
||||
}
|
||||
|
||||
// Returns relative path of the plugin directory
|
||||
// This function helps to include CSS or Javascript files with relative URL
|
||||
public function htmlPath()
|
||||
{
|
||||
return HTML_PATH_PLUGINS.$this->directoryName.'/';
|
||||
}
|
||||
|
||||
// Returns absolute path of the plugin directory
|
||||
// This function helps to include PHP libraries or some file at server level
|
||||
public function phpPath()
|
||||
{
|
||||
return PATH_PLUGINS.$this->directoryName.DS;
|
||||
@ -102,7 +112,7 @@ class Plugin {
|
||||
return PATH_PLUGINS_DATABASES.$this->directoryName.DS;
|
||||
}
|
||||
|
||||
// Returns the value of the key from the metadata of the plugin, FALSE if the key doen't exit
|
||||
// Returns the value of the key from the metadata of the plugin, FALSE if the key doesn't exist
|
||||
public function getMetadata($key)
|
||||
{
|
||||
if(isset($this->metadata[$key])) {
|
||||
@ -246,6 +256,8 @@ class Plugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Returns TRUE if the plugin is installed
|
||||
// This function just check if the database of the plugin is created
|
||||
public function installed()
|
||||
{
|
||||
return file_exists($this->filenameDb);
|
||||
@ -258,20 +270,20 @@ class Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
// This method is used on childre classes.
|
||||
// This method is used on children classes.
|
||||
// The user can define his own field of the database
|
||||
}
|
||||
|
||||
public function post()
|
||||
{
|
||||
$args = $_POST;
|
||||
foreach($this->dbFields as $key=>$value) {
|
||||
if( isset($args[$key]) ) {
|
||||
$value = Sanitize::html( $args[$key] );
|
||||
if($value==='false') { $value = false; }
|
||||
elseif($value==='true') { $value = true; }
|
||||
settype($value, gettype($this->dbFields[$key]));
|
||||
$this->db[$key] = $value;
|
||||
foreach ($this->dbFields as $field=>$value) {
|
||||
if (isset($args[$field])) {
|
||||
$finalValue = Sanitize::html( $args[$field] );
|
||||
if ($finalValue==='false') { $finalValue = false; }
|
||||
elseif ($finalValue==='true') { $finalValue = true; }
|
||||
settype($finalValue, gettype($value));
|
||||
$this->db[$field] = $finalValue;
|
||||
}
|
||||
}
|
||||
return $this->save();
|
||||
|
@ -11,21 +11,30 @@ checkRole(array('admin'));
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// Main before POST
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
editSettings($_POST);
|
||||
Redirect::page('settings-general');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$L->g('General Settings');
|
||||
activatePlugin('pluginAPI');
|
||||
$apiURL = DOMAIN_BASE.'api/';
|
||||
$pluginAPI = getPlugin('pluginAPI');
|
||||
$apiToken = $pluginAPI->getToken();
|
||||
$username = $login->username();
|
||||
$admin = new User($username);
|
||||
$authToken = $admin->tokenAuth();
|
||||
$output = array(
|
||||
'apiURL'=>$apiURL,
|
||||
'username'=>$username,
|
||||
'apiToken'=>$apiToken,
|
||||
'authToken'=>$authToken
|
||||
);
|
||||
exit(json_encode($output));
|
||||
|
||||
?>
|
@ -40,12 +40,9 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
));
|
||||
|
||||
// Call the method post of the plugin
|
||||
if ($plugin->post()) {
|
||||
Alert::set( $L->g('The changes have been saved') );
|
||||
Redirect::page('configure-plugin/'.$plugin->className());
|
||||
} else {
|
||||
Alert::set( $L->g('Complete all fields') );
|
||||
}
|
||||
$plugin->post();
|
||||
Alert::set( $L->g('The changes have been saved') );
|
||||
Redirect::page('configure-plugin/'.$plugin->className());
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
@ -4,12 +4,25 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
checkRole(array('admin', 'editor'));
|
||||
checkRole(array('admin', 'editor', 'author'));
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
// Returns the content belongs to the current user if the user has the role Editor
|
||||
function filterContentOwner($list) {
|
||||
global $login;
|
||||
global $pages;
|
||||
$tmp = array();
|
||||
foreach ($list as $pageKey) {
|
||||
if ($pages->db[$pageKey]['username']==$login->username()) {
|
||||
array_push($tmp, $pageKey);
|
||||
}
|
||||
}
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main before POST
|
||||
// ============================================================================
|
||||
@ -22,21 +35,26 @@ checkRole(array('admin', 'editor'));
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// List of published pages
|
||||
$onlyPublished = true;
|
||||
$numberOfItems = ITEMS_PER_PAGE_ADMIN;
|
||||
$pageNumber = $url->pageNumber();
|
||||
$published = $pages->getList($pageNumber, $numberOfItems, $onlyPublished);
|
||||
$published = $pages->getList($url->pageNumber(), ITEMS_PER_PAGE_ADMIN);
|
||||
$drafts = $pages->getDraftDB(true);
|
||||
$scheduled = $pages->getScheduledDB(true);
|
||||
$static = $pages->getStaticDB(true);
|
||||
$sticky = $pages->getStickyDB(true);
|
||||
$autosave = $pages->getAutosaveDB(true);
|
||||
|
||||
// If the user is an Author filter the content he/she can edit
|
||||
if (checkRole(array('author'), false)) {
|
||||
$published = filterContentOwner($published);
|
||||
$drafts = filterContentOwner($drafts);
|
||||
$scheduled = filterContentOwner($scheduled);
|
||||
$static = filterContentOwner($static);
|
||||
$sticky = filterContentOwner($sticky);
|
||||
}
|
||||
|
||||
// Check if out of range the pageNumber
|
||||
if (empty($published) && $url->pageNumber()>1) {
|
||||
Redirect::page('content');
|
||||
}
|
||||
|
||||
$drafts = $pages->getDraftDB(true);
|
||||
$scheduled = $pages->getScheduledDB(true);
|
||||
$static = $pages->getStaticDB(true);
|
||||
$sticky = $pages->getStickyDB(true);
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$L->g('Manage content');
|
@ -4,7 +4,7 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if (!checkRole(array('admin','editor'), false)) {
|
||||
if (checkRole(array('author'), false)) {
|
||||
try {
|
||||
$pageKey = isset($_POST['key']) ? $_POST['key'] : $layout['parameters'];
|
||||
$page = new Page($pageKey);
|
||||
@ -43,11 +43,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
Alert::set( $L->g('The changes have been saved') );
|
||||
}
|
||||
} else {
|
||||
// If the checkbox is not selected the form doesn't send the field
|
||||
$_POST['noindex'] = isset($_POST['noindex'])?true:false;
|
||||
$_POST['nofollow'] = isset($_POST['nofollow'])?true:false;
|
||||
$_POST['noarchive'] = isset($_POST['noarchive'])?true:false;
|
||||
|
||||
$key = editPage($_POST);
|
||||
if ($key!==false) {
|
||||
Alert::set( $L->g('The changes have been saved') );
|
||||
@ -64,11 +59,28 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
try {
|
||||
$pageKey = $layout['parameters'];
|
||||
$page = new Page($pageKey);
|
||||
$uuid = $page->uuid();
|
||||
} catch (Exception $e) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the page: '.$pageKey, LOG_TYPE_ERROR);
|
||||
Redirect::page('content');
|
||||
}
|
||||
|
||||
// Images prefix directory
|
||||
define('PAGE_IMAGES_KEY', $page->uuid());
|
||||
|
||||
// Images and thubmnails directories
|
||||
if (IMAGE_RESTRICT) {
|
||||
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
|
||||
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
|
||||
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.DS.'thumbnails'.DS);
|
||||
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
|
||||
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
|
||||
} else {
|
||||
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS));
|
||||
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS));
|
||||
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_THUMBNAILS);
|
||||
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_THUMBNAILS);
|
||||
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_THUMBNAILS);
|
||||
}
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$L->g('Edit content').' - '.$page->title();
|
@ -26,6 +26,9 @@ function checkLogin($args)
|
||||
// Renew the token. This token will be the same inside the session for multiple forms.
|
||||
$security->generateTokenCSRF();
|
||||
|
||||
if (isset($_GET['enableAPI'])) {
|
||||
Redirect::page('api');
|
||||
}
|
||||
Redirect::page('dashboard');
|
||||
return true;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
checkRole(array('admin', 'editor'));
|
||||
checkRole(array('admin', 'editor', 'author'));
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
@ -19,11 +19,6 @@ checkRole(array('admin', 'editor'));
|
||||
// ============================================================================
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
// If the checkbox is not selected the form doesn't send the field
|
||||
$_POST['noindex'] = isset($_POST['noindex'])?true:false;
|
||||
$_POST['nofollow'] = isset($_POST['nofollow'])?true:false;
|
||||
$_POST['noarchive'] = isset($_POST['noarchive'])?true:false;
|
||||
|
||||
createPage($_POST);
|
||||
Redirect::page('content');
|
||||
}
|
||||
@ -35,5 +30,23 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
// UUID of the page is need it for autosave and media manager
|
||||
$uuid = $pages->generateUUID();
|
||||
|
||||
// Images prefix directory
|
||||
define('PAGE_IMAGES_KEY', $uuid);
|
||||
|
||||
// Images and thubmnails directories
|
||||
if (IMAGE_RESTRICT) {
|
||||
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
|
||||
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
|
||||
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.DS.'thumbnails'.DS);
|
||||
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
|
||||
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
|
||||
} else {
|
||||
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS));
|
||||
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS));
|
||||
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_THUMBNAILS);
|
||||
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_THUMBNAILS);
|
||||
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_THUMBNAILS);
|
||||
}
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] = $L->g('New content').' - '.$layout['title'];
|
@ -1,31 +0,0 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
checkRole(array('admin'));
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
editSettings($_POST);
|
||||
Redirect::page('settings-regional');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$L->g('Language and timezone');
|
@ -4,8 +4,6 @@
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// Main before POST
|
||||
// ============================================================================
|
||||
@ -15,8 +13,14 @@
|
||||
// ============================================================================
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
// Prevent non-administrators to change other users
|
||||
$username = $_POST['username'];
|
||||
if ($login->role()!=='admin') {
|
||||
$username = $login->username();
|
||||
}
|
||||
|
||||
if (changeUserPassword(array(
|
||||
'username'=>$_POST['username'],
|
||||
'username'=>$username,
|
||||
'newPassword'=>$_POST['newPassword'],
|
||||
'confirmPassword'=>$_POST['confirmPassword']
|
||||
))) {
|
||||
|
62
bl-kernel/admin/themes/booty/css/bludit.bootstrap.css
Normal file
@ -0,0 +1,62 @@
|
||||
a {
|
||||
color: #0078D4;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #003f6f;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.bg-success {
|
||||
background-color: #8BC34A!important;
|
||||
}
|
||||
|
||||
.text-primary {
|
||||
color: #0078D4!important;
|
||||
}
|
||||
|
||||
.text-danger {
|
||||
color: #D40000!important;
|
||||
}
|
||||
a.text-danger:focus,
|
||||
a.text-danger:hover {
|
||||
color: #790000!important;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #0078D4;
|
||||
border-color: #0078D4;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #4585CF;
|
||||
border-color: #4a90e2;
|
||||
}
|
||||
|
||||
.btn-light.focus, .btn-light:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.btn.focus, .btn:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Form */
|
||||
.form-control:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
.table-striped tbody tr:nth-of-type(odd) {
|
||||
background-color: rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.table thead th {
|
||||
font-size: 0.8em;
|
||||
text-transform: uppercase!important;
|
||||
}
|
@ -9,6 +9,54 @@ body {
|
||||
background: #fcfcfc;
|
||||
}
|
||||
|
||||
/* Prevent events in iframes */
|
||||
/* iframe{
|
||||
pointer-events: none;
|
||||
} */
|
||||
|
||||
/*
|
||||
ICONS
|
||||
*/
|
||||
.fa {
|
||||
padding-right: 2px;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
/*
|
||||
SIDEBAR
|
||||
*/
|
||||
|
||||
div.sidebar .nav-item a {
|
||||
padding-left:0;
|
||||
padding-right:0;
|
||||
color: #555;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
div.sidebar .nav-item a:hover {
|
||||
color: #0078D4;
|
||||
}
|
||||
|
||||
div.sidebar .nav-item h4 {
|
||||
font-size: 1.2em;
|
||||
text-transform: uppercase;
|
||||
font-weight: 400;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/*
|
||||
AUTOCOMPLETE SEARCH
|
||||
*/
|
||||
.search-suggestion {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.search-suggestion-options {
|
||||
font-size: 0.9em;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
/*
|
||||
BOOTSTRAP Hacks
|
||||
*/
|
||||
@ -29,27 +77,8 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: #4a90e2;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #4a90e2;
|
||||
}
|
||||
|
||||
.btn {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #4F93E0;
|
||||
border-color: #4a90e2;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #4585CF;
|
||||
border-color: #4a90e2;
|
||||
}
|
||||
|
||||
.btn-light {
|
||||
color: #212529;
|
||||
@ -69,6 +98,8 @@ a:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
code {
|
||||
padding: 3px 5px 2px;
|
||||
margin: 0 1px;
|
||||
@ -188,34 +219,7 @@ body.login {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/*
|
||||
SIDEBAR
|
||||
*/
|
||||
|
||||
div.sidebar .nav-item a {
|
||||
padding-left:0;
|
||||
padding-right:0;
|
||||
color: #777;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
div.sidebar .nav-item a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.sidebar .nav-item h4 {
|
||||
font-size: 1.3em;
|
||||
text-transform: uppercase;
|
||||
font-weight: 400;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.sidebar .nav-item span.oi {
|
||||
color: #000;
|
||||
font-size: 0.8em;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
/*
|
||||
PLUGINS
|
||||
@ -271,7 +275,7 @@ td.child {
|
||||
padding: 10px 5% !important;
|
||||
font-size: 16px;
|
||||
line-height: 1.5em;
|
||||
|
||||
border: 1px solid #ced4da;
|
||||
}
|
||||
|
||||
#jseditorSidebar {
|
||||
@ -303,6 +307,13 @@ td.child {
|
||||
#jseditorToolbarRight button span {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.contentTools .btn {
|
||||
font-size: 0px !important;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.contentTools .btn span {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
}
|
||||
|
||||
#jseditorSidebar nav {
|
||||
@ -329,14 +340,25 @@ td.child {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: rgba(255,255,255,0.7);
|
||||
background-color: rgba(72,72,72,0.7);
|
||||
z-index: 10;
|
||||
display: none;
|
||||
}
|
||||
|
||||
img.profilePicture {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 30px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
/* Switch button */
|
||||
.switch-button {
|
||||
font-size: 0.9em;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.switch-icon-publish {
|
||||
color: #1cb11c;
|
||||
}
|
||||
|
@ -1,543 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<!--
|
||||
2014-7-1: Created.
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014
|
||||
By P.J. Onori
|
||||
Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net)
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="open-iconic" horiz-adv-x="800" >
|
||||
<font-face
|
||||
font-family="Icons"
|
||||
font-weight="400"
|
||||
font-stretch="normal"
|
||||
units-per-em="800"
|
||||
panose-1="2 0 5 3 0 0 0 0 0 0"
|
||||
ascent="800"
|
||||
descent="0"
|
||||
bbox="-0.5 -101 802 800.126"
|
||||
underline-thickness="50"
|
||||
underline-position="-100"
|
||||
unicode-range="U+E000-E0DE"
|
||||
/>
|
||||
<missing-glyph />
|
||||
<glyph glyph-name="" unicode=""
|
||||
d="M300 700h500v-700h-500v100h400v500h-400v100zM400 500l200 -150l-200 -150v100h-400v100h400v100z" />
|
||||
<glyph glyph-name="1" unicode=""
|
||||
d="M300 700h500v-700h-500v100h400v500h-400v100zM200 500v-100h400v-100h-400v-100l-200 150z" />
|
||||
<glyph glyph-name="2" unicode=""
|
||||
d="M350 700c193 0 350 -157 350 -350v-50h100l-200 -200l-200 200h100v50c0 138 -112 250 -250 250s-250 -112 -250 -250c0 193 157 350 350 350z" />
|
||||
<glyph glyph-name="3" unicode=""
|
||||
d="M450 700c193 0 350 -157 350 -350c0 138 -112 250 -250 250s-250 -112 -250 -250v-50h100l-200 -200l-200 200h100v50c0 193 157 350 350 350z" />
|
||||
<glyph glyph-name="4" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM100 500h600v-100h-600v100zM0 300h800v-100h-800v100zM100 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="5" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 500h600v-100h-600v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="6" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM200 500h600v-100h-600v100zM0 300h800v-100h-800v100zM200 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="7" unicode=""
|
||||
d="M400 700c75 0 146 -23 206 -59l-75 -225l-322 234c57 31 122 50 191 50zM125 588l191 -138l-310 -222c-4 24 -6 47 -6 72c0 114 49 215 125 288zM688 575c69 -72 112 -168 112 -275c0 -35 -8 -68 -16 -100h-218zM216 253l112 -347c-128 23 -232 109 -287 222zM372 100
|
||||
h372c-64 -109 -177 -185 -310 -197z" />
|
||||
<glyph glyph-name="8" unicode="" horiz-adv-x="600"
|
||||
d="M200 800h100v-500h200l-247 -300l-253 300h200v500z" />
|
||||
<glyph glyph-name="9" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM300 700v-300h-200l300 -300l300 300h-200v300h-200z" />
|
||||
<glyph glyph-name="a" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700l-300 -300l300 -300v200h300v200h-300v200z" />
|
||||
<glyph glyph-name="b" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700v-200h-300v-200h300v-200l300 300z" />
|
||||
<glyph glyph-name="c" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700l-300 -300h200v-300h200v300h200z" />
|
||||
<glyph glyph-name="d" unicode=""
|
||||
d="M300 600v-200h500v-100h-500v-200l-300 247z" />
|
||||
<glyph glyph-name="e" unicode=""
|
||||
d="M500 600l300 -247l-300 -253v200h-500v100h500v200z" />
|
||||
<glyph glyph-name="f" unicode="" horiz-adv-x="600"
|
||||
d="M200 800h200v-500h200l-297 -300l-303 300h200v500z" />
|
||||
<glyph glyph-name="10" unicode=""
|
||||
d="M300 700v-200h500v-200h-500v-200l-300 297z" />
|
||||
<glyph glyph-name="11" unicode=""
|
||||
d="M500 700l300 -297l-300 -303v200h-500v200h500v200z" />
|
||||
<glyph glyph-name="12" unicode="" horiz-adv-x="600"
|
||||
d="M297 800l303 -300h-200v-500h-200v500h-200z" />
|
||||
<glyph glyph-name="13" unicode="" horiz-adv-x="600"
|
||||
d="M247 800l253 -300h-200v-500h-100v500h-200z" />
|
||||
<glyph glyph-name="14" unicode=""
|
||||
d="M400 800h100v-800h-100v800zM200 700h100v-600h-100v600zM600 600h100v-400h-100v400zM0 500h100v-200h-100v200z" />
|
||||
<glyph glyph-name="15" unicode=""
|
||||
d="M116 600l72 -72c-54 -54 -88 -126 -88 -209s34 -159 88 -213l-72 -72c-72 72 -116 175 -116 285s44 209 116 281zM684 600c72 -72 116 -171 116 -281s-44 -213 -116 -285l-72 72c54 54 88 130 88 213s-34 155 -88 209zM259 460l69 -72c-18 -18 -28 -41 -28 -69
|
||||
s10 -54 28 -72l-69 -72c-36 36 -59 89 -59 144s23 105 59 141zM541 459c36 -36 59 -85 59 -140s-23 -108 -59 -144l-69 72c18 18 28 44 28 72s-10 51 -28 69z" />
|
||||
<glyph glyph-name="16" unicode="" horiz-adv-x="400"
|
||||
d="M200 800c110 0 200 -90 200 -200s-90 -200 -200 -200s-200 90 -200 200s90 200 200 200zM100 319c31 -11 65 -19 100 -19s68 8 100 19v-319l-100 100l-100 -100v319z" />
|
||||
<glyph glyph-name="17" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300c0 -66 21 -126 56 -175l419 419c-49 35 -109 56 -175 56zM644 575l-419 -419c49 -35 109 -56 175 -56c166 0 300 134 300 300
|
||||
c0 66 -21 126 -56 175z" />
|
||||
<glyph glyph-name="18" unicode=""
|
||||
d="M0 700h100v-600h700v-100h-800v700zM500 700h200v-500h-200v500zM200 500h200v-300h-200v300z" />
|
||||
<glyph glyph-name="19" unicode=""
|
||||
d="M397 800c13 1 23 -4 34 -13c2 -2 214 -254 241 -287h128v-100h-100v-366c0 -18 -16 -34 -34 -34h-532c-18 0 -34 16 -34 34v366h-100v100h128l234 281c9 11 22 18 35 19zM400 672l-144 -172h288zM250 300c-28 0 -50 -22 -50 -50v-100c0 -28 22 -50 50 -50s50 22 50 50
|
||||
v100c0 28 -22 50 -50 50zM550 300c-28 0 -50 -22 -50 -50v-100c0 -28 22 -50 50 -50s50 22 50 50v100c0 28 -22 50 -50 50z" />
|
||||
<glyph glyph-name="1a" unicode=""
|
||||
d="M9 700h682c6 0 9 -4 9 -10v-190h100v-200h-100v-191c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v582c0 6 3 9 9 9zM100 600v-400h500v400h-500z" />
|
||||
<glyph glyph-name="1b" unicode=""
|
||||
d="M9 700h682c6 0 9 -4 9 -10v-190h100v-200h-100v-191c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v582c0 6 3 9 9 9z" />
|
||||
<glyph glyph-name="1c" unicode=""
|
||||
d="M92 650c0 23 19 50 45 50h3h5h5h500c28 0 50 -22 50 -50s-22 -50 -50 -50h-50v-141c9 -17 120 -231 166 -309c16 -26 34 -61 34 -106c0 -39 -15 -77 -41 -103h-3c-26 -25 -62 -41 -100 -41h-512c-39 0 -77 15 -103 41s-41 64 -41 103c0 46 18 80 34 106
|
||||
c46 78 157 292 166 309v141h-50c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51zM500 600h-200v-162l-6 -10s-63 -123 -119 -228h450c-56 105 -119 228 -119 228l-6 10v162z" />
|
||||
<glyph glyph-name="1d" unicode=""
|
||||
d="M400 800c110 0 200 -90 200 -200c0 -104 52 -198 134 -266c41 -34 66 -82 66 -134h-800c0 52 25 100 66 134c82 68 134 162 134 266c0 110 90 200 200 200zM300 100h200c0 -55 -45 -100 -100 -100s-100 45 -100 100z" />
|
||||
<glyph glyph-name="1e" unicode="" horiz-adv-x="600"
|
||||
d="M150 800h50l350 -250l-225 -147l225 -153l-350 -250h-50v250l-75 -75l-75 75l150 150l-150 150l75 75l75 -75v250zM250 650v-200l150 100zM250 350v-200l150 100z" />
|
||||
<glyph glyph-name="1f" unicode=""
|
||||
d="M0 800h500c110 0 200 -90 200 -200c0 -47 -17 -91 -44 -125c85 -40 144 -125 144 -225c0 -138 -112 -250 -250 -250h-550v100c55 0 100 45 100 100v400c0 55 -45 100 -100 100v100zM300 700v-200h100c55 0 100 45 100 100s-45 100 -100 100h-100zM300 400v-300h150
|
||||
c83 0 150 67 150 150s-67 150 -150 150h-150z" />
|
||||
<glyph glyph-name="20" unicode="" horiz-adv-x="600"
|
||||
d="M300 800v-300h200l-300 -500v300h-200z" />
|
||||
<glyph glyph-name="21" unicode=""
|
||||
d="M100 800h300v-300l100 100l100 -100v300h50c28 0 50 -22 50 -50v-550h-550c-28 0 -50 -22 -50 -50s22 -50 50 -50h550v-100h-550c-83 0 -150 67 -150 150v550l3 19c8 39 39 70 78 78z" />
|
||||
<glyph glyph-name="22" unicode="" horiz-adv-x="400"
|
||||
d="M0 800h400v-800l-200 200l-200 -200v800z" />
|
||||
<glyph glyph-name="23" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM0 600h300v-103h203v103h297v-591c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v591z" />
|
||||
<glyph glyph-name="24" unicode=""
|
||||
d="M300 800h200c55 0 100 -45 100 -100v-100h191c6 0 9 -3 9 -9v-241c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v241c0 6 3 9 9 9h191v100c0 55 45 100 100 100zM300 700v-100h200v100h-200zM0 209c16 -6 32 -9 50 -9h700c18 0 34 3 50 9v-200c0 -6 -3 -9 -9 -9h-782
|
||||
c-6 0 -9 3 -9 9v200z" />
|
||||
<glyph glyph-name="25" unicode="" horiz-adv-x="600"
|
||||
d="M300 800c58 0 110 -16 147 -53s53 -89 53 -147h-100c0 39 -11 61 -25 75s-36 25 -75 25c-35 0 -55 -10 -72 -31s-28 -55 -28 -94c0 -51 20 -107 28 -175h172v-100h-178c-14 -60 -49 -127 -113 -200h491v-100h-600v122l16 12c69 69 95 121 106 166h-122v100h125
|
||||
c-8 50 -25 106 -25 175c0 58 16 114 50 156c34 43 88 69 150 69z" />
|
||||
<glyph glyph-name="26" unicode=""
|
||||
d="M34 700h4h3h4h5h700c28 0 50 -22 50 -50v-700c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v700v2c0 20 15 42 34 48zM150 600c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50zM350 600c-28 0 -50 -22 -50 -50s22 -50 50 -50h300c28 0 50 22 50 50
|
||||
s-22 50 -50 50h-300zM100 400v-400h600v400h-600z" />
|
||||
<glyph glyph-name="27" unicode=""
|
||||
d="M744 797l6 -3l44 -44c4 -4 3 -8 0 -12l-266 -375l-15 -13l-25 -12c-23 72 -78 127 -150 150l12 25l13 15l375 266zM266 400c74 0 134 -60 134 -134c0 -147 -119 -266 -266 -266c-48 0 -95 12 -134 34c80 46 134 133 134 232c0 74 58 134 132 134z" />
|
||||
<glyph glyph-name="28" unicode=""
|
||||
d="M9 451c0 23 19 50 46 50c8 0 19 -3 26 -7l131 -66l29 22c-79 81 -1 250 118 250s197 -167 119 -250l28 -22l131 66c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-115 -56c9 -16 19 -33 25 -50h68c28 0 50 -22 50 -50s-22 -50 -50 -50h-50
|
||||
c0 -23 -2 -45 -6 -66l78 -40c21 -5 37 -28 37 -49c0 -28 -22 -50 -50 -50c-10 0 -23 5 -31 11l-65 35c-24 -46 -62 -86 -103 -110c-35 19 -60 45 -60 72v135v4v5v6v5v5v87c0 28 -22 50 -50 50c-24 0 -45 -17 -50 -40c1 -3 1 -8 1 -11s0 -8 -1 -11v-82v-4v-5v-144
|
||||
c0 -28 -24 -53 -59 -72c-41 25 -79 64 -103 110l-66 -35c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50c0 21 16 44 37 49l78 40c-4 21 -6 43 -6 66h-50h-5c-28 0 -50 22 -50 50c0 26 22 50 50 50h5h69c6 17 16 34 25 50l-116 56c-16 7 -28 27 -28 45z" />
|
||||
<glyph glyph-name="29" unicode=""
|
||||
d="M600 700h91c6 0 9 -3 9 -9v-582c0 -6 -3 -9 -9 -9h-91v600zM210 503l290 147v-500l-250 125v-3c-15 0 -25 -8 -28 -22l75 -178c11 -25 0 -58 -25 -69s-58 0 -69 25l-103 272h-91c-6 0 -9 3 -9 9v182c0 6 3 9 9 9h182z" />
|
||||
<glyph glyph-name="2a" unicode=""
|
||||
d="M9 800h682c6 0 9 -3 9 -9v-782c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v782c0 6 3 9 9 9zM100 700v-200h500v200h-500zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400v-300h100v300h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100z" />
|
||||
<glyph glyph-name="2b" unicode=""
|
||||
d="M0 800h700v-200h-700v200zM0 500h700v-491c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v491zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100z" />
|
||||
<glyph glyph-name="2c" unicode=""
|
||||
d="M409 800h182c6 0 10 -4 12 -9l94 -182c2 -5 6 -9 12 -9h82c6 0 9 -3 9 -9v-582c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v441c0 83 67 150 150 150h141c6 0 10 4 12 9l94 182c2 5 6 9 12 9zM150 500c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z
|
||||
M500 500c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200zM500 400c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
|
||||
<glyph glyph-name="2d" unicode=""
|
||||
d="M0 600h800l-400 -400z" />
|
||||
<glyph glyph-name="2e" unicode="" horiz-adv-x="400"
|
||||
d="M400 800v-800l-400 400z" />
|
||||
<glyph glyph-name="2f" unicode="" horiz-adv-x="400"
|
||||
d="M0 800l400 -400l-400 -400v800z" />
|
||||
<glyph glyph-name="30" unicode=""
|
||||
d="M400 600l400 -400h-800z" />
|
||||
<glyph glyph-name="31" unicode=""
|
||||
d="M0 550c0 23 20 50 46 50h3h5h4h200c17 0 37 -13 44 -28l38 -72h444c14 0 19 -12 15 -25l-81 -250c-4 -13 -21 -25 -35 -25h-350c-14 0 -30 12 -34 25c-27 83 -54 167 -81 250l-10 25h-150c-2 0 -5 -1 -7 -1c-28 0 -51 23 -51 51zM358 100c28 0 50 -22 50 -50
|
||||
s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM658 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
|
||||
<glyph glyph-name="32" unicode=""
|
||||
d="M0 700h500v-100h-300v-300h-100l-100 -100v500zM300 500h500v-500l-100 100h-400v400z" />
|
||||
<glyph glyph-name="33" unicode=""
|
||||
d="M641 700l143 -141l-493 -493c-71 76 -146 148 -219 222l-72 71l141 141c50 -51 101 -101 153 -150c116 117 234 231 347 350z" />
|
||||
<glyph glyph-name="34" unicode=""
|
||||
d="M150 600l250 -250l250 250l150 -150l-400 -400l-400 400z" />
|
||||
<glyph glyph-name="35" unicode="" horiz-adv-x="600"
|
||||
d="M400 800l150 -150l-250 -250l250 -250l-150 -150l-400 400z" />
|
||||
<glyph glyph-name="36" unicode="" horiz-adv-x="600"
|
||||
d="M150 800l400 -400l-400 -400l-150 150l250 250l-250 250z" />
|
||||
<glyph glyph-name="37" unicode=""
|
||||
d="M400 600l400 -400l-150 -150l-250 250l-250 -250l-150 150z" />
|
||||
<glyph glyph-name="38" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM600 622l-250 -250l-100 100l-72 -72l172 -172l322 322z" />
|
||||
<glyph glyph-name="39" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM250 622l-72 -72l150 -150l-150 -150l72 -72l150 150l150 -150l72 72l-150 150l150 150l-72 72l-150 -150z" />
|
||||
<glyph glyph-name="3a" unicode=""
|
||||
d="M350 800c28 0 50 -22 50 -50v-50h75c14 0 25 -11 25 -25v-75h-300v75c0 14 11 25 25 25h75v50c0 28 22 50 50 50zM25 700h75v-200h500v200h75c14 0 25 -11 25 -25v-650c0 -14 -11 -25 -25 -25h-650c-14 0 -25 11 -25 25v650c0 14 11 25 25 25z" />
|
||||
<glyph glyph-name="3b" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM350 600h100v-181c23 -24 47 -47 72 -69l-72 -72c-27 30 -55 59 -84 88l-16 12
|
||||
v222z" />
|
||||
<glyph glyph-name="3c" unicode=""
|
||||
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -18 -3 -34 -9 -50h-191v50c0 83 -67 150 -150 150s-150 -67 -150 -150v-50h-272c-17 30 -28 63 -28 100c0 110 90 200 200 200c23 114 129 200 250 200zM434 400h3h4c3 0 6 1 9 1c28 0 50 -22 50 -50v-1
|
||||
v-150h150l-200 -200l-200 200h150v150v2c0 20 15 42 34 48z" />
|
||||
<glyph glyph-name="3d" unicode=""
|
||||
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -18 -3 -34 -9 -50h-141l-200 200l-200 -200h-222c-17 30 -28 63 -28 100c0 110 90 200 200 200c23 114 129 200 250 200zM450 350l250 -250h-200v-50c0 -28 -22 -50 -50 -50s-50 22 -50 50v50h-200z" />
|
||||
<glyph glyph-name="3e" unicode=""
|
||||
d="M450 700c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -83 -67 -150 -150 -150h-450c-110 0 -200 90 -200 200s90 200 200 200c23 114 129 200 250 200z" />
|
||||
<glyph glyph-name="3f" unicode=""
|
||||
d="M250 800c82 0 154 -40 200 -100c-143 0 -270 -85 -325 -209c-36 -10 -70 -25 -100 -47c-16 33 -25 67 -25 106c0 138 112 250 250 250zM450 600c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -83 -67 -150 -150 -150h-450c-110 0 -200 90 -200 200
|
||||
s90 200 200 200c23 114 129 200 250 200z" />
|
||||
<glyph glyph-name="40" unicode=""
|
||||
d="M500 700h100l-300 -600h-100zM100 600h100l-100 -200l100 -200h-100l-100 200zM600 600h100l100 -200l-100 -200h-100l100 200z" />
|
||||
<glyph glyph-name="41" unicode=""
|
||||
d="M350 800h100l50 -119l28 -12l119 50l72 -72l-50 -119l12 -28l119 -50v-100l-119 -50l-12 -28l50 -119l-72 -72l-119 50l-28 -12l-50 -119h-100l-50 119l-28 12l-119 -50l-72 72l50 119l-12 28l-119 50v100l119 50l12 28l-50 119l72 72l119 -50l28 12zM400 550
|
||||
c-83 0 -150 -67 -150 -150s67 -150 150 -150s150 67 150 150s-67 150 -150 150z" />
|
||||
<glyph glyph-name="42" unicode=""
|
||||
d="M0 800h800v-200h-800v200zM200 500h400l-200 -200zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="43" unicode=""
|
||||
d="M0 800h100v-800h-100v800zM600 800h200v-800h-200v800zM500 600v-400l-200 200z" />
|
||||
<glyph glyph-name="44" unicode=""
|
||||
d="M0 800h200v-800h-200v800zM700 800h100v-800h-100v800zM300 600l200 -200l-200 -200v400z" />
|
||||
<glyph glyph-name="45" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM400 500l200 -200h-400zM0 200h800v-200h-800v200z" />
|
||||
<glyph glyph-name="46" unicode=""
|
||||
d="M150 700c83 0 150 -67 150 -150v-50h100v50c0 83 67 150 150 150s150 -67 150 -150s-67 -150 -150 -150h-50v-100h50c83 0 150 -67 150 -150s-67 -150 -150 -150s-150 67 -150 150v50h-100v-50c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150h50v100h-50
|
||||
c-83 0 -150 67 -150 150s67 150 150 150zM150 600c-28 0 -50 -22 -50 -50s22 -50 50 -50h50v50c0 28 -22 50 -50 50zM550 600c-28 0 -50 -22 -50 -50v-50h50c28 0 50 22 50 50s-22 50 -50 50zM300 400v-100h100v100h-100zM150 200c-28 0 -50 -22 -50 -50s22 -50 50 -50
|
||||
s50 22 50 50v50h-50zM500 200v-50c0 -28 22 -50 50 -50s50 22 50 50s-22 50 -50 50h-50z" />
|
||||
<glyph glyph-name="47" unicode=""
|
||||
d="M0 791c0 5 4 9 9 9h782c6 0 9 -4 9 -10v-790l-200 200h-591c-6 0 -9 3 -9 9v582z" />
|
||||
<glyph glyph-name="48" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM600 600l-100 -300l-300 -100l100 300zM400 450c-28 0 -50 -22 -50 -50
|
||||
s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="49" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700v-600c166 0 300 134 300 300s-134 300 -300 300z" />
|
||||
<glyph glyph-name="4a" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM0 600h500v-100h-500v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100zM750 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
|
||||
<glyph glyph-name="4b" unicode=""
|
||||
d="M25 700h750c14 0 25 -11 25 -25v-75h-800v75c0 14 11 25 25 25zM0 500h800v-375c0 -14 -11 -25 -25 -25h-750c-14 0 -25 11 -25 25v375zM100 300v-100h100v100h-100zM300 300v-100h100v100h-100z" />
|
||||
<glyph glyph-name="4c" unicode=""
|
||||
d="M100 800h100v-100h450l100 100l50 -50l-100 -100v-450h100v-100h-100v-100h-100v100h-500v500h-100v100h100v100zM200 600v-350l350 350h-350zM600 550l-350 -350h350v350z" />
|
||||
<glyph glyph-name="4d" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM400 600c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z
|
||||
M200 452c0 20 15 42 34 48h3h3h8c12 0 28 -7 36 -16l91 -90l25 6c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100l6 25l-90 91c-9 8 -16 24 -16 36zM550 500c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
|
||||
<glyph glyph-name="4e" unicode=""
|
||||
d="M300 800h200v-300h200l-300 -300l-300 300h200v300zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="4f" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM400 600l300 -300h-200v-300h-200v300h-200z" />
|
||||
<glyph glyph-name="50" unicode=""
|
||||
d="M200 700h600v-600h-600l-200 300zM350 622l-72 -72l150 -150l-150 -150l72 -72l150 150l150 -150l72 72l-150 150l150 150l-72 72l-150 -150z" />
|
||||
<glyph glyph-name="51" unicode=""
|
||||
d="M400 700c220 0 400 -180 400 -400h-100c0 166 -134 300 -300 300s-300 -134 -300 -300h-100c0 220 180 400 400 400zM341 491l59 -88l59 88c81 -25 141 -101 141 -191c0 -110 -90 -200 -200 -200s-200 90 -200 200c0 90 60 166 141 191z" />
|
||||
<glyph glyph-name="52" unicode=""
|
||||
d="M0 800h300v-400h400v-400h-700v800zM400 800l300 -300h-300v300zM100 600v-100h100v100h-100zM100 400v-100h100v100h-100zM100 200v-100h400v100h-400z" />
|
||||
<glyph glyph-name="53" unicode="" horiz-adv-x="600"
|
||||
d="M200 700h100v-100h75c30 0 58 -6 81 -22s44 -44 44 -78v-100h-100v94c-4 3 -13 6 -25 6h-250c-14 0 -25 -11 -25 -25v-50c0 -15 20 -40 34 -44l257 -65c66 -16 109 -73 109 -141v-50c0 -68 -57 -125 -125 -125h-75v-100h-100v100h-75c-30 0 -58 6 -81 22s-44 44 -44 78
|
||||
v100h100v-94c4 -3 13 -6 25 -6h250c14 0 25 11 25 25v50c0 15 -20 40 -34 44l-257 65c-66 16 -109 73 -109 141v50c0 68 57 125 125 125h75v100z" />
|
||||
<glyph glyph-name="54" unicode=""
|
||||
d="M0 700h300v-300l-300 -300v600zM500 700h300v-300l-300 -300v600z" />
|
||||
<glyph glyph-name="55" unicode=""
|
||||
d="M300 700v-600h-300v300zM800 700v-600h-300v300z" />
|
||||
<glyph glyph-name="56" unicode=""
|
||||
d="M300 700v-100c-111 0 -200 -89 -200 -200h200v-300h-300v300c0 165 135 300 300 300zM800 700v-100c-111 0 -200 -89 -200 -200h200v-300h-300v300c0 165 135 300 300 300z" />
|
||||
<glyph glyph-name="57" unicode=""
|
||||
d="M0 700h300v-300c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-200v300zM500 700h300v-300c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-200v300z" />
|
||||
<glyph glyph-name="58" unicode="" horiz-adv-x="600"
|
||||
d="M300 800l34 -34c11 -11 266 -270 266 -488c0 -165 -135 -300 -300 -300s-300 135 -300 300c0 218 255 477 266 488zM150 328c-28 0 -50 -22 -50 -50c0 -110 90 -200 200 -200c28 0 50 22 50 50s-22 50 -50 50c-55 0 -100 45 -100 100c0 28 -22 50 -50 50z" />
|
||||
<glyph glyph-name="59" unicode=""
|
||||
d="M400 800l400 -500h-800zM0 200h800v-200h-800v200z" />
|
||||
<glyph glyph-name="5a" unicode="" horiz-adv-x="600"
|
||||
d="M300 800l300 -300h-600zM0 300h600l-300 -300z" />
|
||||
<glyph glyph-name="5b" unicode=""
|
||||
d="M0 500h200v-200h-200v200zM300 500h200v-200h-200v200zM600 500h200v-200h-200v200z" />
|
||||
<glyph glyph-name="5c" unicode=""
|
||||
d="M0 700h800v-100l-400 -200l-400 200v100zM0 500l400 -200l400 200v-400h-800v400z" />
|
||||
<glyph glyph-name="5d" unicode=""
|
||||
d="M400 800l400 -200v-600h-800v600zM400 688l-300 -150v-188l300 -150l300 150v188zM200 500h400v-100l-200 -100l-200 100v100z" />
|
||||
<glyph glyph-name="5e" unicode=""
|
||||
d="M600 700c69 0 134 -19 191 -50l-16 -106c-49 35 -109 56 -175 56c-131 0 -240 -84 -281 -200h331l-16 -100h-334c0 -36 8 -68 19 -100h297l-16 -100h-222c55 -61 133 -100 222 -100c78 0 147 30 200 78v-122c-59 -35 -127 -56 -200 -56c-147 0 -274 82 -344 200h-256
|
||||
l19 100h197c-8 32 -16 66 -16 100h-200l25 100h191c45 172 198 300 384 300z" />
|
||||
<glyph glyph-name="5f" unicode=""
|
||||
d="M0 700h700v-100h-700v100zM0 500h500v-100h-500v100zM0 300h800v-100h-800v100zM0 100h100v-100h-100v100zM200 100h100v-100h-100v100zM400 100h100v-100h-100v100z" />
|
||||
<glyph glyph-name="60" unicode=""
|
||||
d="M0 800h800v-100h-800v100zM200 600h400l-200 -200zM0 200h800v-200h-800v200z" />
|
||||
<glyph glyph-name="61" unicode=""
|
||||
d="M0 800h100v-800h-100v800zM600 800h200v-800h-200v800zM200 600l200 -200l-200 -200v400z" />
|
||||
<glyph glyph-name="62" unicode=""
|
||||
d="M0 800h200v-800h-200v800zM700 800h100v-800h-100v800zM600 600v-400l-200 200z" />
|
||||
<glyph glyph-name="63" unicode=""
|
||||
d="M0 800h800v-200h-800v200zM400 400l200 -200h-400zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="64" unicode=""
|
||||
d="M0 800h200v-100h-100v-600h600v100h100v-200h-800v800zM400 800h400v-400l-150 150l-250 -250l-100 100l250 250z" />
|
||||
<glyph glyph-name="65" unicode=""
|
||||
d="M403 700c247 0 397 -300 397 -300s-150 -300 -397 -300c-253 0 -403 300 -403 300s150 300 403 300zM400 600c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200zM400 500c10 0 19 -3 28 -6c-16 -8 -28 -24 -28 -44c0 -28 22 -50 50 -50
|
||||
c20 0 36 12 44 28c3 -9 6 -18 6 -28c0 -55 -45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
|
||||
<glyph glyph-name="66" unicode="" horiz-adv-x="900"
|
||||
d="M331 700h3h3c3 1 7 1 10 1c12 0 29 -8 37 -17l94 -93l66 65c57 57 155 57 212 0c58 -58 58 -154 0 -212l-65 -66l93 -94c10 -8 18 -25 18 -38c0 -28 -22 -50 -50 -50c-13 0 -32 9 -40 20l-62 65l-381 -381h-269v272l375 381l-63 63c-9 8 -16 24 -16 36c0 20 16 42 35 48z
|
||||
M447 481l-313 -315l128 -132l316 316z" />
|
||||
<glyph glyph-name="67" unicode=""
|
||||
d="M0 800h300v-400h400v-400h-700v800zM400 800l300 -300h-300v300z" />
|
||||
<glyph glyph-name="68" unicode=""
|
||||
d="M200 800c0 0 200 -100 200 -300s-298 -302 -200 -500c0 0 -200 100 -200 300s300 300 200 500zM500 500c0 0 200 -100 200 -300c0 -150 -60 -200 -100 -200h-300c0 200 300 300 200 500z" />
|
||||
<glyph glyph-name="69" unicode=""
|
||||
d="M0 800h100v-800h-100v800zM200 800h300v-100h300l-200 -203l200 -197h-400v100h-200v400z" />
|
||||
<glyph glyph-name="6a" unicode="" horiz-adv-x="400"
|
||||
d="M150 800h150l-100 -200h200l-150 -300h150l-300 -300l-100 300h134l66 200h-200z" />
|
||||
<glyph glyph-name="6b" unicode=""
|
||||
d="M0 800h300v-100h500v-100h-800v200zM0 500h800v-450c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v450z" />
|
||||
<glyph glyph-name="6c" unicode=""
|
||||
d="M150 800c83 0 150 -67 150 -150c0 -66 -41 -121 -100 -141v-118c15 5 33 9 50 9h200c28 0 50 22 50 50v59c-59 20 -100 75 -100 141c0 83 67 150 150 150s150 -67 150 -150c0 -66 -41 -121 -100 -141v-59c0 -82 -68 -150 -150 -150h-200c-14 0 -25 -7 -34 -16
|
||||
c50 -24 84 -74 84 -134c0 -83 -67 -150 -150 -150s-150 67 -150 150c0 66 41 121 100 141v218c-59 20 -100 75 -100 141c0 83 67 150 150 150z" />
|
||||
<glyph glyph-name="6d" unicode=""
|
||||
d="M0 800h400l-150 -150l150 -150l-100 -100l-150 150l-150 -150v400zM500 400l150 -150l150 150v-400h-400l150 150l-150 150z" />
|
||||
<glyph glyph-name="6e" unicode=""
|
||||
d="M100 800l150 -150l150 150v-400h-400l150 150l-150 150zM400 400h400l-150 -150l150 -150l-100 -100l-150 150l-150 -150v400z" />
|
||||
<glyph glyph-name="6f" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM400 700c-56 0 -108 -17 -153 -44l22 -19c33 -18 13 -48 -13 -59c-30 -13 -77 10 -65 -41c13 -55 -27 -3 -47 -15c-42 -26 49 -152 31 -156l-59 34c-8 0 -13 -5 -16 -10
|
||||
c1 -30 10 -57 19 -84c28 -11 77 -2 100 -25c47 -28 97 -115 75 -159c34 -13 68 -22 106 -22c101 0 193 48 247 125c3 24 -8 44 -50 44c-69 0 -156 13 -153 97c2 46 101 108 66 143c-30 30 12 39 12 66c0 37 -65 32 -69 50s20 36 41 56c-30 10 -60 19 -94 19zM631 591
|
||||
c-38 -11 -94 -35 -87 -53c6 -15 52 -1 65 -13c11 -10 16 -59 44 -31l22 22v3c-11 26 -26 50 -44 72z" />
|
||||
<glyph glyph-name="70" unicode=""
|
||||
d="M703 800l97 -100l-400 -400l-100 100l-200 -203l-100 100l300 303l100 -100zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="71" unicode=""
|
||||
d="M0 700h100v-100h-100v100zM200 700h100v-100h-100v100zM400 700h100v-100h-100v100zM600 700h100v-100h-100v100zM0 500h100v-100h-100v100zM200 500h100v-100h-100v100zM400 500h100v-100h-100v100zM600 500h100v-100h-100v100zM0 300h100v-100h-100v100zM200 300h100
|
||||
v-100h-100v100zM400 300h100v-100h-100v100zM600 300h100v-100h-100v100zM0 100h100v-100h-100v100zM200 100h100v-100h-100v100zM400 100h100v-100h-100v100zM600 100h100v-100h-100v100z" />
|
||||
<glyph glyph-name="72" unicode=""
|
||||
d="M0 800h200v-200h-200v200zM300 800h200v-200h-200v200zM600 800h200v-200h-200v200zM0 500h200v-200h-200v200zM300 500h200v-200h-200v200zM600 500h200v-200h-200v200zM0 200h200v-200h-200v200zM300 200h200v-200h-200v200zM600 200h200v-200h-200v200z" />
|
||||
<glyph glyph-name="73" unicode=""
|
||||
d="M0 800h300v-300h-300v300zM500 800h300v-300h-300v300zM0 300h300v-300h-300v300zM500 300h300v-300h-300v300z" />
|
||||
<glyph glyph-name="74" unicode=""
|
||||
d="M19 800h662c11 0 19 -8 19 -19v-331c0 -28 -22 -50 -50 -50h-600c-28 0 -50 22 -50 50v331c0 11 8 19 19 19zM0 309c16 -6 32 -9 50 -9h600c18 0 34 3 50 9v-290c0 -11 -8 -19 -19 -19h-662c-11 0 -19 8 -19 19v290zM550 200c-28 0 -50 -22 -50 -50s22 -50 50 -50
|
||||
s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="75" unicode=""
|
||||
d="M0 700h300v-100h-50c-28 0 -50 -22 -50 -50v-150h300v150c0 28 -22 50 -50 50h-50v100h300v-100h-50c-28 0 -50 -22 -50 -50v-400c0 -28 22 -50 50 -50h50v-100h-300v100h50c28 0 50 22 50 50v150h-300v-150c0 -28 22 -50 50 -50h50v-100h-300v100h50c28 0 50 22 50 50
|
||||
v400c0 28 -22 50 -50 50h-50v100z" />
|
||||
<glyph glyph-name="76" unicode=""
|
||||
d="M400 700c165 0 300 -135 300 -300v-100h50c28 0 50 -22 50 -50v-200c0 -28 -22 -50 -50 -50h-100c-28 0 -50 22 -50 50v350c0 111 -89 200 -200 200s-200 -89 -200 -200v-350c0 -28 -22 -50 -50 -50h-100c-28 0 -50 22 -50 50v200c0 28 22 50 50 50h50v100
|
||||
c0 165 135 300 300 300z" />
|
||||
<glyph glyph-name="77" unicode=""
|
||||
d="M0 500c0 109 91 200 200 200s200 -91 200 -200c0 109 91 200 200 200s200 -91 200 -200c0 -55 -23 -105 -59 -141l-341 -340l-341 340c-36 36 -59 86 -59 141z" />
|
||||
<glyph glyph-name="78" unicode=""
|
||||
d="M400 700l400 -300l-100 3v-403h-200v200h-200v-200h-200v400h-100z" />
|
||||
<glyph glyph-name="79" unicode=""
|
||||
d="M0 800h800v-800h-800v800zM100 700v-300l100 100l400 -400h100v100l-200 200l100 100l100 -100v300h-600z" />
|
||||
<glyph glyph-name="7a" unicode=""
|
||||
d="M19 800h762c11 0 19 -8 19 -19v-762c0 -11 -8 -19 -19 -19h-762c-11 0 -19 8 -19 19v762c0 11 8 19 19 19zM100 600v-300h100l100 -100h200l100 100h100v300h-600z" />
|
||||
<glyph glyph-name="7b" unicode=""
|
||||
d="M200 600c80 0 142 -56 200 -122c58 66 119 122 200 122c131 0 200 -101 200 -200s-69 -200 -200 -200c-81 0 -142 56 -200 122c-58 -66 -121 -122 -200 -122c-131 0 -200 101 -200 200s69 200 200 200zM200 500c-74 0 -100 -54 -100 -100s26 -100 100 -100
|
||||
c42 0 88 47 134 100c-46 53 -92 100 -134 100zM600 500c-43 0 -88 -47 -134 -100c46 -53 91 -100 134 -100c74 0 100 54 100 100s-26 100 -100 100z" />
|
||||
<glyph glyph-name="7c" unicode="" horiz-adv-x="400"
|
||||
d="M300 800c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100zM150 550c83 0 150 -69 150 -150c0 -66 -100 -214 -100 -250c0 -28 22 -50 50 -50s50 22 50 50h100c0 -83 -67 -150 -150 -150s-150 64 -150 150s100 222 100 250s-22 50 -50 50
|
||||
s-50 -22 -50 -50h-100c0 83 67 150 150 150z" />
|
||||
<glyph glyph-name="7d" unicode=""
|
||||
d="M200 800h500v-100h-122c-77 -197 -156 -392 -234 -588l-6 -12h162v-100h-500v100h122c77 197 156 392 234 588l7 12h-163v100z" />
|
||||
<glyph glyph-name="7e" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM100 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="7f" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM0 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="80" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 500h800v-100h-800v100zM0 300h800v-100h-800v100zM200 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="81" unicode=""
|
||||
d="M550 800c138 0 250 -112 250 -250s-112 -250 -250 -250c-16 0 -32 0 -47 3l-3 -3v-100h-200v-200h-300v200l303 303c-3 15 -3 31 -3 47c0 138 112 250 250 250zM600 700c-55 0 -100 -45 -100 -100s45 -100 100 -100s100 45 100 100s-45 100 -100 100z" />
|
||||
<glyph glyph-name="82" unicode=""
|
||||
d="M134 600h3h4h4h5h500c28 0 50 -22 50 -50v-350h100v-150c0 -28 -22 -50 -50 -50h-700c-28 0 -50 22 -50 50v150h100v350v2c0 20 15 42 34 48zM200 500v-300h100v-100h200v100h100v300h-400z" />
|
||||
<glyph glyph-name="83" unicode=""
|
||||
d="M0 800h400v-400h-400v400zM500 600h100v-400h-400v100h300v300zM700 400h100v-400h-400v100h300v300z" />
|
||||
<glyph glyph-name="84" unicode="" horiz-adv-x="600"
|
||||
d="M337 694c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-300 -150c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50c0 21 16 44 37 49zM437 544c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-400 -200c-8 -6 -21 -11 -31 -11c-28 0 -50 22 -50 50
|
||||
c0 21 16 44 37 49zM437 344c6 4 12 7 21 7c28 0 50 -22 50 -50c0 -17 -12 -37 -27 -45l-106 -56c24 -4 43 -26 43 -50c0 -28 -23 -51 -51 -51c-2 0 -6 1 -8 1h-200c-26 1 -48 24 -48 50c0 16 12 36 26 44zM151 -50c0 23 20 50 46 50h3h4h5h100c28 0 50 -22 50 -50
|
||||
s-22 -50 -50 -50h-100c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51z" />
|
||||
<glyph glyph-name="85" unicode=""
|
||||
d="M199 800h100v-200h-200v100h100v100zM586 797h1c18 1 38 1 56 -3c36 -8 69 -26 97 -54c78 -78 78 -203 0 -281l-150 -150c-8 -13 -28 -24 -43 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43l150 150c40 40 39 105 0 144c-41 41 -110 34 -144 0l-44 -44
|
||||
c-8 -13 -27 -24 -42 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43l43 44c32 33 72 53 128 56zM208 490c4 5 14 16 22 16h3c2 0 6 1 8 1c28 0 50 -22 50 -50c0 -11 -6 -27 -14 -35l-150 -150c-40 -40 -39 -105 0 -144c41 -41 110 -34 144 0l44 44c8 13 27 24 42 24
|
||||
c28 0 50 -22 50 -50c0 -15 -11 -35 -24 -43l-43 -44c-22 -22 -48 -37 -75 -47c-70 -25 -151 -9 -207 47c-78 78 -78 203 0 281zM499 200h200v-100h-100v-100h-100v200z" />
|
||||
<glyph glyph-name="86" unicode=""
|
||||
d="M586 797c18 1 39 1 57 -3c36 -8 69 -26 97 -54c78 -78 78 -203 0 -281l-150 -150c-62 -62 -132 -81 -182 -78s-69 17 -84 25s-26 27 -26 44c0 28 22 51 50 51c8 0 19 -3 26 -7c0 0 15 -11 41 -13s62 3 106 47l150 150c40 40 39 105 0 144c-41 41 -110 34 -144 0
|
||||
c-8 -13 -28 -24 -43 -24c-28 0 -50 22 -50 50c0 15 11 35 24 43c32 33 72 53 128 56zM386 566c50 -2 64 -17 85 -22s37 -28 37 -49c0 -28 -22 -50 -50 -50c-10 0 -23 5 -31 11c0 0 -19 9 -47 10s-63 -4 -103 -44l-150 -150c-40 -40 -39 -105 0 -144c41 -41 110 -34 144 0
|
||||
c8 13 27 24 42 24c28 0 50 -22 50 -50c0 -15 -10 -35 -23 -43c-22 -22 -48 -37 -75 -47c-70 -25 -151 -9 -207 47c-78 78 -78 203 0 281l150 150c60 60 128 78 178 76z" />
|
||||
<glyph glyph-name="87" unicode=""
|
||||
d="M0 700h300v-300h-300v300zM400 700h400v-100h-400v100zM400 500h300v-100h-300v100zM0 300h300v-300h-300v300zM400 300h400v-100h-400v100zM400 100h300v-100h-300v100z" />
|
||||
<glyph glyph-name="88" unicode=""
|
||||
d="M50 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 700h600v-100h-600v100zM50 500c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 500h600v-100h-600v100zM50 300c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50
|
||||
s22 50 50 50zM200 300h600v-100h-600v100zM50 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM200 100h600v-100h-600v100z" />
|
||||
<glyph glyph-name="89" unicode=""
|
||||
d="M800 800l-400 -800l-100 300l-300 100z" />
|
||||
<glyph glyph-name="8a" unicode="" horiz-adv-x="600"
|
||||
d="M300 700c110 0 200 -90 200 -200v-100h100v-400h-600v400h100v100c0 110 90 200 200 200zM300 600c-56 0 -100 -44 -100 -100v-100h200v100c0 56 -44 100 -100 100z" />
|
||||
<glyph glyph-name="8b" unicode="" horiz-adv-x="600"
|
||||
d="M300 800c110 0 200 -90 200 -200v-200h100v-400h-600v400h400v200c0 56 -44 100 -100 100s-100 -44 -100 -100h-100c0 110 90 200 200 200z" />
|
||||
<glyph glyph-name="8c" unicode=""
|
||||
d="M400 700v-100c-111 0 -200 -89 -200 -200h100l-150 -200l-150 200h100c0 165 135 300 300 300zM650 600l150 -200h-100c0 -165 -135 -300 -300 -300v100c111 0 200 89 200 200h-100z" />
|
||||
<glyph glyph-name="8d" unicode=""
|
||||
d="M100 800h600v-300h100l-150 -250l-150 250h100v200h-400v-100h-100v200zM150 550l150 -250h-100v-200h400v100h100v-200h-600v300h-100z" />
|
||||
<glyph glyph-name="8e" unicode=""
|
||||
d="M600 700l200 -150l-200 -150v100h-500v-100h-100v100c0 55 45 100 100 100h500v100zM200 300v-100h500v100h100v-100c0 -55 -45 -100 -100 -100h-500v-100l-200 150z" />
|
||||
<glyph glyph-name="8f" unicode="" horiz-adv-x="900"
|
||||
d="M350 800c193 0 350 -157 350 -350c0 -60 -17 -117 -44 -166c5 -3 12 -8 16 -12l100 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 100c-4 3 -9 9 -12 13c-49 -26 -107 -41 -166 -41c-193 0 -350 157 -350 350s157 350 350 350zM350 200
|
||||
c142 0 250 108 250 250c0 139 -111 250 -250 250s-250 -111 -250 -250s111 -250 250 -250z" />
|
||||
<glyph glyph-name="90" unicode="" horiz-adv-x="600"
|
||||
d="M300 800c166 0 300 -134 300 -300c0 -200 -300 -500 -300 -500s-300 300 -300 500c0 166 134 300 300 300zM300 700c-110 0 -200 -90 -200 -200s90 -200 200 -200s200 90 200 200s-90 200 -200 200z" />
|
||||
<glyph glyph-name="91" unicode="" horiz-adv-x="900"
|
||||
d="M0 800h800v-541c1 -3 1 -8 1 -11s0 -7 -1 -10v-238h-800v800zM495 250c0 26 22 50 50 50h5h150v400h-600v-600h600v100h-150h-5c-28 0 -50 22 -50 50zM350 600c83 0 150 -67 150 -150c0 -100 -150 -250 -150 -250s-150 150 -150 250c0 83 67 150 150 150zM350 500
|
||||
c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="92" unicode="" horiz-adv-x="600"
|
||||
d="M0 700h200v-600h-200v600zM400 700h200v-600h-200v600z" />
|
||||
<glyph glyph-name="93" unicode="" horiz-adv-x="600"
|
||||
d="M0 700l600 -300l-600 -300v600z" />
|
||||
<glyph glyph-name="94" unicode="" horiz-adv-x="600"
|
||||
d="M300 700c166 0 300 -134 300 -300s-134 -300 -300 -300s-300 134 -300 300s134 300 300 300z" />
|
||||
<glyph glyph-name="95" unicode=""
|
||||
d="M400 700v-600l-400 300zM400 400l400 300v-600z" />
|
||||
<glyph glyph-name="96" unicode=""
|
||||
d="M0 700l400 -300l-400 -300v600zM400 100v600l400 -300z" />
|
||||
<glyph glyph-name="97" unicode=""
|
||||
d="M0 700h200v-600h-200v600zM200 400l500 300v-600z" />
|
||||
<glyph glyph-name="98" unicode=""
|
||||
d="M0 700l500 -300l-500 -300v600zM500 100v600h200v-600h-200z" />
|
||||
<glyph glyph-name="99" unicode="" horiz-adv-x="600"
|
||||
d="M0 700h600v-600h-600v600z" />
|
||||
<glyph glyph-name="9a" unicode=""
|
||||
d="M200 800h400v-200h200v-400h-200v-200h-400v200h-200v400h200v200z" />
|
||||
<glyph glyph-name="9b" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM0 403h800v-100h-800v100zM0 103h800v-100h-800v100z" />
|
||||
<glyph glyph-name="9c" unicode="" horiz-adv-x="600"
|
||||
d="M278 700c7 2 13 4 22 4c55 0 100 -45 100 -100v-4v-200c0 -55 -45 -100 -100 -100s-100 45 -100 100v200v2c0 44 35 88 78 98zM34 500h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-50c0 -111 89 -200 200 -200s200 89 200 200v50c0 28 22 50 50 50s50 -22 50 -50v-50
|
||||
c0 -148 -109 -270 -250 -294v-106h50c55 0 100 -45 100 -100h-400c0 55 45 100 100 100h50v106c-141 24 -250 146 -250 294v50v2c0 20 15 42 34 48z" />
|
||||
<glyph glyph-name="9d" unicode=""
|
||||
d="M0 500h800v-200h-800v200z" />
|
||||
<glyph glyph-name="9e" unicode=""
|
||||
d="M34 700h4h3h4h5h700c28 0 50 -22 50 -50v-500c0 -28 -22 -50 -50 -50h-250v-100h100c55 0 100 -45 100 -100h-600c0 55 45 100 100 100h100v100h-250c-28 0 -50 22 -50 50v500v2c0 20 15 42 34 48zM100 600v-400h600v400h-600z" />
|
||||
<glyph glyph-name="9f" unicode=""
|
||||
d="M272 700c-14 -40 -22 -83 -22 -128c0 -221 179 -400 400 -400c45 0 88 8 128 22c-53 -158 -202 -272 -378 -272c-221 0 -400 179 -400 400c0 176 114 325 272 378z" />
|
||||
<glyph glyph-name="a0" unicode=""
|
||||
d="M350 700l150 -150h-100v-150h150v100l150 -150l-150 -150v100h-150v-150h100l-150 -150l-150 150h100v150h-150v-100l-150 150l150 150v-100h150v150h-100z" />
|
||||
<glyph glyph-name="a1" unicode=""
|
||||
d="M800 800v-550c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150c17 0 35 -4 50 -9v206c-201 -6 -327 -27 -400 -50v-397c0 -83 -67 -150 -150 -150s-150 67 -150 150s67 150 150 150c17 0 35 -4 50 -9v409s100 100 600 100z" />
|
||||
<glyph glyph-name="a2" unicode="" horiz-adv-x="700"
|
||||
d="M499 700c51 0 102 -20 141 -59c78 -78 78 -203 0 -281l-250 -244c-48 -48 -127 -48 -175 0s-48 127 0 175l96 97l69 -69l-90 -94l-7 -3c-10 -10 -10 -28 0 -38s28 -10 38 0l250 247c37 40 39 102 0 141s-104 40 -144 0l-278 -275c-66 -69 -68 -179 0 -247
|
||||
c69 -69 181 -69 250 0l9 12l116 113l69 -69l-125 -125c-107 -107 -281 -107 -388 0s-107 281 0 388l278 272c39 39 90 59 141 59z" />
|
||||
<glyph glyph-name="a3" unicode=""
|
||||
d="M600 800l200 -200l-100 -100l-200 200zM400 600l200 -200l-400 -400h-200v200z" />
|
||||
<glyph glyph-name="a4" unicode=""
|
||||
d="M550 800c83 0 150 -90 150 -200s-67 -200 -150 -200c-22 0 -40 8 -59 19c6 26 9 52 9 81c0 84 -27 158 -72 212c27 52 71 88 122 88zM250 700c83 0 150 -90 150 -200s-67 -200 -150 -200s-150 90 -150 200s67 200 150 200zM725 384c44 -22 75 -66 75 -118v-166h-200v66
|
||||
c0 50 -17 96 -44 134c66 2 126 33 169 84zM75 284c45 -53 106 -84 175 -84s130 31 175 84c44 -22 75 -66 75 -118v-166h-500v166c0 52 31 96 75 118z" />
|
||||
<glyph glyph-name="a5" unicode=""
|
||||
d="M400 800c110 0 200 -112 200 -250s-90 -250 -200 -250s-200 112 -200 250s90 250 200 250zM191 300c54 -61 128 -100 209 -100s155 39 209 100c106 -5 191 -92 191 -200v-100h-800v100c0 108 85 195 191 200z" />
|
||||
<glyph glyph-name="a6" unicode="" horiz-adv-x="600"
|
||||
d="M19 800h462c11 0 19 -8 19 -19v-762c0 -11 -8 -19 -19 -19h-462c-11 0 -19 8 -19 19v762c0 11 8 19 19 19zM100 700v-500h300v500h-300zM250 150c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="a7" unicode=""
|
||||
d="M350 800c17 0 34 -1 50 -3v-397l-297 297c63 64 150 103 247 103zM500 694c169 -25 300 -168 300 -344c0 -193 -157 -350 -350 -350c-85 0 -161 31 -222 81l272 272v341zM91 562l237 -234l-212 -212c-70 55 -116 138 -116 234c0 84 35 158 91 212z" />
|
||||
<glyph glyph-name="a8" unicode=""
|
||||
d="M92 650c0 23 20 50 46 50h3h4h5h400c28 0 50 -22 50 -50s-22 -50 -50 -50h-50v-200h100c55 0 100 -45 100 -100h-300v-300l-56 -100l-44 100v300h-300c0 55 45 100 100 100h100v200h-50c-2 0 -6 -1 -8 -1c-28 0 -50 23 -50 51z" />
|
||||
<glyph glyph-name="a9" unicode=""
|
||||
d="M400 800c221 0 400 -179 400 -400s-179 -400 -400 -400s-400 179 -400 400s179 400 400 400zM300 600v-400l300 200z" />
|
||||
<glyph glyph-name="aa" unicode=""
|
||||
d="M300 800h200v-300h300v-200h-300v-300h-200v300h-300v200h300v300z" />
|
||||
<glyph glyph-name="ab" unicode=""
|
||||
d="M300 800h100v-400h-100v400zM172 656l62 -78l-40 -31c-58 -46 -94 -117 -94 -197c0 -139 111 -250 250 -250s250 111 250 250c0 80 -39 151 -97 197l-37 31l62 78l38 -31c82 -64 134 -164 134 -275c0 -193 -157 -350 -350 -350s-350 157 -350 350c0 111 53 211 134 275z
|
||||
" />
|
||||
<glyph glyph-name="ac" unicode=""
|
||||
d="M200 800h400v-200h-400v200zM9 500h782c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-91v200h-600v-200h-91c-6 0 -9 3 -9 9v282c0 6 3 9 9 9zM200 300h400v-300h-400v300z" />
|
||||
<glyph glyph-name="ad" unicode=""
|
||||
d="M0 700h100v-700h-100v700zM700 700h100v-700h-100v700zM200 600h200v-100h-200v100zM300 400h200v-100h-200v100zM400 200h200v-100h-200v100z" />
|
||||
<glyph glyph-name="ae" unicode=""
|
||||
d="M325 700c42 -141 87 -280 131 -419c29 74 59 148 88 222c30 -57 58 -114 87 -172h169v-100h-231l-13 28c-37 -92 -74 -184 -112 -275c-38 129 -79 257 -119 385c-42 -133 -83 -267 -125 -400c-28 88 -56 175 -84 262h-116v100h188l9 -34l3 -6c42 137 83 273 125 409z" />
|
||||
<glyph glyph-name="af" unicode=""
|
||||
d="M200 600c0 57 43 100 100 100s100 -43 100 -100c0 -28 -18 -48 -28 -72c-3 -6 -3 -16 -3 -28h231v-231c12 0 22 0 28 3c24 10 44 28 72 28c57 0 100 -43 100 -100s-43 -100 -100 -100c-28 0 -48 18 -72 28c-6 3 -16 3 -28 3v-231h-231c0 12 0 22 3 28c10 24 28 44 28 72
|
||||
c0 57 -43 100 -100 100s-100 -43 -100 -100c0 -28 18 -48 28 -72c3 -6 3 -16 3 -28h-231v600h231c0 12 0 22 -3 28c-10 24 -28 44 -28 72z" />
|
||||
<glyph glyph-name="b0" unicode="" horiz-adv-x="500"
|
||||
d="M247 700c84 0 148 -20 191 -59s59 -93 59 -141c0 -117 -69 -181 -119 -225s-81 -67 -81 -150v-25h-100v25c0 117 65 181 115 225s85 67 85 150c0 25 -8 48 -28 66s-56 34 -122 34s-97 -18 -116 -37s-27 -43 -31 -69l-100 12c5 38 19 88 59 128s103 66 188 66zM197 0h100
|
||||
v-100h-100v100z" />
|
||||
<glyph glyph-name="b1" unicode=""
|
||||
d="M450 800c138 0 250 -112 250 -250v-50c58 -21 100 -85 100 -150c0 -69 -48 -127 -112 -144c-22 55 -75 94 -138 94c-20 0 -39 -5 -56 -12c-17 64 -75 112 -144 112s-127 -48 -144 -112c-17 7 -36 12 -56 12c-37 0 -71 -12 -97 -34c-33 36 -53 82 -53 134
|
||||
c0 110 90 200 200 200c23 114 129 200 250 200zM334 300h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-200c0 -28 -22 -50 -50 -50s-50 22 -50 50v200v2c0 20 15 42 34 48zM134 200h4h3c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-100c0 -28 -22 -50 -50 -50s-50 22 -50 50v100v2
|
||||
c0 20 15 42 34 48zM534 200h3h4c3 0 6 1 9 1c28 0 50 -22 50 -50v-1v-100c0 -28 -22 -50 -50 -50s-50 22 -50 50v100v2c0 20 15 42 34 48z" />
|
||||
<glyph glyph-name="b2" unicode=""
|
||||
d="M600 800l200 -150l-200 -150v100h-50l-153 -191l175 -206l6 -3h22v100l200 -150l-200 -150v100h-25c-35 0 -56 12 -78 38l-166 190l-153 -190c-22 -27 -43 -38 -78 -38h-100v100h100l166 206l-163 191l-3 3h-100v100h100c34 0 56 -12 78 -38l153 -178l141 178
|
||||
c22 27 43 38 78 38h50v100z" />
|
||||
<glyph glyph-name="b3" unicode=""
|
||||
d="M400 800c110 0 209 -47 281 -119l119 119v-300h-300l109 109c-54 55 -126 91 -209 91c-166 0 -300 -134 -300 -300s134 -300 300 -300c83 0 158 34 212 88l72 -72c-72 -72 -174 -116 -284 -116c-220 0 -400 180 -400 400s180 400 400 400z" />
|
||||
<glyph glyph-name="b4" unicode=""
|
||||
d="M400 800h400v-400l-166 166l-400 -400l166 -166h-400v400l166 -166l400 400z" />
|
||||
<glyph glyph-name="b5" unicode="" horiz-adv-x="600"
|
||||
d="M250 800l250 -300h-200v-200h200l-250 -300l-250 300h200v200h-200z" />
|
||||
<glyph glyph-name="b6" unicode=""
|
||||
d="M300 600v-200h200v200l300 -250l-300 -250v200h-200v-200l-300 250z" />
|
||||
<glyph glyph-name="b7" unicode=""
|
||||
d="M0 800c441 0 800 -359 800 -800h-200c0 333 -267 600 -600 600v200zM0 500c275 0 500 -225 500 -500h-200c0 167 -133 300 -300 300v200zM0 200c110 0 200 -90 200 -200h-200v200z" />
|
||||
<glyph glyph-name="b8" unicode=""
|
||||
d="M100 800c386 0 700 -314 700 -700h-100c0 332 -268 600 -600 600v100zM100 600c276 0 500 -224 500 -500h-100c0 222 -178 400 -400 400v100zM100 400c165 0 300 -135 300 -300h-100c0 111 -89 200 -200 200v100zM100 200c55 0 100 -45 100 -100s-45 -100 -100 -100
|
||||
s-100 45 -100 100s45 100 100 100z" />
|
||||
<glyph glyph-name="b9" unicode=""
|
||||
d="M300 800h400c55 0 100 -45 100 -100v-200h-400v150c0 28 -22 50 -50 50s-50 -22 -50 -50v-250h400v-300c0 -55 -45 -100 -100 -100h-500c-55 0 -100 45 -100 100v200h100v-150c0 -28 22 -50 50 -50s50 22 50 50v550c0 55 45 100 100 100z" />
|
||||
<glyph glyph-name="ba" unicode=""
|
||||
d="M75 700h225v-100h-200v-500h400v100h100v-125c0 -41 -34 -75 -75 -75h-450c-41 0 -75 34 -75 75v550c0 41 34 75 75 75zM600 700l200 -200l-200 -200v100h-200c-94 0 -173 -65 -194 -153c23 199 189 353 394 353v100z" />
|
||||
<glyph glyph-name="bb" unicode=""
|
||||
d="M500 700l300 -284l-300 -316v200h-100c-200 0 -348 -102 -400 -300c0 295 100 500 500 500v200z" />
|
||||
<glyph glyph-name="bc" unicode=""
|
||||
d="M381 791l19 9l19 -9c127 -53 253 -108 381 -160v-31c0 -166 -67 -313 -147 -419c-40 -53 -83 -97 -125 -128s-82 -53 -128 -53s-86 22 -128 53s-85 75 -125 128c-80 107 -147 253 -147 419v31c128 52 254 107 381 160zM400 100v591l-294 -122c8 -126 58 -243 122 -328
|
||||
c35 -46 73 -86 106 -110s62 -31 66 -31z" />
|
||||
<glyph glyph-name="bd" unicode=""
|
||||
d="M600 800h100v-800h-100v800zM400 700h100v-700h-100v700zM200 500h100v-500h-100v500zM0 300h100v-300h-100v300z" />
|
||||
<glyph glyph-name="be" unicode=""
|
||||
d="M300 800h100v-200h200l100 -100l-100 -100h-200v-400h-100v500h-200l-100 100l100 100h200v100z" />
|
||||
<glyph glyph-name="bf" unicode=""
|
||||
d="M200 800h100v-600h200l-250 -200l-250 200h200v600zM400 800h200v-100h-200v100zM400 600h300v-100h-300v100zM400 400h400v-100h-400v100z" />
|
||||
<glyph glyph-name="c0" unicode=""
|
||||
d="M200 800h100v-600h200l-250 -200l-250 200h200v600zM400 800h400v-100h-400v100zM400 600h300v-100h-300v100zM400 400h200v-100h-200v100z" />
|
||||
<glyph glyph-name="c1" unicode=""
|
||||
d="M75 700h650c41 0 75 -34 75 -75v-550c0 -41 -34 -75 -75 -75h-650c-41 0 -75 34 -75 75v550c0 41 34 75 75 75zM100 600v-100h100v100h-100zM300 600v-100h400v100h-400zM100 400v-100h100v100h-100zM300 400v-100h400v100h-400zM100 200v-100h100v100h-100zM300 200
|
||||
v-100h400v100h-400z" />
|
||||
<glyph glyph-name="c2" unicode=""
|
||||
d="M400 800l100 -300h300l-250 -200l100 -300l-250 200l-250 -200l100 300l-250 200h300z" />
|
||||
<glyph glyph-name="c3" unicode=""
|
||||
d="M400 800c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM150 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM650 700c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM400 600c110 0 200 -90 200 -200
|
||||
s-90 -200 -200 -200s-200 90 -200 200s90 200 200 200zM50 450c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM750 450c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM150 200c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50
|
||||
s22 50 50 50zM650 200c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50zM400 100c28 0 50 -22 50 -50s-22 -50 -50 -50s-50 22 -50 50s22 50 50 50z" />
|
||||
<glyph glyph-name="c4" unicode=""
|
||||
d="M34 800h632c18 0 34 -16 34 -34v-732c0 -18 -16 -34 -34 -34h-632c-18 0 -34 16 -34 34v732c0 18 16 34 34 34zM100 700v-500h500v500h-500zM350 150c-38 0 -63 -42 -44 -75s69 -33 88 0s-6 75 -44 75z" />
|
||||
<glyph glyph-name="c5" unicode=""
|
||||
d="M0 800h300l500 -500l-300 -300l-500 500v300zM200 700c-55 0 -100 -45 -100 -100s45 -100 100 -100s100 45 100 100s-45 100 -100 100z" />
|
||||
<glyph glyph-name="c6" unicode=""
|
||||
d="M0 600h200l300 -300l-200 -200l-300 300v200zM340 600h160l300 -300l-200 -200l-78 78l119 122zM150 500c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="c7" unicode=""
|
||||
d="M400 800c220 0 400 -180 400 -400s-180 -400 -400 -400s-400 180 -400 400s180 400 400 400zM400 700c-166 0 -300 -134 -300 -300s134 -300 300 -300s300 134 300 300s-134 300 -300 300zM400 600c110 0 200 -90 200 -200s-90 -200 -200 -200s-200 90 -200 200
|
||||
s90 200 200 200zM400 500c-56 0 -100 -44 -100 -100s44 -100 100 -100s100 44 100 100s-44 100 -100 100z" />
|
||||
<glyph glyph-name="c8" unicode=""
|
||||
d="M0 700h559l-100 -100h-359v-500h500v159l100 100v-359h-700v700zM700 700l100 -100l-400 -400l-200 200l100 100l100 -100z" />
|
||||
<glyph glyph-name="c9" unicode=""
|
||||
d="M9 800h782c6 0 9 -3 9 -9v-782c0 -6 -3 -9 -9 -9h-782c-6 0 -9 3 -9 9v782c0 6 3 9 9 9zM150 722l-72 -72l100 -100l-100 -100l72 -72l172 172zM400 500v-100h300v100h-300z" />
|
||||
<glyph glyph-name="ca" unicode=""
|
||||
d="M0 800h800v-200h-50c0 55 -45 100 -100 100h-150v-550c0 -28 22 -50 50 -50h50v-100h-400v100h50c28 0 50 22 50 50v550h-150c-55 0 -100 -45 -100 -100h-50v200z" />
|
||||
<glyph glyph-name="cb" unicode=""
|
||||
d="M0 700h100v-400h-100v400zM200 700h350c21 0 39 -13 47 -31c0 0 103 -291 103 -319s-22 -50 -50 -50h-150c-28 0 -50 -25 -50 -50s39 -158 47 -184s-5 -55 -31 -63s-52 5 -66 31s-109 219 -128 238s-44 28 -72 28v400z" />
|
||||
<glyph glyph-name="cc" unicode=""
|
||||
d="M400 666c10 19 28 32 47 34l19 -3c26 -8 39 -37 31 -63s-47 -159 -47 -184s22 -50 50 -50h150c28 0 50 -22 50 -50s-103 -319 -103 -319c-8 -18 -26 -31 -47 -31h-350v400c28 0 53 9 72 28s114 212 128 238zM0 400h100v-400h-100v400z" />
|
||||
<glyph glyph-name="cd" unicode=""
|
||||
d="M200 700h300v-100h-100v-6c25 -4 50 -8 72 -16l-34 -94c-28 11 -58 16 -88 16c-139 0 -250 -111 -250 -250s111 -250 250 -250s250 111 250 250c0 31 -5 60 -16 88l91 37c14 -38 25 -81 25 -125c0 -193 -157 -350 -350 -350s-350 157 -350 350c0 176 130 323 300 347v3
|
||||
h-100v100zM700 584c0 0 -296 -348 -316 -368s-48 -20 -68 0s-20 48 0 68s384 300 384 300z" />
|
||||
<glyph glyph-name="ce" unicode=""
|
||||
d="M600 700l200 -150l-200 -150v100h-600v100h600v100zM200 300v-100h600v-100h-600v-100l-200 150z" />
|
||||
<glyph glyph-name="cf" unicode=""
|
||||
d="M300 800h100c55 0 100 -45 100 -100h100c55 0 100 -45 100 -100h-700c0 55 45 100 100 100h100c0 55 45 100 100 100zM100 500h100v-350c0 -28 22 -50 50 -50s50 22 50 50v350h100v-350c0 -28 22 -50 50 -50s50 22 50 50v350h100v-481c0 -11 -8 -19 -19 -19h-462
|
||||
c-11 0 -19 8 -19 19v481z" />
|
||||
<glyph glyph-name="d0" unicode=""
|
||||
d="M100 800h200v-400c0 -55 45 -100 100 -100s100 45 100 100v400h100v-400c0 -110 -90 -200 -200 -200h-50c-138 0 -250 90 -250 200v400zM0 100h700v-100h-700v100z" />
|
||||
<glyph glyph-name="d1" unicode=""
|
||||
d="M9 700h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM609 700h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM309 500h182c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v282
|
||||
c0 6 3 9 9 9zM0 100h800v-100h-800v100z" />
|
||||
<glyph glyph-name="d2" unicode=""
|
||||
d="M10 700h181c6 0 9 -3 9 -9v-191h-200v191c0 6 4 9 10 9zM610 700h181c6 0 9 -3 9 -9v-191h-200v191c0 6 5 9 10 9zM310 600h181c6 0 9 -3 9 -9v-91h-200v91c0 6 4 9 10 9zM0 400h800v-100h-800v100zM0 200h200v-191c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v191zM300 200
|
||||
h200v-91c0 -6 -3 -9 -9 -9h-181c-6 0 -10 3 -10 9v91zM600 200h200v-191c0 -6 -3 -9 -9 -9h-181c-6 0 -10 3 -10 9v191z" />
|
||||
<glyph glyph-name="d3" unicode=""
|
||||
d="M0 700h800v-100h-800v100zM9 500h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v482c0 6 3 9 9 9zM309 500h182c6 0 9 -3 9 -9v-282c0 -6 -3 -9 -9 -9h-182c-6 0 -9 3 -9 9v282c0 6 3 9 9 9zM609 500h182c6 0 9 -3 9 -9v-482c0 -6 -3 -9 -9 -9h-182
|
||||
c-6 0 -9 3 -9 9v482c0 6 3 9 9 9z" />
|
||||
<glyph glyph-name="d4" unicode=""
|
||||
d="M50 600h500c28 0 50 -22 50 -50v-150l100 100h100v-300h-100l-100 100v-150c0 -28 -22 -50 -50 -50h-500c-28 0 -50 22 -50 50v400c0 28 22 50 50 50z" />
|
||||
<glyph glyph-name="d5" unicode=""
|
||||
d="M334 800h66v-800h-66l-134 200h-200v400h200zM500 600v100c26 0 52 -4 75 -10c130 -33 225 -150 225 -290s-95 -258 -225 -291h-3c-23 -6 -47 -9 -72 -9v100c17 0 34 2 50 6c86 22 150 100 150 194s-64 172 -150 194c-16 4 -33 6 -50 6zM500 500l25 -3
|
||||
c44 -11 75 -51 75 -97s-32 -86 -75 -97l-25 -3v200z" />
|
||||
<glyph glyph-name="d6" unicode="" horiz-adv-x="600"
|
||||
d="M334 800h66v-800h-66l-134 200h-200v400h200zM500 500l25 -3c44 -11 75 -51 75 -97s-32 -86 -75 -97l-25 -3v200z" />
|
||||
<glyph glyph-name="d7" unicode="" horiz-adv-x="400"
|
||||
d="M334 800h66v-800h-66l-134 200h-200v400h200z" />
|
||||
<glyph glyph-name="d8" unicode=""
|
||||
d="M309 800h82c6 0 10 -4 12 -9l294 -682l3 -19v-81c0 -6 -3 -9 -9 -9h-682c-6 0 -9 3 -9 9v81l3 19l294 682c2 5 6 9 12 9zM300 500v-200h100v200h-100zM300 200v-100h100v100h-100z" />
|
||||
<glyph glyph-name="d9" unicode=""
|
||||
d="M375 800c138 0 269 -39 378 -109l-53 -82c-93 60 -205 91 -325 91c-119 0 -229 -32 -322 -91l-53 82c109 70 237 109 375 109zM375 500c78 0 154 -23 216 -62l-53 -85c-46 30 -104 47 -163 47c-60 0 -112 -17 -159 -47l-54 85c62 40 134 62 213 62zM375 200
|
||||
c55 0 100 -45 100 -100s-45 -100 -100 -100s-100 45 -100 100s45 100 100 100z" />
|
||||
<glyph glyph-name="da" unicode="" horiz-adv-x="900"
|
||||
d="M551 800c16 0 32 0 47 -3l-97 -97v-200h200l97 97c3 -15 3 -31 3 -47c0 -138 -112 -250 -250 -250c-32 0 -62 8 -90 19l-288 -291c-20 -20 -46 -28 -72 -28s-52 8 -72 28c-39 39 -39 105 0 144l291 287c-11 28 -19 59 -19 91c0 138 112 250 250 250zM101 150
|
||||
c-28 0 -50 -22 -50 -50s22 -50 50 -50s50 22 50 50s-22 50 -50 50z" />
|
||||
<glyph glyph-name="db" unicode=""
|
||||
d="M141 700c84 -84 169 -167 253 -250c82 83 167 165 247 250l143 -141l-253 -253c84 -82 167 -166 253 -247l-143 -143c-81 86 -165 169 -247 253l-253 -253l-141 143c85 80 167 164 250 247c-83 84 -166 169 -250 253z" />
|
||||
<glyph glyph-name="dc" unicode=""
|
||||
d="M0 800h100l231 -300h38l231 300h100l-225 -300h225v-100h-300v-100h300v-100h-300v-200h-100v200h-300v100h300v100h-300v100h225z" />
|
||||
<glyph glyph-name="dd" unicode="" horiz-adv-x="900"
|
||||
d="M350 800c193 0 350 -157 350 -350c0 -61 -17 -119 -44 -169c4 -2 10 -6 13 -9l103 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 103c-3 3 -7 9 -9 13c-50 -28 -108 -44 -169 -44c-193 0 -350 157 -350 350s157 350 350 350zM350 700
|
||||
c-139 0 -250 -111 -250 -250s111 -250 250 -250c62 0 119 23 163 60c7 11 19 25 31 31l3 3c34 43 53 97 53 156c0 139 -111 250 -250 250zM300 600h100v-100h100v-100h-100v-100h-100v100h-100v100h100v100z" />
|
||||
<glyph glyph-name="de" unicode="" horiz-adv-x="900"
|
||||
d="M350 800c193 0 350 -157 350 -350c0 -61 -17 -119 -44 -169c4 -2 10 -6 13 -9l103 -100c16 -16 30 -49 30 -72c0 -56 -46 -102 -102 -102c-23 0 -56 14 -72 30l-100 103c-3 3 -7 9 -9 13c-50 -28 -108 -44 -169 -44c-193 0 -350 157 -350 350s157 350 350 350zM350 700
|
||||
c-139 0 -250 -111 -250 -250s111 -250 250 -250c62 0 119 23 163 60c7 11 19 25 31 31l3 3c34 43 53 97 53 156c0 139 -111 250 -250 250zM200 500h300v-100h-300v100z" />
|
||||
</font>
|
||||
</defs></svg>
|
Before Width: | Height: | Size: 54 KiB |
@ -1,9 +0,0 @@
|
||||
.autocomplete-suggestions {
|
||||
text-align: left; cursor: default; border: 1px solid #ccc; border-top: 0; background: #fff; box-shadow: -1px 1px 3px rgba(0,0,0,.1);
|
||||
|
||||
/* core styles should not be changed */
|
||||
position: absolute; display: none; z-index: 9999; max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box;
|
||||
}
|
||||
.autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.02em; color: #333; }
|
||||
.autocomplete-suggestion b { font-weight: normal; color: #1f8dd6; }
|
||||
.autocomplete-suggestion.selected { background: #f0f0f0; }
|
@ -2,7 +2,7 @@
|
||||
function showAlert(text) {
|
||||
console.log("[INFO] Function showAlert() called.");
|
||||
$("#alert").html(text);
|
||||
$("#alert").slideDown().delay(<?php echo $GLOBALS['ALERT_DISSAPEAR_IN']*1000 ?>).slideUp();
|
||||
$("#alert").slideDown().delay(<?php echo ALERT_DISAPPEAR_IN*1000 ?>).slideUp();
|
||||
}
|
||||
|
||||
<?php if (Alert::defined()): ?>
|
||||
|
@ -1,26 +1,14 @@
|
||||
<?php
|
||||
// Preload the first 10 files to not call via AJAX when the user open the first time the media manager
|
||||
if (IMAGE_RESTRICT) {
|
||||
$imagesDirectory = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS_PAGES.$uuid.'/');
|
||||
$imagesURL = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS_PAGES.$uuid.'/');
|
||||
$thumbnailDirectory = PATH_UPLOADS_PAGES.$uuid.DS.'thumbnails'.DS;
|
||||
$thumbnailHTML = HTML_PATH_UPLOADS_PAGES.$uuid.'/thumbnails/';
|
||||
$thumbnailURL = DOMAIN_UPLOADS_PAGES.$uuid.'/thumbnails/';
|
||||
} else {
|
||||
$imagesDirectory = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS);
|
||||
$imagesURL = (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS);
|
||||
$thumbnailDirectory = PATH_UPLOADS_THUMBNAILS;
|
||||
$thumbnailHTML = HTML_PATH_UPLOADS_THUMBNAILS;
|
||||
$thumbnailURL = DOMAIN_UPLOADS_THUMBNAILS;
|
||||
}
|
||||
$listOfFilesByPage = Filesystem::listFiles($thumbnailDirectory, '*', '*', $GLOBALS['MEDIA_MANAGER_SORT_BY_DATE'], $GLOBALS['MEDIA_MANAGER_NUMBER_OF_FILES']);
|
||||
$listOfFilesByPage = Filesystem::listFiles(PAGE_THUMBNAILS_DIRECTORY, '*', '*', MEDIA_MANAGER_SORT_BY_DATE, MEDIA_MANAGER_NUMBER_OF_FILES);
|
||||
$preLoadFiles = array();
|
||||
if (!empty($listOfFilesByPage[0])) {
|
||||
foreach ($listOfFilesByPage[0] as $file) {
|
||||
$filename = basename($file);
|
||||
$filename = Filesystem::filename($file);
|
||||
array_push($preLoadFiles, $filename);
|
||||
}
|
||||
}
|
||||
|
||||
// Amount of pages for the paginator
|
||||
$numberOfPages = count($listOfFilesByPage);
|
||||
?>
|
||||
@ -35,13 +23,15 @@ $numberOfPages = count($listOfFilesByPage);
|
||||
<!--
|
||||
UPLOAD INPUT
|
||||
-->
|
||||
<h3 class="mt-2 mb-3"><?php $L->p('Upload'); ?></h3>
|
||||
<h3 class="mt-2 mb-3"><i class="fa fa-image"></i> <?php $L->p('Images'); ?></h3>
|
||||
|
||||
<div id="jsalertMedia" class="alert alert-warning d-none" role="alert"></div>
|
||||
|
||||
<!-- Form and Input file -->
|
||||
<form name="bluditFormUpload" id="jsbluditFormUpload" enctype="multipart/form-data">
|
||||
<div class="custom-file">
|
||||
<input type="file" class="custom-file-input" id="jsbluditInputFiles" name="bluditInputFiles[]" multiple>
|
||||
<label class="custom-file-label" for="jsbluditInputFiles"><?php $L->p('Choose images to upload'); ?></label>
|
||||
<input type="file" class="custom-file-input" id="jsimages" name="images[]" multiple>
|
||||
<label class="custom-file-label" for="jsimages"><?php $L->p('Choose images to upload'); ?></label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -51,25 +41,17 @@ $numberOfPages = count($listOfFilesByPage);
|
||||
</div>
|
||||
|
||||
<!--
|
||||
MANAGER
|
||||
IMAGES LIST
|
||||
-->
|
||||
<h3 class="mt-4 mb-3"><?php $L->p('Manage'); ?></h3>
|
||||
|
||||
<!-- Table for list files -->
|
||||
<table id="jsbluditMediaTable" class="table">
|
||||
<table id="jsbluditMediaTable" class="table mt-2">
|
||||
<tr>
|
||||
<td><?php $L->p('There are no images'); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Paginator -->
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center">
|
||||
<?php for ($i=1; $i<=$numberOfPages; $i++): ?>
|
||||
<li class="page-item"><button type="button" class="btn btn-link page-link" onClick="getFiles(<?php echo $i ?>)"><?php echo $i ?></button></li>
|
||||
<?php endfor; ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav id="jsbluditMediaTablePagination"></nav>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -97,34 +79,55 @@ function cleanTable() {
|
||||
$('#jsbluditMediaTable').empty();
|
||||
}
|
||||
|
||||
function showMediaAlert(message) {
|
||||
$("#jsalertMedia").html(message).removeClass('d-none');
|
||||
}
|
||||
|
||||
function hideMediaAlert() {
|
||||
$("#jsalertMedia").addClass('d-none');
|
||||
}
|
||||
|
||||
// Show the files in the table
|
||||
function displayFiles(files) {
|
||||
function displayFiles(files, numberOfPages = <?= $numberOfPages ?>) {
|
||||
if (!Array.isArray(files)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Clean table
|
||||
cleanTable();
|
||||
|
||||
// Regenerate the table
|
||||
if (files.length > 0) {
|
||||
$.each(files, function(key, filename) {
|
||||
var thumbnail = "<?php echo $thumbnailURL; ?>"+filename;
|
||||
var image = "<?php echo $imagesURL; ?>"+filename;
|
||||
var thumbnail = "<?php echo PAGE_THUMBNAILS_URL; ?>"+filename;
|
||||
var image = "<?php echo PAGE_IMAGES_URL; ?>"+filename;
|
||||
|
||||
tableRow = '<tr id="js'+filename+'">'+
|
||||
'<td style="width:80px"><img class="img-thumbnail" alt="200x200" src="'+thumbnail+'" style="width: 50px; height: 50px;"><\/td>'+
|
||||
'<td class="information">'+
|
||||
'<div class="pb-2">'+filename+'<\/div>'+
|
||||
'<div class="text-primary pb-2">'+filename+'<\/div>'+
|
||||
'<div>'+
|
||||
'<button type="button" class="btn btn-primary btn-sm mr-2" onClick="editorInsertMedia(\''+image+'\'); closeMediaManager();"><?php $L->p('Insert') ?><\/button>'+
|
||||
'<button type="button" class="btn btn-primary btn-sm" onClick="setCoverImage(\''+filename+'\'); closeMediaManager();"><?php $L->p('Set as cover image') ?><\/button>'+
|
||||
'<button type="button" class="btn btn-danger btn-sm float-right" onClick="deleteMedia(\''+filename+'\')"><?php $L->p('Delete') ?><\/button>'+
|
||||
'<a href="#" class="mr-3 text-secondary" onClick="editorInsertMedia(\''+image+'\'); closeMediaManager();"><i class="fa fa-plus"></i><?php $L->p('Insert') ?><\/a>'+
|
||||
'<a href="#" class="text-secondary" onClick="setCoverImage(\''+filename+'\'); closeMediaManager();"><i class="fa fa-square-o"></i><?php $L->p('Set as cover image') ?><\/button>'+
|
||||
'<a href="#" class="float-right text-danger" onClick="deleteMedia(\''+filename+'\')"><i class="fa fa-trash-o"></i><?php $L->p('Delete') ?><\/a>'+
|
||||
'<\/div>'+
|
||||
'<\/td>'+
|
||||
'<\/tr>';
|
||||
$('#jsbluditMediaTable').append(tableRow);
|
||||
});
|
||||
|
||||
mediaPagination = '<ul class="pagination justify-content-center flex-wrap">';
|
||||
for (var i = 1; i <= numberOfPages; i++) {
|
||||
mediaPagination += '<li class="page-item"><button type="button" class="btn btn-link page-link" onClick="getFiles('+i+')">'+i+'</button></li>';
|
||||
}
|
||||
mediaPagination += '</ul>';
|
||||
$('#jsbluditMediaTablePagination').html(mediaPagination);
|
||||
|
||||
}
|
||||
|
||||
if (files.length == 0) {
|
||||
$('#jsbluditMediaTable').html("<p><?php (IMAGE_RESTRICT ? $L->p('There are no images for the page') : $L->p('There are no images')) ?></p>");
|
||||
$('#jsbluditMediaTablePagination').html('');
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,11 +136,15 @@ function getFiles(pageNumber) {
|
||||
$.post(HTML_PATH_ADMIN_ROOT+"ajax/list-images",
|
||||
{ tokenCSRF: tokenCSRF,
|
||||
pageNumber: pageNumber,
|
||||
uuid: "<?php echo $uuid; ?>",
|
||||
path: "thumbnails" // the paths are defined in the list-images.php
|
||||
uuid: "<?php echo PAGE_IMAGES_KEY ?>",
|
||||
path: "thumbnails" // the paths are defined in ajax/list-images
|
||||
},
|
||||
function(data) {
|
||||
displayFiles(data.files);
|
||||
function(data) { // success function
|
||||
if (data.status==0) {
|
||||
displayFiles(data.files, data.numberOfPages);
|
||||
} else {
|
||||
console.log(data.message);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -147,61 +154,106 @@ function deleteMedia(filename) {
|
||||
$.post(HTML_PATH_ADMIN_ROOT+"ajax/delete-image",
|
||||
{ tokenCSRF: tokenCSRF,
|
||||
filename: filename,
|
||||
uuid: "<?php echo $uuid; ?>"
|
||||
uuid: "<?php echo PAGE_IMAGES_KEY; ?>"
|
||||
},
|
||||
function(data) {
|
||||
getFiles(1);
|
||||
function(data) { // success function
|
||||
if (data.status==0) {
|
||||
getFiles(1);
|
||||
} else {
|
||||
console.log(data.message);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function setCoverImage(filename) {
|
||||
var image = "<?php echo $imagesURL; ?>"+filename;
|
||||
var image = "<?php echo PAGE_IMAGES_URL; ?>"+filename;
|
||||
$("#jscoverImage").val(filename);
|
||||
$("#jscoverImagePreview").attr("src", image);
|
||||
}
|
||||
|
||||
function uploadImages() {
|
||||
// Remove current alerts
|
||||
hideMediaAlert();
|
||||
|
||||
var images = $("#jsimages")[0].files;
|
||||
for (var i=0; i < images.length; i++) {
|
||||
// Check file type/extension
|
||||
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml'];
|
||||
if (!validImageTypes.includes(images[i].type)) {
|
||||
showMediaAlert("<?php echo $L->g('File type is not supported. Allowed types:').' '.implode(', ',$GLOBALS['ALLOWED_IMG_EXTENSION']) ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check file size and compare with PHP upload_max_filesize
|
||||
if (images[i].size > UPLOAD_MAX_FILESIZE) {
|
||||
showMediaAlert("<?php echo $L->g('Maximum load file size allowed:').' '.ini_get('upload_max_filesize') ?>");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Clean progress bar
|
||||
$("#jsbluditProgressBar").removeClass().addClass("progress-bar bg-primary");
|
||||
$("#jsbluditProgressBar").width("0");
|
||||
|
||||
// Data to send via AJAX
|
||||
var formData = new FormData($("#jsbluditFormUpload")[0]);
|
||||
formData.append("uuid", "<?php echo PAGE_IMAGES_KEY ?>");
|
||||
formData.append("tokenCSRF", tokenCSRF);
|
||||
|
||||
$.ajax({
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/upload-images",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
xhr: function() {
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", function(e) {
|
||||
if (e.lengthComputable) {
|
||||
var percentComplete = (e.loaded / e.total)*100;
|
||||
$("#jsbluditProgressBar").width(percentComplete+"%");
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}).done(function(data) {
|
||||
if (data.status==0) {
|
||||
$("#jsbluditProgressBar").removeClass("bg-primary").addClass("bg-success");
|
||||
// Get the files for the first page, this include the files uploaded
|
||||
getFiles(1);
|
||||
} else {
|
||||
$("#jsbluditProgressBar").removeClass("bg-primary").addClass("bg-danger");
|
||||
showMediaAlert(data.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// Display the files preloaded for the first time
|
||||
displayFiles(preLoadFiles);
|
||||
|
||||
// Event to wait the selected files
|
||||
$("#jsbluditInputFiles").on("change", function() {
|
||||
// Select image event
|
||||
$("#jsimages").on("change", function(e) {
|
||||
uploadImages();
|
||||
});
|
||||
|
||||
// Check file size ?
|
||||
// Check file type/extension ?
|
||||
// Drag and drop image
|
||||
$(window).on("dragover dragenter", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
openMediaManager();
|
||||
});
|
||||
|
||||
$("#jsbluditProgressBar").width("1%");
|
||||
|
||||
// Data to send via AJAX
|
||||
var uuid = $("#jsuuid").val();
|
||||
var formData = new FormData($("#jsbluditFormUpload")[0]);
|
||||
formData.append('uuid', uuid);
|
||||
formData.append('tokenCSRF', tokenCSRF);
|
||||
|
||||
$.ajax({
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/upload-images",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
xhr: function() {
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", function(e) {
|
||||
if (e.lengthComputable) {
|
||||
var percentComplete = (e.loaded / e.total)*100;
|
||||
$("#jsbluditProgressBar").width(percentComplete+"%");
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}).done(function() {
|
||||
// Get the files of the first page, this include the files uploaded
|
||||
getFiles(1);
|
||||
});
|
||||
// Drag and drop image
|
||||
$(window).on("drop", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$("#jsimages").prop("files", e.originalEvent.dataTransfer.files);
|
||||
uploadImages();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark text-uppercase d-block d-md-none">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text-uppercase d-block d-lg-none">
|
||||
<div class="container">
|
||||
<span class="navbar-brand">
|
||||
<?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span>
|
||||
@ -34,7 +34,7 @@
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'settings' ?>">
|
||||
<?php $L->p('Site') ?></a>
|
||||
<?php $L->p('Settings') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'plugins' ?>">
|
||||
@ -48,6 +48,10 @@
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>">
|
||||
<?php $L->p('About') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>">
|
||||
<?php $L->p('Logout') ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2,27 +2,26 @@
|
||||
<ul class="nav flex-column pt-4">
|
||||
|
||||
<li class="nav-item mb-4" style="margin-left: -4px;">
|
||||
<img src="<?php echo HTML_PATH_ADMIN_THEME ?>img/logo.svg" width="20" height="20" alt="bludit-logo"><span class="ml-2 align-middle"><?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span>
|
||||
<img src="<?php echo HTML_PATH_CORE_IMG ?>logo.svg" width="20" height="20" alt="bludit-logo"><span class="ml-2 align-middle"><?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><span class="oi oi-dashboard"></span><?php $L->p('Dashboard') ?></a>
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>"><span class="fa fa-dashboard"></span><?php $L->p('Dashboard') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><span class="oi oi-external-link"></span><?php $L->p('Website') ?></a>
|
||||
<a class="nav-link" target="_blank" href="<?php echo HTML_PATH_ROOT ?>"><span class="fa fa-home"></span><?php $L->p('Website') ?></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mt-3">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><span class="oi oi-plus"></span><?php $L->p('New content') ?></a>
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>"><span style="color: #0078D4;" class="fa fa-plus-circle"></span><?php $L->p('New content') ?></a>
|
||||
</li>
|
||||
|
||||
<?php if (checkRole(array('editor'),false)): ?>
|
||||
<?php if (!checkRole(array('admin'),false)): ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><span class="oi oi-layers"></span><?php $L->p('Content') ?></a>
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'content' ?>"><span class="fa fa-archive"></span><?php $L->p('Content') ?></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$login->username() ?>"><span class="oi oi-person"></span><?php $L->p('Profile') ?></a>
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$login->username() ?>"><span class="fa fa-user"></span><?php $L->p('Profile') ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -58,6 +57,10 @@
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'about' ?>"><?php $L->p('About') ?></a>
|
||||
</li>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (checkRole(array('admin', 'editor'),false)): ?>
|
||||
|
||||
<?php
|
||||
if (!empty($plugins['adminSidebar'])) {
|
||||
echo '<li class="nav-item"><hr></li>';
|
||||
@ -68,9 +71,10 @@
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<li class="nav-item mt-5">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><span class="oi oi-account-logout"></span><?php $L->p('Logout') ?></a>
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'logout' ?>"><span class="fa fa-arrow-circle-right"></span><?php $L->p('Logout') ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!-- Check if the user is logged -->
|
||||
|
||||
<!-- DEBUG: Each request increase the count of simple stats -->
|
||||
|
||||
<!-- <script>
|
||||
setInterval(
|
||||
function() {
|
||||
var ajax = new bluditAjax();
|
||||
ajax.userLogged(showAlert);
|
||||
}, 15000);
|
||||
</script> -->
|
@ -5,30 +5,36 @@
|
||||
<meta charset="<?php echo CHARSET ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<meta name="generator" content="Bludit">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo DOMAIN_ADMIN_THEME.'img/favicon.png?version='.BLUDIT_VERSION ?>">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG.'favicon.png?version='.BLUDIT_VERSION ?>">
|
||||
|
||||
<!-- CSS -->
|
||||
<?php
|
||||
echo Theme::cssBootstrap();
|
||||
echo Theme::cssLineAwesome();
|
||||
echo Theme::css(array(
|
||||
'jquery-auto-complete.css',
|
||||
'open-iconic-bootstrap.min.css',
|
||||
'jquery.datetimepicker.min.css',
|
||||
'bludit.css'
|
||||
'bludit.css',
|
||||
'bludit.bootstrap.css'
|
||||
), DOMAIN_ADMIN_THEME_CSS);
|
||||
echo Theme::css(array(
|
||||
'jquery.datetimepicker.min.css',
|
||||
'select2.min.css',
|
||||
'select2-bootstrap4.min.css'
|
||||
), DOMAIN_CORE_CSS);
|
||||
?>
|
||||
|
||||
<!-- Javascript -->
|
||||
<?php
|
||||
echo Theme::jquery();
|
||||
echo Theme::jsBootstrap();
|
||||
echo Theme::js(array(
|
||||
'jquery-auto-complete.min.js',
|
||||
'jquery.datetimepicker.full.min.js'
|
||||
), DOMAIN_ADMIN_THEME_JS);
|
||||
echo Theme::jsSortable();
|
||||
echo Theme::js(array(
|
||||
'jquery.datetimepicker.full.min.js',
|
||||
'select2.full.min.js',
|
||||
'functions.js'
|
||||
), DOMAIN_CORE_JS);
|
||||
?>
|
||||
|
||||
<!-- Plugins -->
|
||||
@ -83,9 +89,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Check user logged and Internet connection -->
|
||||
<?php include('html/user-logged.php'); ?>
|
||||
|
||||
<!-- Plugins -->
|
||||
<?php Theme::plugins('adminBodyEnd') ?>
|
||||
|
||||
|
@ -44,7 +44,7 @@ EOF;
|
||||
}
|
||||
|
||||
if (isset($args['icon'])) {
|
||||
return '<a '.$options.'><span class="oi oi-'.$args['icon'].'" style="font-size: 0.7em;"></span> '.$args['title'].'</a>';
|
||||
return '<a '.$options.'><span class="fa fa-'.$args['icon'].'"></span>'.$args['title'].'</a>';
|
||||
}
|
||||
|
||||
return '<a '.$options.'>'.$args['title'].'</a>';
|
||||
@ -56,7 +56,7 @@ EOF;
|
||||
$title = $args['title'];
|
||||
return <<<EOF
|
||||
<h2 class="mt-0 mb-3">
|
||||
<span class="oi oi-$icon" style="font-size: 0.7em;"></span> $title
|
||||
<span class="fa fa-$icon" style="font-size: 0.9em;"></span><span>$title</span>
|
||||
</h2>
|
||||
EOF;
|
||||
}
|
||||
@ -113,18 +113,23 @@ EOF;
|
||||
}
|
||||
|
||||
$tip = '';
|
||||
if (isset($args['tip'])) {
|
||||
if (!empty($args['tip'])) {
|
||||
$tip = '<small class="form-text text-muted">'.$args['tip'].'</small>';
|
||||
}
|
||||
|
||||
$label = '';
|
||||
if (isset($args['label'])) {
|
||||
$label = '<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100" for="'.$id.'">'.$args['label'].'</label>';
|
||||
$class = 'form-group m-0';
|
||||
if (isset($args['class'])) {
|
||||
$class = $args['class'];
|
||||
}
|
||||
|
||||
$class = 'form-control';
|
||||
if (isset($args['class'])) {
|
||||
$class = $class.' '.$args['class'];
|
||||
$labelClass = 'mt-4 mb-2 pb-2 border-bottom text-uppercase w-100';
|
||||
if (isset($args['labelClass'])) {
|
||||
$labelClass = $args['labelClass'];
|
||||
}
|
||||
|
||||
$label = '';
|
||||
if (!empty($args['label'])) {
|
||||
$label = '<label class="'.$labelClass.'" for="'.$id.'">'.$args['label'].'</label>';
|
||||
}
|
||||
|
||||
$type = 'text';
|
||||
@ -133,9 +138,9 @@ EOF;
|
||||
}
|
||||
|
||||
return <<<EOF
|
||||
<div class="form-group m-0">
|
||||
<div class="$class">
|
||||
$label
|
||||
<input type="text" value="$value" class="$class" id="$id" name="$name" placeholder="$placeholder" $disabled>
|
||||
<input type="text" value="$value" class="form-control" id="$id" name="$name" placeholder="$placeholder" $disabled>
|
||||
$tip
|
||||
</div>
|
||||
EOF;
|
||||
@ -175,7 +180,7 @@ EOF;
|
||||
|
||||
$html = '<div class="form-group row">';
|
||||
|
||||
if (isset($args['label'])) {
|
||||
if (!empty($args['label'])) {
|
||||
$html .= '<label for="'.$id.'" class="col-sm-2 col-form-label">'.$args['label'].'</label>';
|
||||
}
|
||||
|
||||
@ -220,6 +225,7 @@ EOF;
|
||||
{
|
||||
$name = $args['name'];
|
||||
$disabled = empty($args['disabled'])?'':'disabled';
|
||||
$readonly = empty($args['readonly'])?'':'readonly';
|
||||
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
|
||||
$value = isset($args['value'])?$args['value']:'';
|
||||
|
||||
@ -252,7 +258,7 @@ return <<<EOF
|
||||
<div class="form-group row">
|
||||
$label
|
||||
<div class="col-sm-10">
|
||||
<input class="$class" id="$id" name="$name" value="$value" placeholder="$placeholder" type="$type" $disabled>
|
||||
<input class="$class" id="$id" name="$name" value="$value" placeholder="$placeholder" type="$type" $disabled $readonly>
|
||||
$tip
|
||||
</div>
|
||||
</div>
|
||||
@ -263,7 +269,7 @@ EOF;
|
||||
{
|
||||
$labelForCheckbox = isset($args['labelForCheckbox'])?$args['labelForCheckbox']:'';
|
||||
$placeholder = isset($args['placeholder'])?$args['placeholder']:'';
|
||||
$tip = isset($args['tip'])?$args['tip']:' ';
|
||||
$tip = isset($args['tip'])?'<small class="form-text text-muted">'.$args['tip'].'</small>':'';
|
||||
$value = isset($args['value'])?$args['value']:'';
|
||||
$name = $args['name'];
|
||||
$id = 'js'.$name;
|
||||
@ -272,9 +278,14 @@ EOF;
|
||||
}
|
||||
$disabled = isset($args['disabled'])?'disabled':'';
|
||||
|
||||
$class = 'form-group';
|
||||
$class = 'form-group m-0';
|
||||
if (isset($args['class'])) {
|
||||
$class = $class.' '.$args['class'];
|
||||
$class = $args['class'];
|
||||
}
|
||||
|
||||
$labelClass = 'mt-4 mb-2 pb-2 border-bottom text-uppercase w-100';
|
||||
if (isset($args['labelClass'])) {
|
||||
$labelClass = $args['labelClass'];
|
||||
}
|
||||
|
||||
$type = 'text';
|
||||
@ -284,18 +295,19 @@ EOF;
|
||||
|
||||
$label = '';
|
||||
if (!empty($args['label'])) {
|
||||
$label = '<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100">'.$args['label'].'</label>';
|
||||
$label = '<label class="'.$labelClass.'">'.$args['label'].'</label>';
|
||||
}
|
||||
|
||||
$checked = $args['checked']?'checked':'';
|
||||
$value = $checked?'1':'0';
|
||||
|
||||
return <<<EOF
|
||||
<div class="$class">
|
||||
$label
|
||||
<div class="form-check">
|
||||
<input name="$name" class="form-check-input" type="checkbox" id="$id" $checked>
|
||||
<input type="hidden" name="$name" value="$value"><input id="$id" type="checkbox" class="form-check-input" onclick="this.previousSibling.value=1-this.previousSibling.value" $checked>
|
||||
<label class="form-check-label" for="$id">$labelForCheckbox</label>
|
||||
<small class="form-text text-muted">$tip</small>
|
||||
$tip
|
||||
</div>
|
||||
</div>
|
||||
EOF;
|
||||
|
@ -1,3 +0,0 @@
|
||||
// jQuery autoComplete v1.0.7
|
||||
// https://github.com/Pixabay/jQuery-autoComplete
|
||||
!function(e){e.fn.autoComplete=function(t){var o=e.extend({},e.fn.autoComplete.defaults,t);return"string"==typeof t?(this.each(function(){var o=e(this);"destroy"==t&&(e(window).off("resize.autocomplete",o.updateSC),o.off("blur.autocomplete focus.autocomplete keydown.autocomplete keyup.autocomplete"),o.data("autocomplete")?o.attr("autocomplete",o.data("autocomplete")):o.removeAttr("autocomplete"),e(o.data("sc")).remove(),o.removeData("sc").removeData("autocomplete"))}),this):this.each(function(){function t(e){var t=s.val();if(s.cache[t]=e,e.length&&t.length>=o.minChars){for(var a="",c=0;c<e.length;c++)a+=o.renderItem(e[c],t);s.sc.html(a),s.updateSC(0)}else s.sc.hide()}var s=e(this);s.sc=e('<div class="autocomplete-suggestions '+o.menuClass+'"></div>'),s.data("sc",s.sc).data("autocomplete",s.attr("autocomplete")),s.attr("autocomplete","off"),s.cache={},s.last_val="",s.updateSC=function(t,o){if(s.sc.css({top:s.offset().top+s.outerHeight(),left:s.offset().left,width:s.outerWidth()}),!t&&(s.sc.show(),s.sc.maxHeight||(s.sc.maxHeight=parseInt(s.sc.css("max-height"))),s.sc.suggestionHeight||(s.sc.suggestionHeight=e(".autocomplete-suggestion",s.sc).first().outerHeight()),s.sc.suggestionHeight))if(o){var a=s.sc.scrollTop(),c=o.offset().top-s.sc.offset().top;c+s.sc.suggestionHeight-s.sc.maxHeight>0?s.sc.scrollTop(c+s.sc.suggestionHeight+a-s.sc.maxHeight):0>c&&s.sc.scrollTop(c+a)}else s.sc.scrollTop(0)},e(window).on("resize.autocomplete",s.updateSC),s.sc.appendTo("body"),s.sc.on("mouseleave",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected")}),s.sc.on("mouseenter",".autocomplete-suggestion",function(){e(".autocomplete-suggestion.selected").removeClass("selected"),e(this).addClass("selected")}),s.sc.on("mousedown click",".autocomplete-suggestion",function(t){var a=e(this),c=a.data("val");return(c||a.hasClass("autocomplete-suggestion"))&&(s.val(c),o.onSelect(t,c,a),s.sc.hide()),!1}),s.on("blur.autocomplete",function(){try{over_sb=e(".autocomplete-suggestions:hover").length}catch(t){over_sb=0}over_sb?s.is(":focus")||setTimeout(function(){s.focus()},20):(s.last_val=s.val(),s.sc.hide(),setTimeout(function(){s.sc.hide()},350))}),o.minChars||s.on("focus.autocomplete",function(){s.last_val="\n",s.trigger("keyup.autocomplete")}),s.on("keydown.autocomplete",function(t){if((40==t.which||38==t.which)&&s.sc.html()){var a,c=e(".autocomplete-suggestion.selected",s.sc);return c.length?(a=40==t.which?c.next(".autocomplete-suggestion"):c.prev(".autocomplete-suggestion"),a.length?(c.removeClass("selected"),s.val(a.addClass("selected").data("val"))):(c.removeClass("selected"),s.val(s.last_val),a=0)):(a=40==t.which?e(".autocomplete-suggestion",s.sc).first():e(".autocomplete-suggestion",s.sc).last(),s.val(a.addClass("selected").data("val"))),s.updateSC(0,a),!1}if(27==t.which)s.val(s.last_val).sc.hide();else if(13==t.which||9==t.which){var c=e(".autocomplete-suggestion.selected",s.sc);c.length&&s.sc.is(":visible")&&(o.onSelect(t,c.data("val"),c),setTimeout(function(){s.sc.hide()},20))}}),s.on("keyup.autocomplete",function(a){if(!~e.inArray(a.which,[13,27,35,36,37,38,39,40])){var c=s.val();if(c.length>=o.minChars){if(c!=s.last_val){if(s.last_val=c,clearTimeout(s.timer),o.cache){if(c in s.cache)return void t(s.cache[c]);for(var l=1;l<c.length-o.minChars;l++){var i=c.slice(0,c.length-l);if(i in s.cache&&!s.cache[i].length)return void t([])}}s.timer=setTimeout(function(){o.source(c,t)},o.delay)}}else s.last_val=c,s.sc.hide()}})})},e.fn.autoComplete.defaults={source:0,minChars:3,delay:150,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'<div class="autocomplete-suggestion" data-val="'+e+'">'+e.replace(o,"<b>$1</b>")+"</div>"},onSelect:function(e,t,o){}}}(jQuery);
|
@ -7,13 +7,14 @@
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_ADMIN_THEME.'img/favicon.png?version='.BLUDIT_VERSION ?>">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG.'favicon.png?version='.BLUDIT_VERSION ?>">
|
||||
|
||||
<!-- CSS -->
|
||||
<?php
|
||||
echo Theme::cssBootstrap();
|
||||
echo Theme::css(array(
|
||||
'bludit.css'
|
||||
'bludit.css',
|
||||
'bludit.bootstrap.css'
|
||||
), DOMAIN_ADMIN_THEME_CSS);
|
||||
?>
|
||||
|
||||
|
1
bl-kernel/admin/themes/gris
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 09138280134ec8014982f260c1ebb6a5b0091fdc
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('About'), 'icon'=>'info'));
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('About'), 'icon'=>'info-circle'));
|
||||
|
||||
echo '
|
||||
<table class="table table-striped mt-3">
|
||||
@ -10,7 +10,7 @@ echo '
|
||||
echo '<tr>';
|
||||
echo '<td>Bludit Edition</td>';
|
||||
if (defined('BLUDIT_PRO')) {
|
||||
echo '<td>PRO - '.$L->g('Thanks for support Bludit').'</td>';
|
||||
echo '<td>PRO - '.$L->g('Thanks for supporting Bludit').' <span class="fa fa-heart" style="color: #ffc107"></span></td>';
|
||||
} else {
|
||||
echo '<td>Standard - <a target="_blank" href="https://pro.bludit.com">'.$L->g('Upgrade to Bludit PRO').'</a></td>';
|
||||
}
|
||||
@ -31,6 +31,11 @@ echo '<td>Bludit Build Number</td>';
|
||||
echo '<td>'.BLUDIT_BUILD.'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>Disk usage</td>';
|
||||
echo '<td>'.Filesystem::bytesToHumanFileSize(Filesystem::getSize(PATH_ROOT)).'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'developers'.'">Bludit Developers</a></td>';
|
||||
echo '<td></td>';
|
||||
|
59
bl-kernel/admin/views/blocks.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
|
||||
<div class="align-middle">
|
||||
<div class="float-right mt-1">
|
||||
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||
</div>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Blocks'), 'icon'=>'box')); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// Token CSRF
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'tokenCSRF',
|
||||
'value'=>$security->getTokenCSRF()
|
||||
));
|
||||
|
||||
foreach ($blocks->getAll() as $block) {
|
||||
echo Bootstrap::formTitle(array('title'=>$block->title()));
|
||||
|
||||
if (Text::isNotEmpty( $block->description() )) {
|
||||
echo Bootstrap::alert(array('class'=>'alert-primary', 'text'=>$block->description()));
|
||||
}
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'key[]',
|
||||
'label'=>$L->g('Key'),
|
||||
'value'=>$block->key(),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>'',
|
||||
'readonly'=>true
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'title[]',
|
||||
'label'=>$L->g('title'),
|
||||
'value'=>$block->title(),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo Bootstrap::formTextarea(array(
|
||||
'name'=>'value[]',
|
||||
'label'=>$L->g('Value'),
|
||||
'value'=>$block->value(),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>'',
|
||||
'rows'=>5
|
||||
));
|
||||
}
|
||||
|
||||
echo Bootstrap::formClose();
|
||||
|
||||
?>
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Content'), 'icon'=>'layers'));
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Content'), 'icon'=>'archive'));
|
||||
|
||||
function table($type) {
|
||||
global $url;
|
||||
@ -10,6 +10,7 @@ function table($type) {
|
||||
global $scheduled;
|
||||
global $static;
|
||||
global $sticky;
|
||||
global $autosave;
|
||||
|
||||
if ($type=='published') {
|
||||
$list = $published;
|
||||
@ -51,25 +52,32 @@ function table($type) {
|
||||
echo '</p>';
|
||||
return false;
|
||||
}
|
||||
} elseif ($type=='autosave') {
|
||||
$list = $autosave;
|
||||
}
|
||||
|
||||
echo '
|
||||
<table class="table mt-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="font-size: 0.8em;" class="border-0 text-uppercase text-muted" scope="col">'.$L->g('Title').'</th>
|
||||
<th style="font-size: 0.8em;" class="border-0 d-none d-lg-table-cell text-uppercase text-muted" scope="col">'.$L->g('URL').'</th>
|
||||
<th style="font-size: 0.8em;" class="border-0 text-center d-none d-sm-table-cell text-uppercase text-muted" scope="col">'.$L->g('Actions').'</th>
|
||||
<th class="border-0" scope="col">'.$L->g('Title').'</th>
|
||||
';
|
||||
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
echo '<th class="border-0 d-none d-lg-table-cell" scope="col">'.$L->g('URL').'</th>';
|
||||
}
|
||||
|
||||
echo ' <th class="border-0 text-center d-sm-table-cell" scope="col">'.$L->g('Actions').'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
';
|
||||
|
||||
if (ORDER_BY=='position') {
|
||||
if ( (ORDER_BY=='position') || $type=='static' ) {
|
||||
foreach ($list as $pageKey) {
|
||||
try {
|
||||
$page = new Page($pageKey);
|
||||
if (!$page->isChild() || $type!='published') {
|
||||
if (!$page->isChild()) {
|
||||
echo '<tr>
|
||||
<td>
|
||||
<div>
|
||||
@ -82,18 +90,23 @@ function table($type) {
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key();
|
||||
echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
}
|
||||
|
||||
echo '<td class="pt-3 text-center d-none d-sm-table-cell w-25">'.PHP_EOL;
|
||||
echo '<a class="btn btn-outline-secondary btn-sm mb-1" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><span class="oi oi-pencil"></span> '.$L->g('Edit').'</a>'.PHP_EOL;
|
||||
echo '<button type="button" class="btn btn-outline-danger btn-sm deletePageButton mb-1" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><span class="oi oi-trash"></span> '.$L->g('Delete').'</button>'.PHP_EOL;
|
||||
echo '<td class="contentTools pt-3 text-center d-sm-table-cell">'.PHP_EOL;
|
||||
echo '<a class="text-secondary d-none d-md-inline" target="_blank" href="'.$page->permalink().'"><i class="fa fa-desktop"></i>'.$L->g('View').'</a>'.PHP_EOL;
|
||||
echo '<a class="text-secondary d-none d-md-inline ml-2" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="fa fa-edit"></i>'.$L->g('Edit').'</a>'.PHP_EOL;
|
||||
if (count($page->children())==0) {
|
||||
echo '<a href="#" class="ml-2 text-danger deletePageButton d-block d-sm-inline" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><i class="fa fa-trash"></i>'.$L->g('Delete').'</a>'.PHP_EOL;
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
echo '</tr>';
|
||||
|
||||
foreach ($page->children() as $child) {
|
||||
if ($child->published()) {
|
||||
//if ($child->published()) {
|
||||
echo '<tr>
|
||||
<td class="child">
|
||||
<div>
|
||||
@ -106,16 +119,21 @@ function table($type) {
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$child->key() : '/'.$url->filters('page').'/'.$child->key();
|
||||
echo '<td><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
}
|
||||
|
||||
echo '<td class="pt-3 text-center d-none d-sm-table-cell w-25">'.PHP_EOL;
|
||||
echo '<a class="btn btn-outline-secondary btn-sm mb-1" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'"><span class="oi oi-pencil"></span> '.$L->g('Edit').'</a>'.PHP_EOL;
|
||||
echo '<button type="button" class="btn btn-outline-danger btn-sm deletePageButton mb-1" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$child->key().'"><span class="oi oi-trash"></span> '.$L->g('Delete').'</button>'.PHP_EOL;
|
||||
echo '<td class="contentTools pt-3 text-center d-sm-table-cell">'.PHP_EOL;
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
echo '<a class="text-secondary d-none d-md-inline" target="_blank" href="'.$page->permalink().'"><i class="fa fa-desktop"></i>'.$L->g('View').'</a>'.PHP_EOL;
|
||||
}
|
||||
echo '<a class="text-secondary d-none d-md-inline ml-2" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'"><i class="fa fa-edit"></i>'.$L->g('Edit').'</a>'.PHP_EOL;
|
||||
echo '<a class="ml-2 text-danger deletePageButton d-block d-sm-inline" href="#" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$child->key().'"><i class="fa fa-trash"></i>'.$L->g('Delete').'</a>'.PHP_EOL;
|
||||
echo '</td>';
|
||||
|
||||
echo '</tr>';
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
@ -134,16 +152,23 @@ function table($type) {
|
||||
.'</a>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 0.8em" class="m-0 text-uppercase text-muted">'.( ((ORDER_BY=='position') || ($type!='published'))?$L->g('Position').': '.$page->position():$page->date(MANAGE_CONTENT_DATE_FORMAT) ).'</p>
|
||||
<p style="font-size: 0.8em" class="m-0 text-uppercase text-muted">'.( ($type=='scheduled')?$L->g('Scheduled').': '.$page->date(SCHEDULED_DATE_FORMAT):$page->date(MANAGE_CONTENT_DATE_FORMAT) ).'</p>
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key();
|
||||
echo '<td class="pt-3 d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
}
|
||||
|
||||
echo '<td class="pt-3 text-center d-none d-sm-table-cell w-25">'.PHP_EOL;
|
||||
echo '<a class="btn btn-outline-secondary btn-sm mb-1" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><span class="oi oi-pencil"></span> '.$L->g('Edit').'</a>'.PHP_EOL;
|
||||
echo '<button type="button" class="btn btn-outline-danger btn-sm deletePageButton mb-1" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><span class="oi oi-trash"></span> '.$L->g('Delete').'</button>'.PHP_EOL;
|
||||
echo '<td class="contentTools pt-3 text-center d-sm-table-cell">'.PHP_EOL;
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
echo '<a class="text-secondary d-none d-md-inline" target="_blank" href="'.$page->permalink().'"><i class="fa fa-desktop"></i>'.$L->g('View').'</a>'.PHP_EOL;
|
||||
}
|
||||
echo '<a class="text-secondary d-none d-md-inline ml-2" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="fa fa-edit"></i>'.$L->g('Edit').'</a>'.PHP_EOL;
|
||||
if (count($page->children())==0) {
|
||||
echo '<a href="#" class="ml-2 text-danger deletePageButton d-block d-sm-inline" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><i class="fa fa-trash"></i>'.$L->g('Delete').'</a>'.PHP_EOL;
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
echo '</tr>';
|
||||
@ -176,12 +201,18 @@ function table($type) {
|
||||
<a class="nav-link" id="scheduled-tab" data-toggle="tab" href="#scheduled" role="tab"><?php $L->p('Scheduled') ?> <?php if (count($scheduled)>0) { echo '<span class="badge badge-danger">'.count($scheduled).'</span>'; } ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="draft-tab" data-toggle="tab" href="#draft" role="tab"><?php $L->p('Draft') ?> <?php if (count($drafts)>0) { echo '<span class="badge badge-danger">'.count($drafts).'</span>'; } ?></a>
|
||||
<a class="nav-link" id="draft-tab" data-toggle="tab" href="#draft" role="tab"><?php $L->p('Draft') ?></a>
|
||||
</li>
|
||||
<?php if (!empty($autosave)): ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="autosave-tab" data-toggle="tab" href="#autosave" role="tab"><?php $L->p('Autosave') ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- TABS PAGES -->
|
||||
<div class="tab-pane show active" id="pages" role="tabpanel">
|
||||
|
||||
<?php table('published'); ?>
|
||||
|
||||
<?php if (Paginator::numberOfPages() > 1): ?>
|
||||
@ -191,7 +222,7 @@ function table($type) {
|
||||
|
||||
<!-- First button -->
|
||||
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::firstPageUrl() ?>"><span class="align-middle oi oi-media-skip-backward"></span> <?php echo $L->get('First'); ?></a>
|
||||
<a class="page-link" href="<?php echo Paginator::firstPageUrl() ?>"><span class="align-middle fa fa-media-skip-backward"></span> <?php echo $L->get('First'); ?></a>
|
||||
</li>
|
||||
|
||||
<!-- Previous button -->
|
||||
@ -206,7 +237,7 @@ function table($type) {
|
||||
|
||||
<!-- Last button -->
|
||||
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::lastPageUrl() ?>"><?php echo $L->get('Last'); ?> <span class="align-middle oi oi-media-skip-forward"></span></a>
|
||||
<a class="page-link" href="<?php echo Paginator::lastPageUrl() ?>"><?php echo $L->get('Last'); ?> <span class="align-middle fa fa-media-skip-forward"></span></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@ -233,6 +264,13 @@ function table($type) {
|
||||
<div class="tab-pane" id="draft" role="tabpanel">
|
||||
<?php table('draft'); ?>
|
||||
</div>
|
||||
|
||||
<!-- TABS AUTOSAVE -->
|
||||
<?php if (!empty($autosave)): ?>
|
||||
<div class="tab-pane" id="autosave" role="tabpanel">
|
||||
<?php table('autosave'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Modal for delete page -->
|
||||
@ -281,3 +319,9 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Open the tab defined in the URL
|
||||
const anchor = window.location.hash;
|
||||
$(`a[href="${anchor}"]`).tab('show');
|
||||
</script>
|
@ -1,23 +1,25 @@
|
||||
<div id="dashboard" class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-7 d-none d-sm-block">
|
||||
<div class="col-md-7">
|
||||
|
||||
<!-- Good message -->
|
||||
<div>
|
||||
<h2 id="hello-message"><?php echo $L->g('hello') ?></h2>
|
||||
<h2 id="hello-message" class="pt-0">
|
||||
<span class="fa fa-hand-spock-o"></span><span><?php echo $L->g('hello') ?></span>
|
||||
</h2>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$("#hello-message").fadeOut(1000, function() {
|
||||
var date = new Date()
|
||||
var hours = date.getHours()
|
||||
if (hours > 6 && hours < 12) {
|
||||
$(this).html('<span class="oi oi-sun"></span> <?php echo $L->g('good-morning') ?>');
|
||||
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-morning') ?>');
|
||||
} else if (hours > 12 && hours < 18) {
|
||||
$(this).html('<span class="oi oi-sun"></span> <?php echo $L->g('good-afternoon') ?>');
|
||||
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-afternoon') ?>');
|
||||
} else if (hours > 18 && hours < 22) {
|
||||
$(this).html('<span class="oi oi-moon"></span> <?php echo $L->g('good-evening') ?>');
|
||||
$(this).html('<span class="fa fa-moon-o"></span><?php echo $L->g('good-evening') ?>');
|
||||
} else {
|
||||
$(this).html('<span class="oi oi-moon"></span> <?php echo $L->g('good-night') ?>');
|
||||
$(this).html('<span class="fa fa-moon-o"></span><span><?php echo $L->g('good-night') ?></span>');
|
||||
}
|
||||
}).fadeIn(1000);
|
||||
});
|
||||
@ -25,46 +27,89 @@
|
||||
</div>
|
||||
|
||||
<!-- Quick Links -->
|
||||
<div class="container border-bottom pb-4">
|
||||
<h4 class="pb-3"><?php $L->p('Quick links') ?></h4>
|
||||
<div class="container border-bottom pb-5" id="jsclippyContainer">
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<a class="quick-links text-center" style="color: #4586d4" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>">
|
||||
<div class="oi oi-justify-left quick-links-icons"></div>
|
||||
<div><?php $L->p('New content') ?></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col border-left border-right">
|
||||
<a class="quick-links text-center" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>">
|
||||
<div class="oi oi-tags quick-links-icons"></div>
|
||||
<div><?php $L->p('Categories') ?></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<a class="quick-links text-center" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>">
|
||||
<div class="oi oi-people quick-links-icons"></div>
|
||||
<div><?php $L->p('Users') ?></div>
|
||||
</a>
|
||||
<div class="form-group">
|
||||
<select id="jsclippy" class="clippy" name="state"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
var clippy = $("#jsclippy").select2({
|
||||
placeholder: "<?php $L->p('Start typing to see a list of suggestions') ?>",
|
||||
allowClear: true,
|
||||
width: "100%",
|
||||
theme: "bootstrap4",
|
||||
minimumInputLength: 2,
|
||||
dropdownParent: "#jsclippyContainer",
|
||||
language: {
|
||||
inputTooShort: function () { return ''; }
|
||||
},
|
||||
ajax: {
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/clippy",
|
||||
data: function (params) {
|
||||
var query = { query: params.term }
|
||||
return query;
|
||||
},
|
||||
processResults: function (data) {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
templateResult: function(data) {
|
||||
// console.log(data);
|
||||
var html = '';
|
||||
if (data.type=='menu') {
|
||||
html += '<a href="'+data.url+'"><div class="search-suggestion">';
|
||||
html += '<span class="fa fa-'+data.icon+'"></span>'+data.text+'</div></a>';
|
||||
} else {
|
||||
if (typeof data.id === 'undefined') {
|
||||
return '';
|
||||
}
|
||||
html += '<div class="search-suggestion">';
|
||||
html += '<div class="search-suggestion-item">'+data.text+' <span class="badge badge-pill badge-light">'+data.type+'</span></div>';
|
||||
html += '<div class="search-suggestion-options">';
|
||||
html += '<a target="_blank" href="'+DOMAIN_PAGES+data.id+'"><?php $L->p('view') ?></a>';
|
||||
html += '<a class="ml-2" href="'+DOMAIN_ADMIN+'edit-content/'+data.id+'"><?php $L->p('edit') ?></a>';
|
||||
html += '</div></div>';
|
||||
}
|
||||
|
||||
return html;
|
||||
},
|
||||
escapeMarkup: function(markup) {
|
||||
return markup;
|
||||
}
|
||||
}).on("select2:closing", function(e) {
|
||||
e.preventDefault();
|
||||
}).on("select2:closed", function(e) {
|
||||
clippy.select2("open");
|
||||
});
|
||||
clippy.select2("open");
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="container mt-4">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<a class="quick-links text-center" target="_blank" href="https://docs.bludit.com">
|
||||
<div class="oi oi-compass quick-links-icons"></div>
|
||||
<div class="fa fa-compass quick-links-icons"></div>
|
||||
<div><?php $L->p('Documentation') ?></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col border-left border-right">
|
||||
<a class="quick-links text-center" target="_blank" href="https://forum.bludit.org">
|
||||
<div class="oi oi-loop-square quick-links-icons"></div>
|
||||
<div class="fa fa-support quick-links-icons"></div>
|
||||
<div><?php $L->p('Forum support') ?></div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<a class="quick-links text-center" target="_blank" href="https://gitter.im/bludit/support">
|
||||
<div class="oi oi-chat quick-links-icons"></div>
|
||||
<div class="fa fa-comments quick-links-icons"></div>
|
||||
<div><?php $L->p('Chat support') ?></div>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Developers'), 'icon'=>'beaker'));
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Developers'), 'icon'=>'gears'));
|
||||
|
||||
echo '<h2 class="mb-4 mt-4"><b>PHP version: '.phpversion().'</b></h2>';
|
||||
|
||||
@ -34,5 +34,5 @@ $constants = get_defined_constants(true);
|
||||
printTable('Bludit Constants', $constants['user']);
|
||||
|
||||
// Site object
|
||||
printTable('$Site object database',$site->db);
|
||||
printTable('$site object database',$site->db);
|
||||
|
||||
|
@ -14,17 +14,11 @@ echo Bootstrap::formOpen(array(
|
||||
'value'=>$security->getTokenCSRF()
|
||||
));
|
||||
|
||||
// Parent
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'parent',
|
||||
'value'=>$page->parent()
|
||||
));
|
||||
|
||||
// UUID
|
||||
// The UUID is generated in the controller
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'uuid',
|
||||
'value'=>$uuid
|
||||
'value'=>$page->uuid()
|
||||
));
|
||||
|
||||
// Type = published, draft, sticky, static
|
||||
@ -53,27 +47,20 @@ echo Bootstrap::formOpen(array(
|
||||
?>
|
||||
|
||||
<!-- TOOLBAR -->
|
||||
<div id="jseditorToolbar">
|
||||
<div id="jseditorToolbar" class="mb-1">
|
||||
<div id="jseditorToolbarRight" class="btn-group btn-group-sm float-right" role="group" aria-label="Toolbar right">
|
||||
<button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><span class="oi oi-image"></span> <?php $L->p('Images') ?></button>
|
||||
<button type="button" class="btn btn-light" id="jsoptionsSidebar" style="z-index:30"><span class="oi oi-cog"></span> <?php $L->p('Options') ?></button>
|
||||
<button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><span class="fa fa-image"></span> <?php $L->p('Images') ?></button>
|
||||
<button type="button" class="btn btn-light" id="jsoptionsSidebar" style="z-index:30"><span class="fa fa-cog"></span> <?php $L->p('Options') ?></button>
|
||||
</div>
|
||||
|
||||
<div id="jseditorToolbarLeft">
|
||||
<button type="button" class="btn btn-sm btn-primary" id="jsbuttonSave"><?php echo ($page->draft()?$L->g('Publish'):$L->g('Save')) ?></button>
|
||||
|
||||
<?php if($page->draft()): ?>
|
||||
<button type="button" class="btn btn-sm btn-secondary" id="jsbuttonDraft"><?php $L->p('Save as draft') ?></button>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (count($page->children())==0): ?>
|
||||
<button type="button" class="btn btn-sm btn-danger" id="jsbuttonDelete" data-toggle="modal" data-target="#jsdeletePageModal"><?php $L->p('Delete') ?></button>
|
||||
<?php endif; ?>
|
||||
|
||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-sm btn-secondary"><?php $L->p('Cancel') ?></a>
|
||||
<button type="button" class="btn btn-sm btn-primary" id="jsbuttonSave"><?php echo $L->g('Save') ?></button>
|
||||
<button id="jsbuttonPreview" type="button" class="btn btn-sm btn-secondary"><?php $L->p('Preview') ?></button>
|
||||
<span id="jsswitchButton" data-switch="<?php echo ($page->draft()?'draft':'publish') ?>" class="ml-2 text-secondary switch-button"><i class="fa fa-square switch-icon-<?php echo ($page->draft()?'draft':'publish') ?>"></i> <?php echo ($page->draft()?$L->g('Draft'):$L->g('Publish')) ?></span>
|
||||
</div>
|
||||
<?php if($page->draft()): ?>
|
||||
<div class="alert alert-warning p-1 mt-1 mb-0"><?php $L->p('the-content-is-saved-as-a-draft-to-publish-it') ?></div>
|
||||
|
||||
<?php if($page->scheduled()): ?>
|
||||
<div class="alert alert-warning p-1 mt-1 mb-0"><?php $L->p('scheduled') ?>: <?php echo $page->date(SCHEDULED_DATE_FORMAT) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<script>
|
||||
@ -96,6 +83,9 @@ echo Bootstrap::formOpen(array(
|
||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||
<a class="nav-link active show" id="nav-general-tab" data-toggle="tab" href="#nav-general" role="tab" aria-controls="general"><?php $L->p('General') ?></a>
|
||||
<a class="nav-link" id="nav-advanced-tab" data-toggle="tab" href="#nav-advanced" role="tab" aria-controls="advanced"><?php $L->p('Advanced') ?></a>
|
||||
<?php if (!empty($site->customFields())): ?>
|
||||
<a class="nav-link" id="nav-custom-tab" data-toggle="tab" href="#nav-custom" role="tab" aria-controls="custom"><?php $L->p('Custom') ?></a>
|
||||
<?php endif ?>
|
||||
<a class="nav-link" id="nav-seo-tab" data-toggle="tab" href="#nav-seo" role="tab" aria-controls="seo"><?php $L->p('SEO') ?></a>
|
||||
</div>
|
||||
</nav>
|
||||
@ -120,7 +110,7 @@ echo Bootstrap::formOpen(array(
|
||||
'selected'=>'',
|
||||
'class'=>'',
|
||||
'value'=>$page->description(),
|
||||
'rows'=>3,
|
||||
'rows'=>5,
|
||||
'placeholder'=>$L->get('this-field-can-help-describe-the-content')
|
||||
));
|
||||
?>
|
||||
@ -136,7 +126,7 @@ echo Bootstrap::formOpen(array(
|
||||
?>
|
||||
<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100"><?php $L->p('Cover Image') ?></label>
|
||||
<div>
|
||||
<img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo (empty($coverImage) ? HTML_PATH_ADMIN_THEME_IMG.'default.svg' : $page->coverImage() ) ?>" />
|
||||
<img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo (empty($coverImage) ? HTML_PATH_CORE_IMG.'default.svg' : $page->coverImage() ) ?>" />
|
||||
</div>
|
||||
<div class="mt-2 text-center">
|
||||
<button type="button" id="jsbuttonSelectCoverImage" class="btn btn-primary btn-sm"><?php echo $L->g('Select cover image') ?></button>
|
||||
@ -154,7 +144,7 @@ echo Bootstrap::formOpen(array(
|
||||
|
||||
$("#jsbuttonRemoveCoverImage").on("click", function() {
|
||||
$("#jscoverImage").val('');
|
||||
$("#jscoverImagePreview").attr('src', HTML_PATH_ADMIN_THEME_IMG+'default.svg');
|
||||
$("#jscoverImagePreview").attr('src', HTML_PATH_CORE_IMG+'default.svg');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -172,7 +162,7 @@ echo Bootstrap::formOpen(array(
|
||||
|
||||
// Type
|
||||
echo Bootstrap::formSelectBlock(array(
|
||||
'name'=>'typeTMP',
|
||||
'name'=>'typeSelector',
|
||||
'label'=>$L->g('Type'),
|
||||
'selected'=>$page->type(),
|
||||
'options'=>array(
|
||||
@ -202,20 +192,62 @@ echo Bootstrap::formOpen(array(
|
||||
|
||||
// Parent
|
||||
try {
|
||||
$options = array();
|
||||
$parentKey = $page->parent();
|
||||
$parent = new Page($parentKey);
|
||||
$parentValue = $parent->title();
|
||||
if (!empty($parentKey)) {
|
||||
$parent = new Page($parentKey);
|
||||
$options = array($parentKey=>$parent->title());
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$parentValue = '';
|
||||
// continue
|
||||
}
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'parentTMP',
|
||||
echo Bootstrap::formSelectBlock(array(
|
||||
'name'=>'parent',
|
||||
'label'=>$L->g('Parent'),
|
||||
'placeholder'=>'',
|
||||
'options'=>$options,
|
||||
'selected'=>false,
|
||||
'class'=>'',
|
||||
'tip'=>$L->g('Start typing a page title to see a list of suggestions.'),
|
||||
'value'=>$parentValue
|
||||
));
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var parent = $("#jsparent").select2({
|
||||
placeholder: "",
|
||||
allowClear: true,
|
||||
theme: "bootstrap4",
|
||||
minimumInputLength: 2,
|
||||
ajax: {
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
|
||||
data: function (params) {
|
||||
var query = {
|
||||
checkIsParent: true,
|
||||
query: params.term
|
||||
}
|
||||
return query;
|
||||
},
|
||||
processResults: function (data) {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
escapeMarkup: function(markup) {
|
||||
return markup;
|
||||
},
|
||||
templateResult: function(data) {
|
||||
var html = data.text
|
||||
if (data.type=="static") {
|
||||
html += '<span class="badge badge-pill badge-light">'+data.type+'</span>';
|
||||
}
|
||||
return html;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
// Template
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'template',
|
||||
@ -250,47 +282,42 @@ echo Bootstrap::formOpen(array(
|
||||
$("#jscoverImage").val( $(this).val() );
|
||||
});
|
||||
|
||||
// Parent
|
||||
$("#jsparentTMP").change(function() {
|
||||
var parent = $("#jsparentTMP").val();
|
||||
if (parent.length===0) {
|
||||
$("#jsparent").val("");
|
||||
}
|
||||
});
|
||||
|
||||
// Datepicker
|
||||
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
|
||||
|
||||
// Parent autocomplete
|
||||
var parentsXHR;
|
||||
var parentsList; // Keep the parent list returned to get the key by the title page
|
||||
$("#jsparentTMP").autoComplete({
|
||||
minChars: 1,
|
||||
source: function(term, response) {
|
||||
// Prevent call inmediatly another ajax request
|
||||
try { parentsXHR.abort(); } catch(e){}
|
||||
// Get the list of parent pages by title (term)
|
||||
parentsXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-parents", {query: term},
|
||||
function(data) {
|
||||
parentsList = data;
|
||||
term = term.toLowerCase();
|
||||
var matches = [];
|
||||
for (var title in data) {
|
||||
if (~title.toLowerCase().indexOf(term))
|
||||
matches.push(title);
|
||||
}
|
||||
response(matches);
|
||||
});
|
||||
},
|
||||
onSelect: function(event, term, item) {
|
||||
// parentsList = array( pageTitle => pageKey )
|
||||
var parentKey = parentsList[term];
|
||||
$("#jsparent").attr("value", parentKey);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($site->customFields())): ?>
|
||||
<div id="nav-custom" class="tab-pane fade" role="tabpanel" aria-labelledby="custom-tab">
|
||||
<?php
|
||||
$customFields = $site->customFields();
|
||||
foreach ($customFields as $field=>$options) {
|
||||
if ( !isset($options['position']) ) {
|
||||
if ($options['type']=="string") {
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'value'=>(isset($options['default'])?$options['default']:''),
|
||||
'tip'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'value'=>$page->custom($field)
|
||||
));
|
||||
} elseif ($options['type']=="bool") {
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'checked'=>$page->custom($field),
|
||||
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:'')
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div id="nav-seo" class="tab-pane fade" role="tabpanel" aria-labelledby="seo-tab">
|
||||
<?php
|
||||
// Friendly URL
|
||||
@ -336,13 +363,75 @@ echo Bootstrap::formOpen(array(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom fields: TOP -->
|
||||
<?php
|
||||
$customFields = $site->customFields();
|
||||
foreach ($customFields as $field=>$options) {
|
||||
if ( isset($options['position']) && ($options['position']=='top') ) {
|
||||
if ($options['type']=="string") {
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'value'=>$page->custom($field),
|
||||
'tip'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'class'=>'mb-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
|
||||
));
|
||||
} elseif ($options['type']=="bool") {
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'checked'=>$page->custom($field),
|
||||
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'class'=>'mb-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Title -->
|
||||
<div class="form-group mt-1 mb-1">
|
||||
<div class="form-group mb-1">
|
||||
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="<?php echo $page->title() ?>" placeholder="<?php $L->p('Enter title') ?>">
|
||||
</div>
|
||||
|
||||
<!-- Editor -->
|
||||
<div id="jseditor" class="editable h-100" style=""><?php echo $page->contentRaw(false) ?></div>
|
||||
<textarea id="jseditor" class="editable h-100" style=""><?php echo $page->contentRaw(true) ?></textarea>
|
||||
|
||||
<!-- Custom fields: BOTTOM -->
|
||||
<?php
|
||||
$customFields = $site->customFields();
|
||||
foreach ($customFields as $field=>$options) {
|
||||
if ( isset($options['position']) && ($options['position']=='bottom') ) {
|
||||
if ($options['type']=="string") {
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'value'=>$page->custom($field),
|
||||
'tip'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'class'=>'mt-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
|
||||
));
|
||||
} elseif ($options['type']=="bool") {
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'checked'=>$page->custom($field),
|
||||
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'class'=>'mt-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
@ -377,11 +466,51 @@ echo Bootstrap::formOpen(array(
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
// Button Publish or Save
|
||||
// Define function if they doesn't exist
|
||||
// This helps if the user doesn't activate any plugin as editor
|
||||
if (typeof editorGetContent != "function") {
|
||||
window.editorGetContent = function(){
|
||||
return $("#jseditor").val();
|
||||
};
|
||||
}
|
||||
if (typeof editorInsertMedia != "function") {
|
||||
window.editorInsertMedia = function(filename){
|
||||
$("#jseditor").val($('#jseditor').val()+'<img src="'+filename+'" alt="">');
|
||||
};
|
||||
}
|
||||
|
||||
// Button switch
|
||||
$("#jsswitchButton").on("click", function() {
|
||||
if ($(this).data("switch")=="publish") {
|
||||
$(this).html('<i class="fa fa-square switch-icon-draft"></i> <?php $L->p('Draft') ?>');
|
||||
$(this).data("switch", "draft");
|
||||
} else {
|
||||
$(this).html('<i class="fa fa-square switch-icon-publish"></i> <?php $L->p('Publish') ?>');
|
||||
$(this).data("switch", "publish");
|
||||
}
|
||||
});
|
||||
|
||||
// Button preview
|
||||
$("#jsbuttonPreview").on("click", function() {
|
||||
var uuid = $("#jsuuid").val();
|
||||
var title = $("#jstitle").val();
|
||||
var content = editorGetContent();
|
||||
var ajax = new bluditAjax();
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
var preview = window.open("<?php echo DOMAIN_PAGES.'autosave-'.$page->uuid().'?preview='.md5('autosave-'.$page->uuid()) ?>", "bludit-preview");
|
||||
preview.focus();
|
||||
});
|
||||
});
|
||||
|
||||
// Button Save
|
||||
$("#jsbuttonSave").on("click", function() {
|
||||
// Get the type
|
||||
var type = $("#jstypeTMP option:selected").val();
|
||||
$("#jstype").val(type);
|
||||
// If the switch is setted to "published", get the value from the selector
|
||||
if ($("#jsswitchButton").data("switch")=="publish") {
|
||||
var value = $("#jstypeSelector option:selected").val();
|
||||
$("#jstype").val(value);
|
||||
} else {
|
||||
$("#jstype").val("draft");
|
||||
}
|
||||
|
||||
// Get the content
|
||||
$("#jscontent").val( editorGetContent() );
|
||||
@ -403,18 +532,23 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
// Autosave
|
||||
// Autosave works when the content of the page is bigger than 100 characters
|
||||
var currentContent = editorGetContent();
|
||||
setInterval(function() {
|
||||
var uuid = $("#jsuuid").val();
|
||||
var title = $("#jstitle").val();
|
||||
var title = $("#jstitle").val() + "[<?php $L->p('Autosave') ?>]";
|
||||
var content = editorGetContent();
|
||||
var ajax = new bluditAjax();
|
||||
// Call autosave only when the user change the content
|
||||
// Autosave when content has at least 100 characters
|
||||
if (content.length<100) {
|
||||
return false;
|
||||
}
|
||||
// Autosave only when the user change the content
|
||||
if (currentContent!=content) {
|
||||
currentContent = content;
|
||||
// showAlert is the function to display an alert defined in alert.php
|
||||
ajax.autosave(uuid, title, content, showAlert);
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
if (data.status==0) {
|
||||
showAlert("<?php $L->p('Autosave') ?>");
|
||||
}
|
||||
});
|
||||
}
|
||||
},1000*60*AUTOSAVE_INTERVAL);
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||
</div>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Edit user'), 'icon'=>'person')); ?>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Edit user'), 'icon'=>'user')); ?>
|
||||
</div>
|
||||
|
||||
<!-- TABS -->
|
||||
@ -53,10 +53,10 @@
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name'=>'role',
|
||||
'label'=>$L->g('Role'),
|
||||
'options'=>array('writer'=>$L->g('Writer'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
||||
'options'=>array('author'=>$L->g('Author'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
||||
'selected'=>$user->role(),
|
||||
'class'=>'',
|
||||
'tip'=>''
|
||||
'tip'=>$L->g('author-can-write-and-edit-their-own-content')
|
||||
));
|
||||
}
|
||||
|
||||
@ -100,29 +100,45 @@
|
||||
|
||||
<!-- Profile picture tab -->
|
||||
<div class="tab-pane fade" id="picture" role="tabpanel" aria-labelledby="nav-picture-tab">
|
||||
<div class="custom-file mb-2">
|
||||
<input type="file" class="custom-file-input" id="jsprofilePictureInputFile" name="profilePictureInputFile">
|
||||
<label class="custom-file-label" for="jsprofilePictureInputFile"><?php $L->p('Choose images to upload'); ?></label>
|
||||
</div>
|
||||
<div>
|
||||
<img id="jsprofilePicturePreview" class="img-fluid img-thumbnail" alt="Profile picture preview" src="<?php echo (Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png?version='.time():HTML_PATH_ADMIN_THEME_IMG.'default.svg') ?>" />
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-sm-12 p-0 pr-2">
|
||||
<div class="custom-file">
|
||||
<input type="file" class="custom-file-input" id="jsprofilePictureInputFile" name="profilePictureInputFile">
|
||||
<label class="custom-file-label" for="jsprofilePictureInputFile"><?php $L->p('Upload image'); ?></label>
|
||||
</div>
|
||||
<!-- <button id="jsbuttonRemovePicture" type="button" class="btn btn-primary w-100 mt-4 mb-4"><i class="fa fa-trash"></i> Remove picture</button> -->
|
||||
</div>
|
||||
<div class="col-lg-8 col-sm-12 p-0 text-center">
|
||||
<img id="jsprofilePicturePreview" class="img-fluid img-thumbnail" alt="Profile picture preview" src="<?php echo (Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png?version='.time():HTML_PATH_CORE_IMG.'default.svg') ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
// $("#jsbuttonRemovePicture").on("click", function() {
|
||||
// var username = $("#jsusername").val();
|
||||
// bluditAjax.removeProfilePicture(username);
|
||||
// $("#jsprofilePicturePreview").attr("src", "<?php echo HTML_PATH_CORE_IMG.'default.svg' ?>");
|
||||
// });
|
||||
|
||||
$("#jsprofilePictureInputFile").on("change", function() {
|
||||
var formData = new FormData();
|
||||
formData.append('tokenCSRF', tokenCSRF);
|
||||
formData.append('profilePictureInputFile', $(this)[0].files[0]);
|
||||
formData.append('username', $("#jsusername").val());
|
||||
$.ajax({
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/profile-picture",
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/profile-picture-upload",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false
|
||||
}).done(function(json) {
|
||||
console.log(json);
|
||||
$("#jsprofilePicturePreview").attr('src',json.absoluteURL+"?time="+Math.random());
|
||||
}).done(function(data) {
|
||||
if (data.status==0) {
|
||||
$("#jsprofilePicturePreview").attr('src',data.absoluteURL+"?time="+Math.random());
|
||||
} else {
|
||||
showAlert(data.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -251,8 +267,32 @@
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'vk',
|
||||
'label'=>'VK',
|
||||
'value'=>$user->vk(),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo Bootstrap::formClose(); ?>
|
||||
|
||||
<script>
|
||||
// Open current tab after refresh page
|
||||
$(function() {
|
||||
$('a[data-toggle="tab"]').on('click', function(e) {
|
||||
window.localStorage.setItem('activeTab', $(e.target).attr('href'));
|
||||
console.log($(e.target).attr('href'));
|
||||
});
|
||||
var activeTab = window.localStorage.getItem('activeTab');
|
||||
if (activeTab) {
|
||||
$('#nav-tab a[href="' + activeTab + '"]').tab('show');
|
||||
//window.localStorage.removeItem("activeTab");
|
||||
}
|
||||
});
|
||||
</script>
|
@ -11,7 +11,7 @@ echo Bootstrap::formOpen(array());
|
||||
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<input type="text" value="'.(isset($_POST['username'])?$_POST['username']:'').'" class="form-control form-control-lg" id="jsusername" name="username" placeholder="'.$L->g('Username').'">
|
||||
<input type="text" value="'.(isset($_POST['username'])?$_POST['username']:'').'" class="form-control form-control-lg" id="jsusername" name="username" placeholder="'.$L->g('Username').'" autofocus>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
@ -14,12 +14,6 @@ echo Bootstrap::formOpen(array(
|
||||
'value'=>$security->getTokenCSRF()
|
||||
));
|
||||
|
||||
// Parent
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'parent',
|
||||
'value'=>''
|
||||
));
|
||||
|
||||
// UUID
|
||||
// The UUID is generated in the controller
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
@ -47,16 +41,16 @@ echo Bootstrap::formOpen(array(
|
||||
?>
|
||||
|
||||
<!-- TOOLBAR -->
|
||||
<div id="jseditorToolbar">
|
||||
<div id="jseditorToolbar" class="mb-1">
|
||||
<div id="jseditorToolbarRight" class="btn-group btn-group-sm float-right" role="group" aria-label="Toolbar right">
|
||||
<button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><span class="oi oi-image"></span> <?php $L->p('Images') ?></button>
|
||||
<button type="button" class="btn btn-light" id="jsoptionsSidebar" style="z-index:30"><span class="oi oi-cog"></span> <?php $L->p('Options') ?></button>
|
||||
<button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><span class="fa fa-image"></span> <?php $L->p('Images') ?></button>
|
||||
<button type="button" class="btn btn-light" id="jsoptionsSidebar" style="z-index:30"><span class="fa fa-cog"></span> <?php $L->p('Options') ?></button>
|
||||
</div>
|
||||
|
||||
<div id="jseditorToolbarLeft">
|
||||
<button type="button" class="btn btn-sm btn-primary" id="jsbuttonSave"><?php $L->p('Publish') ?></button>
|
||||
<button type="button" class="btn btn-sm btn-secondary" id="jsbuttonDraft"><?php $L->p('Save as draft') ?></button>
|
||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT ?>dashboard" class="btn btn-sm btn-secondary"><?php $L->p('Cancel') ?></a>
|
||||
<button id="jsbuttonSave" type="button" class="btn btn-sm btn-primary" ><?php $L->p('Save') ?></button>
|
||||
<button id="jsbuttonPreview" type="button" class="btn btn-sm btn-secondary"><?php $L->p('Preview') ?></button>
|
||||
<span id="jsbuttonSwitch" data-switch="publish" class="ml-2 text-secondary switch-button"><i class="fa fa-square switch-icon-publish"></i> <?php $L->p('Publish') ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
@ -79,6 +73,9 @@ echo Bootstrap::formOpen(array(
|
||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||
<a class="nav-link active show" id="nav-general-tab" data-toggle="tab" href="#nav-general" role="tab" aria-controls="general"><?php $L->p('General') ?></a>
|
||||
<a class="nav-link" id="nav-advanced-tab" data-toggle="tab" href="#nav-advanced" role="tab" aria-controls="advanced"><?php $L->p('Advanced') ?></a>
|
||||
<?php if (!empty($site->customFields())): ?>
|
||||
<a class="nav-link" id="nav-custom-tab" data-toggle="tab" href="#nav-custom" role="tab" aria-controls="custom"><?php $L->p('Custom') ?></a>
|
||||
<?php endif ?>
|
||||
<a class="nav-link" id="nav-seo-tab" data-toggle="tab" href="#nav-seo" role="tab" aria-controls="seo"><?php $L->p('SEO') ?></a>
|
||||
</div>
|
||||
</nav>
|
||||
@ -103,7 +100,7 @@ echo Bootstrap::formOpen(array(
|
||||
'selected'=>'',
|
||||
'class'=>'',
|
||||
'value'=>'',
|
||||
'rows'=>3,
|
||||
'rows'=>5,
|
||||
'placeholder'=>$L->get('this-field-can-help-describe-the-content')
|
||||
));
|
||||
?>
|
||||
@ -111,7 +108,7 @@ echo Bootstrap::formOpen(array(
|
||||
<!-- Cover Image -->
|
||||
<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100"><?php $L->p('Cover Image') ?></label>
|
||||
<div>
|
||||
<img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo HTML_PATH_ADMIN_THEME_IMG ?>default.svg" />
|
||||
<img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo HTML_PATH_CORE_IMG ?>default.svg" />
|
||||
</div>
|
||||
<div class="mt-2 text-center">
|
||||
<button type="button" id="jsbuttonSelectCoverImage" class="btn btn-primary btn-sm"><?php echo $L->g('Select cover image') ?></button>
|
||||
@ -129,7 +126,7 @@ echo Bootstrap::formOpen(array(
|
||||
|
||||
$("#jsbuttonRemoveCoverImage").on("click", function() {
|
||||
$("#jscoverImage").val('');
|
||||
$("#jscoverImagePreview").attr('src', HTML_PATH_ADMIN_THEME_IMG+'default.svg');
|
||||
$("#jscoverImagePreview").attr('src', HTML_PATH_CORE_IMG+'default.svg');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -147,7 +144,7 @@ echo Bootstrap::formOpen(array(
|
||||
|
||||
// Type
|
||||
echo Bootstrap::formSelectBlock(array(
|
||||
'name'=>'typeTMP',
|
||||
'name'=>'typeSelector',
|
||||
'label'=>$L->g('Type'),
|
||||
'selected'=>'',
|
||||
'options'=>array(
|
||||
@ -175,14 +172,52 @@ echo Bootstrap::formOpen(array(
|
||||
));
|
||||
|
||||
// Parent
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'parentTMP',
|
||||
echo Bootstrap::formSelectBlock(array(
|
||||
'name'=>'parent',
|
||||
'label'=>$L->g('Parent'),
|
||||
'placeholder'=>'',
|
||||
'options'=>array(),
|
||||
'selected'=>false,
|
||||
'class'=>'',
|
||||
'tip'=>$L->g('Start typing a page title to see a list of suggestions.'),
|
||||
'value'=>''
|
||||
));
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var parent = $("#jsparent").select2({
|
||||
placeholder: "",
|
||||
allowClear: true,
|
||||
theme: "bootstrap4",
|
||||
minimumInputLength: 2,
|
||||
ajax: {
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
|
||||
data: function (params) {
|
||||
var query = {
|
||||
checkIsParent: true,
|
||||
query: params.term
|
||||
}
|
||||
return query;
|
||||
},
|
||||
processResults: function (data) {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
escapeMarkup: function(markup) {
|
||||
return markup;
|
||||
},
|
||||
templateResult: function(data) {
|
||||
var html = data.text;
|
||||
if (data.type=="static") {
|
||||
html += '<span class="badge badge-pill badge-light">'+data.type+'</span>';
|
||||
}
|
||||
return html;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
// Template
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'template',
|
||||
@ -210,8 +245,10 @@ echo Bootstrap::formOpen(array(
|
||||
'disabled'=>true
|
||||
));
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
// Changes in External cover image input
|
||||
$("#jsexternalCoverImage").change(function() {
|
||||
$("#jscoverImage").val( $(this).val() );
|
||||
@ -230,36 +267,38 @@ echo Bootstrap::formOpen(array(
|
||||
// Datepicker
|
||||
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
|
||||
|
||||
// Parent autocomplete
|
||||
var parentsXHR;
|
||||
var parentsList; // Keep the parent list returned to get the key by the title page
|
||||
$("#jsparentTMP").autoComplete({
|
||||
minChars: 1,
|
||||
source: function(term, response) {
|
||||
// Prevent call inmediatly another ajax request
|
||||
try { parentsXHR.abort(); } catch(e){}
|
||||
// Get the list of parent pages by title (term)
|
||||
parentsXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-parents", {query: term},
|
||||
function(data) {
|
||||
parentsList = data;
|
||||
term = term.toLowerCase();
|
||||
var matches = [];
|
||||
for (var title in data) {
|
||||
if (~title.toLowerCase().indexOf(term))
|
||||
matches.push(title);
|
||||
}
|
||||
response(matches);
|
||||
});
|
||||
},
|
||||
onSelect: function(event, term, item) {
|
||||
// parentsList = array( pageTitle => pageKey )
|
||||
var parentKey = parentsList[term];
|
||||
$("#jsparent").attr("value", parentKey);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<?php if (!empty($site->customFields())): ?>
|
||||
<div id="nav-custom" class="tab-pane fade" role="tabpanel" aria-labelledby="custom-tab">
|
||||
<?php
|
||||
$customFields = $site->customFields();
|
||||
foreach ($customFields as $field=>$options) {
|
||||
if ( !isset($options['position']) ) {
|
||||
if ($options['type']=="string") {
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'value'=>(isset($options['default'])?$options['default']:''),
|
||||
'tip'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:'')
|
||||
));
|
||||
} elseif ($options['type']=="bool") {
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'checked'=>(isset($options['checked'])?true:false),
|
||||
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:'')
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div id="nav-seo" class="tab-pane fade" role="tabpanel" aria-labelledby="seo-tab">
|
||||
<?php
|
||||
// Friendly URL
|
||||
@ -304,13 +343,76 @@ echo Bootstrap::formOpen(array(
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom fields: TOP -->
|
||||
<?php
|
||||
$customFields = $site->customFields();
|
||||
foreach ($customFields as $field=>$options) {
|
||||
if ( isset($options['position']) && ($options['position']=='top') ) {
|
||||
if ($options['type']=="string") {
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'value'=>(isset($options['default'])?$options['default']:''),
|
||||
'tip'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'class'=>'mb-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
|
||||
));
|
||||
} elseif ($options['type']=="bool") {
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'checked'=>(isset($options['checked'])?true:false),
|
||||
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'class'=>'mb-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<div id="jseditorTitle" class="form-group mt-1 mb-1">
|
||||
<div id="jseditorTitle" class="form-group mb-1">
|
||||
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="" placeholder="<?php $L->p('Enter title') ?>">
|
||||
</div>
|
||||
|
||||
<!-- Editor -->
|
||||
<div id="jseditor" class="editable h-100 mb-1"></div>
|
||||
<textarea id="jseditor" class="editable h-100 mb-1"></textarea>
|
||||
|
||||
<!-- Custom fields: BOTTOM -->
|
||||
<?php
|
||||
$customFields = $site->customFields();
|
||||
foreach ($customFields as $field=>$options) {
|
||||
if ( isset($options['position']) && ($options['position']=='bottom') ) {
|
||||
if ($options['type']=="string") {
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'value'=>(isset($options['default'])?$options['default']:''),
|
||||
'tip'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'class'=>'mt-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
|
||||
));
|
||||
} elseif ($options['type']=="bool") {
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'checked'=>(isset($options['checked'])?true:false),
|
||||
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'class'=>'mt-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
@ -320,23 +422,50 @@ echo Bootstrap::formOpen(array(
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
// Button Publish or Save
|
||||
$("#jsbuttonSave").on("click", function() {
|
||||
// Get the type
|
||||
var type = $("#jstypeTMP option:selected").val();
|
||||
$("#jstype").val(type);
|
||||
// Define function if they doesn't exist
|
||||
// This helps if the user doesn't activate any plugin as editor
|
||||
if (typeof editorGetContent != "function") {
|
||||
window.editorGetContent = function(){
|
||||
return $("#jseditor").val();
|
||||
};
|
||||
}
|
||||
if (typeof editorInsertMedia != "function") {
|
||||
window.editorInsertMedia = function(filename){
|
||||
$("#jseditor").val($('#jseditor').val()+'<img src="'+filename+'" alt="">');
|
||||
};
|
||||
}
|
||||
|
||||
// Get the content
|
||||
$("#jscontent").val( editorGetContent() );
|
||||
|
||||
// Submit the form
|
||||
$("#jsform").submit();
|
||||
// Button switch
|
||||
$("#jsbuttonSwitch").on("click", function() {
|
||||
if ($(this).data("switch")=="publish") {
|
||||
$(this).html('<i class="fa fa-square switch-icon-draft"></i> <?php $L->p('Draft') ?>');
|
||||
$(this).data("switch", "draft");
|
||||
} else {
|
||||
$(this).html('<i class="fa fa-square switch-icon-publish"></i> <?php $L->p('Publish') ?>');
|
||||
$(this).data("switch", "publish");
|
||||
}
|
||||
});
|
||||
|
||||
// Button Save as draft
|
||||
$("#jsbuttonDraft").on("click", function() {
|
||||
// Set the type as draft
|
||||
$("#jstype").val("draft");
|
||||
// Button preview
|
||||
$("#jsbuttonPreview").on("click", function() {
|
||||
var uuid = $("#jsuuid").val();
|
||||
var title = $("#jstitle").val();
|
||||
var content = editorGetContent();
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
var preview = window.open("<?php echo DOMAIN_PAGES.'autosave-'.$uuid.'?preview='.md5('autosave-'.$uuid) ?>", "bludit-preview");
|
||||
preview.focus();
|
||||
});
|
||||
});
|
||||
|
||||
// Button Save
|
||||
$("#jsbuttonSave").on("click", function() {
|
||||
// If the switch is setted to "published", get the value from the selector
|
||||
if ($("#jsbuttonSwitch").data("switch")=="publish") {
|
||||
var value = $("#jstypeSelector option:selected").val();
|
||||
$("#jstype").val(value);
|
||||
} else {
|
||||
$("#jstype").val("draft");
|
||||
}
|
||||
|
||||
// Get the content
|
||||
$("#jscontent").val( editorGetContent() );
|
||||
@ -346,14 +475,24 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
// Autosave
|
||||
// Autosave works when the content of the page is bigger than 100 characters
|
||||
var currentContent = editorGetContent();
|
||||
setInterval(function() {
|
||||
var uuid = $("#jsuuid").val();
|
||||
var title = $("#jstitle").val();
|
||||
var title = $("#jstitle").val() + "[<?php $L->p('Autosave') ?>]";
|
||||
var content = editorGetContent();
|
||||
var ajax = new bluditAjax();
|
||||
// showAlert is the function to display an alert defined in alert.php
|
||||
ajax.autosave(uuid, title, content, showAlert);
|
||||
// Autosave when content has at least 100 characters
|
||||
if (content.length<100) {
|
||||
return false;
|
||||
}
|
||||
// Autosave only when the user change the content
|
||||
if (currentContent!=content) {
|
||||
currentContent = content;
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
if (data.status==0) {
|
||||
showAlert("<?php $L->p('Autosave') ?>");
|
||||
}
|
||||
});
|
||||
}
|
||||
},1000*60*AUTOSAVE_INTERVAL);
|
||||
|
||||
});
|
||||
|
@ -7,7 +7,7 @@
|
||||
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||
</div>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'person')); ?>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'user')); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@ -48,10 +48,10 @@
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name'=>'role',
|
||||
'label'=>$L->g('Role'),
|
||||
'options'=>array('editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
||||
'selected'=>'Editor',
|
||||
'options'=>array('author'=>$L->g('Author'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
||||
'selected'=>'Author',
|
||||
'class'=>'',
|
||||
'tip'=>''
|
||||
'tip'=>$L->g('author-can-write-and-edit-their-own-content')
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
echo '<ul class="list-group list-group-sortable">';
|
||||
foreach ($plugins['siteSidebar'] as $Plugin) {
|
||||
echo '<li class="list-group-item" data-plugin="'.$Plugin->className().'"><span class="oi oi-move"></span> '.$Plugin->name().'</li>';
|
||||
echo '<li class="list-group-item" data-plugin="'.$Plugin->className().'"><span class="fa fa-arrows-v"></span> '.$Plugin->name().'</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
?>
|
||||
|
@ -5,42 +5,95 @@ echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece
|
||||
echo Bootstrap::link(array(
|
||||
'title'=>$L->g('Change the position of the plugins'),
|
||||
'href'=>HTML_PATH_ADMIN_ROOT.'plugins-position',
|
||||
'icon'=>'elevator'
|
||||
'icon'=>'arrows'
|
||||
));
|
||||
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Search plugins')));
|
||||
|
||||
?>
|
||||
|
||||
<input type="text" class="form-control" id="search" placeholder="<?php $L->p('Search') ?>">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#search").on("keyup", function() {
|
||||
var textToSearch = $(this).val().toLowerCase();
|
||||
$(".searchItem").each( function() {
|
||||
var item = $(this);
|
||||
item.hide();
|
||||
item.find(".searchText").each( function() {
|
||||
var element = $(this).text().toLowerCase();
|
||||
if (element.indexOf(textToSearch)!=-1) {
|
||||
item.show();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Enabled plugins')));
|
||||
|
||||
echo '
|
||||
<table class="table mt-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="border-bottom-0 w-25" scope="col">'.$L->g('Name').'</th>
|
||||
<th class="border-bottom-0 d-none d-sm-table-cell" scope="col">'.$L->g('Description').'</th>
|
||||
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Version').'</th>
|
||||
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Author').'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<table class="table">
|
||||
<tbody>
|
||||
';
|
||||
|
||||
foreach ($plugins['all'] as $plugin) {
|
||||
echo '<tr id="'.$plugin->className().'" '.($plugin->installed()?'class="bg-light"':'').'>
|
||||
// Show installed plugins
|
||||
foreach ($pluginsInstalled as $plugin) {
|
||||
echo '<tr id="'.$plugin->className().'" class="bg-light searchItem">';
|
||||
|
||||
<td class="align-middle pt-3 pb-3">
|
||||
<div>'.$plugin->name().'</div>
|
||||
echo '<td class="align-middle pt-3 pb-3 w-25">
|
||||
<div class="searchText">'.$plugin->name().'</div>
|
||||
<div class="mt-1">';
|
||||
|
||||
if ($plugin->installed()) {
|
||||
if (method_exists($plugin, 'form')) {
|
||||
echo '<a class="mr-3" href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$plugin->className().'">'.$L->g('Settings').'</a>';
|
||||
}
|
||||
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$plugin->className().'">'.$L->g('Deactivate').'</a>';
|
||||
} else {
|
||||
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$plugin->className().'">'.$L->g('Activate').'</a>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td class="align-middle d-none d-sm-table-cell">';
|
||||
echo '<td class="searchText align-middle d-none d-sm-table-cell">';
|
||||
echo $plugin->description();
|
||||
echo '</td>';
|
||||
|
||||
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
|
||||
echo '<span>'.$plugin->version().'</span>';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td class="text-center align-middle d-none d-lg-table-cell">
|
||||
<a target="_blank" href="'.$plugin->website().'">'.$plugin->author().'</a>
|
||||
</td>';
|
||||
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</tbody>
|
||||
</table>
|
||||
';
|
||||
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Disabled plugins')));
|
||||
|
||||
echo '
|
||||
<table class="table">
|
||||
<tbody>
|
||||
';
|
||||
|
||||
// Plugins not installed
|
||||
$pluginsNotInstalled = array_diff_key($plugins['all'], $pluginsInstalled);
|
||||
foreach ($pluginsNotInstalled as $plugin) {
|
||||
echo '<tr id="'.$plugin->className().'" class="searchItem">';
|
||||
|
||||
echo '<td class="align-middle pt-3 pb-3 w-25">
|
||||
<div class="searchText">'.$plugin->name().'</div>
|
||||
<div class="mt-1">
|
||||
<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$plugin->className().'">'.$L->g('Activate').'</a>
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
echo '<td class="searchText align-middle d-none d-sm-table-cell">';
|
||||
echo $plugin->description();
|
||||
echo '</td>';
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
<a class="nav-item nav-link" id="nav-social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="nav-social" aria-selected="false"><?php $L->p('Social Networks') ?></a>
|
||||
<a class="nav-item nav-link" id="nav-images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="nav-images" aria-selected="false"><?php $L->p('Images') ?></a>
|
||||
<a class="nav-item nav-link" id="nav-language-tab" data-toggle="tab" href="#language" role="tab" aria-controls="nav-language" aria-selected="false"><?php $L->p('Language') ?></a>
|
||||
<a class="nav-item nav-link" id="nav-custom-fields-tab" data-toggle="tab" href="#custom-fields" role="tab" aria-controls="nav-custom-fields" aria-selected="false"><?php $L->p('Custom fields') ?></a>
|
||||
<a class="nav-item nav-link" id="nav-logo-tab" data-toggle="tab" href="#logo" role="tab" aria-controls="nav-logo" aria-selected="false"><?php $L->p('Logo') ?></a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@ -28,16 +30,11 @@
|
||||
'name'=>'tokenCSRF',
|
||||
'value'=>$security->getTokenCSRF()
|
||||
));
|
||||
|
||||
// Homepage
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'homepage',
|
||||
'value'=>$site->homepage()
|
||||
));
|
||||
?>
|
||||
|
||||
<!-- General tab -->
|
||||
<div class="tab-pane show active" id="general" role="tabpanel" aria-labelledby="general-tab">
|
||||
<div class="tab-pane fade show active" id="general" role="tabpanel" aria-labelledby="general-tab">
|
||||
|
||||
<?php
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Site')));
|
||||
|
||||
@ -80,7 +77,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Advanced tab -->
|
||||
<div class="tab-pane" id="advanced" role="tabpanel" aria-labelledby="advanced-tab">
|
||||
<div class="tab-pane fade" id="advanced" role="tabpanel" aria-labelledby="advanced-tab">
|
||||
<?php
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Content')));
|
||||
|
||||
@ -106,32 +103,95 @@
|
||||
|
||||
// Homepage
|
||||
try {
|
||||
$options = array();
|
||||
$homeKey = $site->homepage();
|
||||
$home = new Page($homeKey);
|
||||
$homeValue = $home->title();
|
||||
if (!empty($homeKey)) {
|
||||
$home = new Page($homeKey);
|
||||
$options = array($homeKey=>$home->title());
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$homeValue = '';
|
||||
// continue
|
||||
}
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'homepageTMP',
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name'=>'homepage',
|
||||
'label'=>$L->g('Homepage'),
|
||||
'value'=>$homeValue,
|
||||
'options'=>$options,
|
||||
'selected'=>false,
|
||||
'class'=>'',
|
||||
'placeholder'=>$L->g('Start typing a page title to see a list of suggestions.'),
|
||||
'tip'=>$L->g('Returning page for the main page')
|
||||
));
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var homepage = $("#jshomepage").select2({
|
||||
placeholder: "<?php $L->p('Start typing to see a list of suggestions.') ?>",
|
||||
allowClear: true,
|
||||
theme: "bootstrap4",
|
||||
minimumInputLength: 2,
|
||||
ajax: {
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
|
||||
data: function (params) {
|
||||
var query = { query: params.term }
|
||||
return query;
|
||||
},
|
||||
processResults: function (data) {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
escapeMarkup: function(markup) {
|
||||
return markup;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
$homepageOptions[' '] = '- '.$L->g('Default message').' -';
|
||||
<?php
|
||||
// Page not found 404
|
||||
try {
|
||||
$options = array();
|
||||
$pageNotFoundKey = $site->pageNotFound();
|
||||
if (!empty($pageNotFoundKey)) {
|
||||
$pageNotFound = new Page($pageNotFoundKey);
|
||||
$options = array($pageNotFoundKey=>$pageNotFound->title());
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// continue
|
||||
}
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name'=>'pageNotFound',
|
||||
'label'=>$L->g('Page not found'),
|
||||
'options'=>$homepageOptions,
|
||||
'selected'=>$site->pageNotFound(),
|
||||
'options'=>$options,
|
||||
'selected'=>false,
|
||||
'class'=>'',
|
||||
'tip'=>$L->g('Returning page when the page doesnt exist')
|
||||
));
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var homepage = $("#jspageNotFound").select2({
|
||||
placeholder: "<?php $L->p('Start typing to see a list of suggestions.') ?>",
|
||||
allowClear: true,
|
||||
theme: "bootstrap4",
|
||||
minimumInputLength: 2,
|
||||
ajax: {
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
|
||||
data: function (params) {
|
||||
var query = { query: params.term }
|
||||
return query;
|
||||
},
|
||||
processResults: function (data) {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
escapeMarkup: function(markup) {
|
||||
return markup;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Email account settings')));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
@ -166,6 +226,17 @@
|
||||
'placeholder'=>'https://'
|
||||
));
|
||||
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Page content')));
|
||||
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name'=>'markdownParser',
|
||||
'label'=>$L->g('Markdown parser'),
|
||||
'options'=>array('true'=>$L->g('Enabled'), 'false'=>$L->g('Disabled')),
|
||||
'selected'=>($site->markdownParser()?'true':'false'),
|
||||
'class'=>'',
|
||||
'tip'=>$L->g('Enable the markdown parser for the content of the page.')
|
||||
));
|
||||
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('URL Filters')));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
@ -208,7 +279,7 @@
|
||||
</div>
|
||||
|
||||
<!-- SEO tab -->
|
||||
<div class="tab-pane" id="seo" role="tabpanel" aria-labelledby="seo-tab">
|
||||
<div class="tab-pane fade" id="seo" role="tabpanel" aria-labelledby="seo-tab">
|
||||
<?php
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Extreme friendly URL')));
|
||||
|
||||
@ -264,52 +335,9 @@
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
// Parent autocomplete
|
||||
var homepageXHR;
|
||||
var homepageList; // Keep the parent list returned to get the key by the title page
|
||||
$("#jshomepageTMP").autoComplete({
|
||||
minChars: 1,
|
||||
source: function(term, response) {
|
||||
// Prevent call inmediatly another ajax request
|
||||
try { homepageXHR.abort(); } catch(e){}
|
||||
homepageXHR = $.getJSON(HTML_PATH_ADMIN_ROOT+"ajax/get-published", {query: term},
|
||||
function(data) {
|
||||
homepageList = data;
|
||||
term = term.toLowerCase();
|
||||
var matches = [];
|
||||
for (var title in data) {
|
||||
if (~title.toLowerCase().indexOf(term))
|
||||
matches.push(title);
|
||||
}
|
||||
response(matches);
|
||||
});
|
||||
},
|
||||
onSelect: function(e, term, item) {
|
||||
// homepageList = array( pageTitle => pageKey )
|
||||
var key = homepageList[term];
|
||||
$("#jshomepage").attr("value", key);
|
||||
}
|
||||
});
|
||||
|
||||
$("#jshomepageTMP").change(function() {
|
||||
if ($(this).val()) {
|
||||
$("#jsuriBlog").removeAttr('disabled');
|
||||
$("#jsuriBlog").attr('value', '/blog/');
|
||||
} else {
|
||||
$("#jsuriBlog").attr('value', '');
|
||||
$("#jsuriBlog").attr('disabled', 'disabled');
|
||||
$("#jshomepage").attr("value", '');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Social Network tab -->
|
||||
<div class="tab-pane" id="social" role="tabpanel" aria-labelledby="social-tab">
|
||||
<div class="tab-pane fade" id="social" role="tabpanel" aria-labelledby="social-tab">
|
||||
<?php
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'twitter',
|
||||
@ -382,11 +410,29 @@
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'dribbble',
|
||||
'label'=>'Dribbble',
|
||||
'value'=>$site->dribbble(),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'vk',
|
||||
'label'=>'VK',
|
||||
'value'=>$site->vk(),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Images tab -->
|
||||
<div class="tab-pane" id="images" role="tabpanel" aria-labelledby="images-tab">
|
||||
<div class="tab-pane fade" id="images" role="tabpanel" aria-labelledby="images-tab">
|
||||
<?php
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Thumbnails')));
|
||||
|
||||
@ -420,7 +466,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Timezone and language tab -->
|
||||
<div class="tab-pane" id="language" role="tabpanel" aria-labelledby="language-tab">
|
||||
<div class="tab-pane fade" id="language" role="tabpanel" aria-labelledby="language-tab">
|
||||
<?php
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Language and timezone')));
|
||||
|
||||
@ -464,4 +510,83 @@
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Custom fields -->
|
||||
<div class="tab-pane fade" id="custom-fields" role="tabpanel" aria-labelledby="custom-fields-tab">
|
||||
<?php
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Custom fields')));
|
||||
|
||||
echo Bootstrap::formTextarea(array(
|
||||
'name'=>'customFields',
|
||||
'label'=>'JSON Format',
|
||||
'value'=>json_encode($site->customFields(), JSON_PRETTY_PRINT),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>$L->g('define-custom-fields-for-the-content'),
|
||||
'rows'=>15
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Site logo tab -->
|
||||
<div class="tab-pane fade" id="logo" role="tabpanel" aria-labelledby="logo-tab">
|
||||
<?php
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Site logo')));
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-sm-12 p-0 pr-2">
|
||||
<div class="custom-file">
|
||||
<input id="jssiteLogoInputFile" class="custom-file-input" type="file" name="inputFile">
|
||||
<label for="jssiteLogoInputFile" class="custom-file-label"><?php $L->p('Upload image'); ?></label>
|
||||
</div>
|
||||
<button id="jsbuttonRemoveLogo" type="button" class="btn btn-primary w-100 mt-4 mb-4"><i class="fa fa-trash"></i><?php $L->p('Remove logo') ?></button>
|
||||
</div>
|
||||
<div class="col-lg-8 col-sm-12 p-0 text-center">
|
||||
<img id="jssiteLogoPreview" class="img-fluid img-thumbnail" alt="Site logo preview" src="<?php echo ($site->logo()?DOMAIN_UPLOADS.$site->logo(false).'?version='.time():HTML_PATH_CORE_IMG.'default.svg') ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("#jsbuttonRemoveLogo").on("click", function() {
|
||||
bluditAjax.removeLogo();
|
||||
$("#jssiteLogoPreview").attr("src", "<?php echo HTML_PATH_CORE_IMG.'default.svg' ?>");
|
||||
});
|
||||
|
||||
$("#jssiteLogoInputFile").on("change", function() {
|
||||
var formData = new FormData();
|
||||
formData.append('tokenCSRF', tokenCSRF);
|
||||
formData.append('inputFile', $(this)[0].files[0]);
|
||||
$.ajax({
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/logo-upload",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false
|
||||
}).done(function(data) {
|
||||
if (data.status==0) {
|
||||
$("#jssiteLogoPreview").attr('src',data.absoluteURL+"?time="+Math.random());
|
||||
} else {
|
||||
showAlert(data.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<?php echo Bootstrap::formClose(); ?>
|
||||
|
||||
<script>
|
||||
// Open current tab after refresh page
|
||||
$(function() {
|
||||
$('a[data-toggle="tab"]').on('click', function(e) {
|
||||
window.localStorage.setItem('activeTab', $(e.target).attr('href'));
|
||||
});
|
||||
var activeTab = window.localStorage.getItem('activeTab');
|
||||
if (activeTab) {
|
||||
$('#nav-tab a[href="' + activeTab + '"]').tab('show');
|
||||
//window.localStorage.removeItem("activeTab");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'edit-user/'.$user->username() ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||
</div>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'person')); ?>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Change password'), 'icon'=>'user')); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<?php
|
||||
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'people'));
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'users'));
|
||||
|
||||
echo Bootstrap::link(array(
|
||||
'title'=>$L->g('add-a-new-user'),
|
||||
@ -30,7 +30,7 @@ foreach ($list as $username) {
|
||||
try {
|
||||
$user = new User($username);
|
||||
echo '<tr>';
|
||||
echo '<td><img class="profilePicture mr-1" alt="" src="'.(Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png':HTML_PATH_ADMIN_THEME_IMG.'default.svg').'" /><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>';
|
||||
echo '<td><img class="profilePicture mr-1" alt="" src="'.(Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png':HTML_PATH_CORE_IMG.'default.svg').'" /><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>';
|
||||
echo '<td class="d-none d-lg-table-cell">'.$user->nickname().'</td>';
|
||||
echo '<td>'.$user->email().'</td>';
|
||||
echo '<td>'.($user->enabled()?'<b>'.$L->g('Enabled').'</b>':$L->g('Disabled')).'</td>';
|
||||
@ -38,6 +38,8 @@ foreach ($list as $username) {
|
||||
echo '<td>'.$L->g('Administrator').'</td>';
|
||||
} elseif ($user->role()=='editor') {
|
||||
echo '<td>'.$L->g('Editor').'</td>';
|
||||
} elseif ($user->role()=='author') {
|
||||
echo '<td>'.$L->g('Author').'</td>';
|
||||
} else {
|
||||
echo '<td>'.$L->g('Reader').'</td>';
|
||||
}
|
||||
|
68
bl-kernel/ajax/clippy.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// $_GET
|
||||
// ----------------------------------------------------------------------------
|
||||
// (string) $_GET['query']
|
||||
$query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false;
|
||||
// ----------------------------------------------------------------------------
|
||||
if ($query===false) {
|
||||
ajaxResponse(1, 'Invalid query.');
|
||||
}
|
||||
|
||||
$result = array();
|
||||
|
||||
// MENU
|
||||
if (Text::stringContains(Text::lowercase($L->g('New content')), $query)) {
|
||||
$tmp = array('disabled'=>true, 'icon'=>'plus-circle', 'type'=>'menu');
|
||||
$tmp['text'] = $L->g('New content');
|
||||
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'new-content';
|
||||
array_push($result, $tmp);
|
||||
}
|
||||
if (Text::stringContains(Text::lowercase($L->g('New category')), $query)) {
|
||||
$tmp = array('disabled'=>true, 'icon'=>'tag', 'type'=>'menu');
|
||||
$tmp['text'] = $L->g('New category');
|
||||
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'new-category';
|
||||
array_push($result, $tmp);
|
||||
}
|
||||
if (Text::stringContains(Text::lowercase($L->g('New user')), $query)) {
|
||||
$tmp = array('disabled'=>true, 'icon'=>'user', 'type'=>'menu');
|
||||
$tmp['text'] = $L->g('New user');
|
||||
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'new-user';
|
||||
array_push($result, $tmp);
|
||||
}
|
||||
if (Text::stringContains(Text::lowercase($L->g('Categories')), $query)) {
|
||||
$tmp = array('disabled'=>true, 'icon'=>'tags', 'type'=>'menu');
|
||||
$tmp['text'] = $L->g('Categories');
|
||||
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'categories';
|
||||
array_push($result, $tmp);
|
||||
}
|
||||
if (Text::stringContains(Text::lowercase($L->g('Users')), $query)) {
|
||||
$tmp = array('disabled'=>true, 'icon'=>'users', 'type'=>'menu');
|
||||
$tmp['text'] = $L->g('Users');
|
||||
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'users';
|
||||
array_push($result, $tmp);
|
||||
}
|
||||
|
||||
|
||||
// PAGES
|
||||
$pagesKey = $pages->getDB();
|
||||
foreach ($pagesKey as $pageKey) {
|
||||
try {
|
||||
$page = new Page($pageKey);
|
||||
$lowerTitle = Text::lowercase($page->title());
|
||||
if (Text::stringContains($lowerTitle, $query)) {
|
||||
$tmp = array('disabled'=>true);
|
||||
$tmp['id'] = $page->key();
|
||||
$tmp['text'] = $page->title();
|
||||
$tmp['type'] = $page->type();
|
||||
array_push($result, $tmp);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// continue
|
||||
}
|
||||
}
|
||||
|
||||
exit (json_encode(array('results'=>$result)));
|
||||
|
||||
?>
|
49
bl-kernel/ajax/content-get-list.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
| Search for pages that have in the title the string $query and returns the array of pages
|
||||
|
|
||||
| @_GET['published'] boolean True to search in published database
|
||||
| @_GET['static'] boolean True to search in static database
|
||||
| @_GET['sticky'] boolean True to search in sticky database
|
||||
| @_GET['scheduled'] boolean True to search in scheduled database
|
||||
| @_GET['draft'] boolean True to search in draft database
|
||||
| @_GET['query'] string Text to search in the title
|
||||
|
|
||||
| @return array
|
||||
*/
|
||||
|
||||
// $_GET
|
||||
// ----------------------------------------------------------------------------
|
||||
$published = empty($_GET['published']) ? false:true;
|
||||
$static = empty($_GET['static']) ? false:true;
|
||||
$sticky = empty($_GET['sticky']) ? false:true;
|
||||
$scheduled = empty($_GET['scheduled']) ? false:true;
|
||||
$draft = empty($_GET['draft']) ? false:true;
|
||||
$query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false;
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
if ($query===false) {
|
||||
ajaxResponse(1, 'Invalid query.');
|
||||
}
|
||||
|
||||
$pageNumber = 1;
|
||||
$numberOfItems = -1;
|
||||
$pagesKey = $pages->getList($pageNumber, $numberOfItems, $published, $static, $sticky, $draft, $scheduled);
|
||||
$tmp = array();
|
||||
foreach ($pagesKey as $pageKey) {
|
||||
try {
|
||||
$page = new Page($pageKey);
|
||||
$lowerTitle = Text::lowercase($page->title());
|
||||
if (Text::stringContains($lowerTitle, $query)) {
|
||||
$tmp[$page->key()] = $page->json(true);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// continue
|
||||
}
|
||||
}
|
||||
|
||||
exit (json_encode($tmp));
|
||||
|
||||
?>
|
@ -1,20 +1,23 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
| Delete an image from a particular page
|
||||
|
|
||||
| @_POST['filename'] string Name of the file to delete
|
||||
| @_POST['uuid'] string Page UUID
|
||||
|
|
||||
| @return array
|
||||
*/
|
||||
|
||||
// $_POST
|
||||
// ----------------------------------------------------------------------------
|
||||
// (string) $_POST['path'] Name of file to delete, just the filename
|
||||
$filename = isset($_POST['filename']) ? $_POST['filename'] : false;
|
||||
|
||||
// (string) $_POST['uuid']
|
||||
$uuid = empty($_POST['uuid']) ? false : $_POST['uuid'];
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
if ($filename==false) {
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'message'=>'The filename is empty.'
|
||||
)));
|
||||
if ($filename===false) {
|
||||
ajaxResponse(1, 'The filename is empty.');
|
||||
}
|
||||
|
||||
if ($uuid && IMAGE_RESTRICT) {
|
||||
@ -35,9 +38,6 @@ if (Sanitize::pathFile($thumbnailPath.$filename)) {
|
||||
Filesystem::rmfile($thumbnailPath.$filename);
|
||||
}
|
||||
|
||||
exit (json_encode(array(
|
||||
'status'=>0,
|
||||
'message'=>'Image deleted.'
|
||||
)));
|
||||
ajaxResponse(0, 'Image deleted.');
|
||||
|
||||
?>
|
@ -1,15 +1,27 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
| Generate an slug text for the URL
|
||||
|
|
||||
| @_POST['text'] string The text from where is generated the slug
|
||||
| @_POST['parentKey'] string The parent key if the page has one
|
||||
| @_POST['currentKey'] string The current page key
|
||||
|
|
||||
| @return array
|
||||
*/
|
||||
|
||||
// $_POST
|
||||
// ----------------------------------------------------------------------------
|
||||
$text = isset($_POST['text']) ? $_POST['text'] : '';
|
||||
$parent = isset($_POST['parentKey']) ? $_POST['parentKey'] : '';
|
||||
$oldKey = isset($_POST['currentKey']) ? $_POST['currentKey'] : '';
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
$slug = $pages->generateKey($text, $parent, $returnSlug=true, $oldKey);
|
||||
|
||||
exit (json_encode(array(
|
||||
'status'=>0,
|
||||
ajaxResponse(0, 'Slug generated.', array(
|
||||
'slug'=>$slug
|
||||
)));
|
||||
));
|
||||
|
||||
?>
|
@ -1,27 +0,0 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// $_GET
|
||||
// ----------------------------------------------------------------------------
|
||||
// (string) $_GET['query']
|
||||
$query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false;
|
||||
// ----------------------------------------------------------------------------
|
||||
if ($query===false) {
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'files'=>'Invalid query.'
|
||||
)));
|
||||
}
|
||||
|
||||
$tmp = array();
|
||||
$parents = buildParentPages();
|
||||
foreach ($parents as $parent) {
|
||||
$lowerTitle = Text::lowercase($parent->title());
|
||||
if (Text::stringContains($lowerTitle, $query)) {
|
||||
$tmp[$parent->title()] = $parent->key();
|
||||
}
|
||||
}
|
||||
|
||||
exit (json_encode($tmp));
|
||||
|
||||
?>
|
@ -1,29 +1,43 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
| Returns a list of pages and the title contains the query string
|
||||
| The returned list have published, sticky and statics pages
|
||||
|
|
||||
| @_POST['query'] string The string to search in the title of the pages
|
||||
|
|
||||
| @return array
|
||||
*/
|
||||
|
||||
// $_GET
|
||||
// ----------------------------------------------------------------------------
|
||||
// (string) $_GET['query']
|
||||
$query = isset($_GET['query']) ? Text::lowercase($_GET['query']) : false;
|
||||
// (boolean) $_GET['checkIsParent']
|
||||
$checkIsParent = empty($_GET['checkIsParent']) ? false : true;
|
||||
// ----------------------------------------------------------------------------
|
||||
if ($query===false) {
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'files'=>'Invalid query.'
|
||||
)));
|
||||
ajaxResponse(1, 'Invalid query.');
|
||||
}
|
||||
|
||||
$list = array();
|
||||
$published = $pages->getPublishedDB();
|
||||
$statics = $pages->getStaticDB();
|
||||
$pagesKey = array_merge($published, $statics);
|
||||
$result = array();
|
||||
$pagesKey = $pages->getDB();
|
||||
foreach ($pagesKey as $pageKey) {
|
||||
try {
|
||||
$page = new Page($pageKey);
|
||||
if ($page->isParent()) {
|
||||
$lowerTitle = Text::lowercase($page->title());
|
||||
if (Text::stringContains($lowerTitle, $query)) {
|
||||
$tmp[$page->title()] = $page->key();
|
||||
if ($page->isParent() || !$checkIsParent) {
|
||||
// Check page status
|
||||
if ($page->published() || $page->sticky() || $page->isStatic()) {
|
||||
// Check if the query contains in the title
|
||||
$lowerTitle = Text::lowercase($page->title());
|
||||
if (Text::stringContains($lowerTitle, $query)) {
|
||||
$tmp = array('disabled'=>false);
|
||||
$tmp['id'] = $page->key();
|
||||
$tmp['text'] = $page->title();
|
||||
$tmp['type'] = $page->type();
|
||||
array_push($result, $tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
@ -31,6 +45,6 @@ foreach ($pagesKey as $pageKey) {
|
||||
}
|
||||
}
|
||||
|
||||
exit (json_encode($tmp));
|
||||
exit (json_encode(array('results'=>$result)));
|
||||
|
||||
?>
|
@ -1,16 +1,23 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
| Returns a list of images from a particular page
|
||||
|
|
||||
| @_POST['pageNumber'] int Page number for the paginator
|
||||
| @_POST['path'] string Pre-defined name for the directory to read, its pre-defined to avoid security issues
|
||||
| @_POST['uuid'] string Page UUID
|
||||
|
|
||||
| @return array
|
||||
*/
|
||||
|
||||
// $_POST
|
||||
// ----------------------------------------------------------------------------
|
||||
// (integer) $_POST['pageNumber'] > 0
|
||||
// $_POST['pageNumber'] > 0
|
||||
$pageNumber = empty($_POST['pageNumber']) ? 1 : (int)$_POST['pageNumber'];
|
||||
$pageNumber = $pageNumber - 1;
|
||||
|
||||
// (string) $_POST['path']
|
||||
$path = empty($_POST['path']) ? false : $_POST['path'];
|
||||
|
||||
// (string) $_POST['uuid']
|
||||
$uuid = empty($_POST['uuid']) ? false : $_POST['uuid'];
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@ -22,15 +29,12 @@ if ($path=='thumbnails') {
|
||||
$path = PATH_UPLOADS_THUMBNAILS;
|
||||
}
|
||||
} else {
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'files'=>'Invalid path.'
|
||||
)));
|
||||
ajaxResponse(1, 'Invalid path.');
|
||||
}
|
||||
|
||||
// Get all files from the directory $path, also split the array by numberOfItems
|
||||
// The function listFiles split in chunks
|
||||
$listOfFilesByPage = Filesystem::listFiles($path, '*', '*', $GLOBALS['MEDIA_MANAGER_SORT_BY_DATE'], $GLOBALS['MEDIA_MANAGER_NUMBER_OF_FILES']);
|
||||
$listOfFilesByPage = Filesystem::listFiles($path, '*', '*', MEDIA_MANAGER_SORT_BY_DATE, MEDIA_MANAGER_NUMBER_OF_FILES);
|
||||
|
||||
// Check if the page number exists in the chunks
|
||||
if (isset($listOfFilesByPage[$pageNumber])) {
|
||||
@ -44,16 +48,15 @@ if (isset($listOfFilesByPage[$pageNumber])) {
|
||||
|
||||
// Returns the number of chunks for the paginator
|
||||
// Returns the files inside the chunk
|
||||
exit (json_encode(array(
|
||||
'status'=>0,
|
||||
ajaxResponse(0, 'List of files and number of chunks.', array(
|
||||
'numberOfPages'=>count($listOfFilesByPage),
|
||||
'files'=>$files
|
||||
)));
|
||||
));
|
||||
}
|
||||
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'files'=>'Out of index.'
|
||||
)));
|
||||
ajaxResponse(0, 'List of files and number of chunks.', array(
|
||||
'numberOfPages'=>0,
|
||||
'files'=>array()
|
||||
));
|
||||
|
||||
?>
|
22
bl-kernel/ajax/logo-remove.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
| Delete the site logo
|
||||
| This script delete the file and set and empty string in the database
|
||||
|
|
||||
| @return array
|
||||
*/
|
||||
|
||||
// Delete the file
|
||||
$logoFilename = $site->logo(false);
|
||||
if ($logoFilename) {
|
||||
Filesystem::rmfile(PATH_UPLOADS.$logoFilename);
|
||||
}
|
||||
|
||||
// Remove the logo from the database
|
||||
$site->set(array('logo'=>''));
|
||||
|
||||
ajaxResponse(0, 'Logo removed.');
|
||||
|
||||
?>
|
60
bl-kernel/ajax/logo-upload.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
| Upload site logo
|
||||
| The final filename is the site's name and the extension is the same as the file uploaded
|
||||
|
|
||||
| @_FILES['inputFile'] multipart/form-data File from form
|
||||
|
|
||||
| @return array
|
||||
*/
|
||||
|
||||
if (!isset($_FILES['inputFile'])) {
|
||||
ajaxResponse(1, 'Error trying to upload the site logo.');
|
||||
}
|
||||
|
||||
// Check path traversal on $filename
|
||||
if (Text::stringContains($_FILES['inputFile']['name'], DS, false)) {
|
||||
$message = 'Path traversal detected.';
|
||||
Log::set($message, LOG_TYPE_ERROR);
|
||||
ajaxResponse(1, $message);
|
||||
}
|
||||
|
||||
// File extension
|
||||
$fileExtension = Filesystem::extension($_FILES['inputFile']['name']);
|
||||
$fileExtension = Text::lowercase($fileExtension);
|
||||
if (!in_array($fileExtension, $GLOBALS['ALLOWED_IMG_EXTENSION']) ) {
|
||||
$message = $L->g('File type is not supported. Allowed types:').' '.implode(', ',$GLOBALS['ALLOWED_IMG_EXTENSION']);
|
||||
Log::set($message, LOG_TYPE_ERROR);
|
||||
ajaxResponse(1, $message);
|
||||
}
|
||||
|
||||
// Final filename
|
||||
$filename = 'logo.'.$fileExtension;
|
||||
if (Text::isNotEmpty( $site->title() )) {
|
||||
$filename = $site->title().'.'.$fileExtension;
|
||||
}
|
||||
|
||||
// Delete old image
|
||||
$oldFilename = $site->logo(false);
|
||||
if ($oldFilename) {
|
||||
Filesystem::rmfile(PATH_UPLOADS.$oldFilename);
|
||||
}
|
||||
|
||||
// Move from temporary directory to uploads
|
||||
Filesystem::mv($_FILES['inputFile']['tmp_name'], PATH_UPLOADS.$filename);
|
||||
|
||||
// Permissions
|
||||
chmod(PATH_UPLOADS.$filename, 0644);
|
||||
|
||||
// Store the filename in the database
|
||||
$site->set(array('logo'=>$filename));
|
||||
|
||||
ajaxResponse(0, 'Image uploaded.', array(
|
||||
'filename'=>$filename,
|
||||
'absoluteURL'=>DOMAIN_UPLOADS.$filename,
|
||||
'absolutePath'=>PATH_UPLOADS.$filename
|
||||
));
|
||||
|
||||
?>
|
@ -8,23 +8,36 @@ $username = empty($_POST['username']) ? false : $_POST['username'];
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
if ($username===false) {
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'message'=>'Error in username.'
|
||||
)));
|
||||
ajaxResponse(1, 'Error in username.');
|
||||
}
|
||||
|
||||
if ( ($login->role()!='admin') && ($login->username()!=$username) ) {
|
||||
ajaxResponse(1, 'Error in username.');
|
||||
}
|
||||
|
||||
if (!isset($_FILES['profilePictureInputFile'])) {
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'message'=>'Error trying to upload the profile picture.'
|
||||
)));
|
||||
ajaxResponse(1, 'Error trying to upload the profile picture.');
|
||||
}
|
||||
|
||||
// Check path traversal
|
||||
if (Text::stringContains($username, DS, false)) {
|
||||
$message = 'Path traversal detected.';
|
||||
Log::set($message, LOG_TYPE_ERROR);
|
||||
ajaxResponse(1, $message);
|
||||
}
|
||||
|
||||
// Check file extension
|
||||
$fileExtension = Filesystem::extension($_FILES['profilePictureInputFile']['name']);
|
||||
$fileExtension = Text::lowercase($fileExtension);
|
||||
if (!in_array($fileExtension, $GLOBALS['ALLOWED_IMG_EXTENSION']) ) {
|
||||
$message = $L->g('File type is not supported. Allowed types:').' '.implode(', ',$GLOBALS['ALLOWED_IMG_EXTENSION']);
|
||||
Log::set($message, LOG_TYPE_ERROR);
|
||||
ajaxResponse(1, $message);
|
||||
}
|
||||
|
||||
// File extension
|
||||
$fileExtension = pathinfo($_FILES['profilePictureInputFile']['name'], PATHINFO_EXTENSION);
|
||||
// Tmp filename
|
||||
$tmpFilename = $username.'.'.$fileExtension;
|
||||
|
||||
// Final filename
|
||||
$filename = $username.'.png';
|
||||
|
||||
@ -36,18 +49,16 @@ $image = new Image();
|
||||
$image->setImage(PATH_TMP.$tmpFilename, PROFILE_IMG_WIDTH, PROFILE_IMG_HEIGHT, 'crop');
|
||||
$image->saveImage(PATH_UPLOADS_PROFILES.$filename, PROFILE_IMG_QUALITY, false, true);
|
||||
|
||||
// Remove the tmp file
|
||||
unlink(PATH_TMP.$tmpFilename);
|
||||
// Delete temporary file
|
||||
Filesystem::rmfile(PATH_TMP.$tmpFilename);
|
||||
|
||||
// Permissions
|
||||
chmod(PATH_UPLOADS_PROFILES.$filename, 0644);
|
||||
|
||||
exit (json_encode(array(
|
||||
'status'=>0,
|
||||
'message'=>'Image uploaded success.',
|
||||
ajaxResponse(0, 'Image uploaded.', array(
|
||||
'filename'=>$filename,
|
||||
'absoluteURL'=>DOMAIN_UPLOADS_PROFILES.$filename,
|
||||
'absolutePath'=>PATH_UPLOADS_PROFILES.$filename
|
||||
)));
|
||||
));
|
||||
|
||||
?>
|
@ -1,56 +1,52 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
| Create/edit a page and save as draft
|
||||
| If the UUID already exists the page is updated
|
||||
|
|
||||
| @_POST['title'] string Page title
|
||||
| @_POST['content'] string Page content
|
||||
| @_POST['uuid'] string Page uuid
|
||||
| @_POST['uuid'] string Page type, by default is draft
|
||||
|
|
||||
| @return array
|
||||
*/
|
||||
|
||||
// $_POST
|
||||
// ----------------------------------------------------------------------------
|
||||
// (string) $_POST['title']
|
||||
$title = isset($_POST['title']) ? $_POST['title'] : false;
|
||||
// (string) $_POST['content']
|
||||
$content = isset($_POST['content']) ? $_POST['content'] : false;
|
||||
// (string) $_POST['uuid']
|
||||
$uuid = isset($_POST['uuid']) ? $_POST['uuid'] : false;
|
||||
$type = isset($_POST['type']) ? $_POST['type'] : 'draft';
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Check UUID
|
||||
if (empty($uuid)) {
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'message'=>'Autosave fail. UUID not defined.'
|
||||
)));
|
||||
ajaxResponse(1, 'Save as draft fail. UUID not defined.');
|
||||
}
|
||||
|
||||
// Check content length to create the autosave page
|
||||
if (Text::length($content)<100) {
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'message'=>'Autosave not completed. The content length is less than 100 characters.'
|
||||
)));
|
||||
}
|
||||
|
||||
$autosaveUUID = 'autosave-'.$uuid;
|
||||
$page = array(
|
||||
'uuid'=>$autosaveUUID,
|
||||
'key'=>$autosaveUUID,
|
||||
'slug'=>$autosaveUUID,
|
||||
'title'=>$title.' [ Autosave ] ',
|
||||
'uuid'=>$uuid,
|
||||
'key'=>$uuid,
|
||||
'slug'=>$uuid,
|
||||
'title'=>$title,
|
||||
'content'=>$content,
|
||||
'type'=>'draft'
|
||||
'type'=>$type
|
||||
);
|
||||
|
||||
// Get the page key by the UUID
|
||||
$pageKey = $pages->getByUUID($autosaveUUID);
|
||||
$pageKey = $pages->getByUUID($uuid);
|
||||
|
||||
// if pageKey is empty means the autosave page doesn't exist
|
||||
// if pageKey is empty means the page doesn't exist
|
||||
if (empty($pageKey)) {
|
||||
createPage($page);
|
||||
} else {
|
||||
editPage($page);
|
||||
}
|
||||
|
||||
exit (json_encode(array(
|
||||
'status'=>0,
|
||||
'message'=>'Autosave successfully.',
|
||||
'uuid'=>$autosaveUUID
|
||||
)));
|
||||
ajaxResponse(0, 'Save as draft successfully.', array(
|
||||
'uuid'=>$uuid
|
||||
));
|
||||
|
||||
?>
|
@ -1,81 +1,87 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
| Upload an image to a particular page
|
||||
|
|
||||
| @_POST['uuid'] string Page uuid
|
||||
|
|
||||
| @return array
|
||||
*/
|
||||
|
||||
// $_POST
|
||||
// ----------------------------------------------------------------------------
|
||||
// (string) $_POST['uuid']
|
||||
$uuid = empty($_POST['uuid']) ? false : $_POST['uuid'];
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Check path traversal on $uuid
|
||||
if ($uuid) {
|
||||
if (Text::stringContains($uuid, DS, false)) {
|
||||
$message = 'Path traversal detected.';
|
||||
Log::set($message, LOG_TYPE_ERROR);
|
||||
ajaxResponse(1, $message);
|
||||
}
|
||||
}
|
||||
|
||||
// Set upload directory
|
||||
if ($uuid && IMAGE_RESTRICT) {
|
||||
$uploadDirectory = PATH_UPLOADS_PAGES.$uuid.DS;
|
||||
$thumbnailDirectory = $uploadDirectory.'thumbnails'.DS;
|
||||
$imageDirectory = PATH_UPLOADS_PAGES.$uuid.DS;
|
||||
$thumbnailDirectory = $imageDirectory.'thumbnails'.DS;
|
||||
if (!Filesystem::directoryExists($thumbnailDirectory)) {
|
||||
Filesystem::mkdir($thumbnailDirectory, true);
|
||||
}
|
||||
} else {
|
||||
$uploadDirectory = PATH_UPLOADS;
|
||||
$imageDirectory = PATH_UPLOADS;
|
||||
$thumbnailDirectory = PATH_UPLOADS_THUMBNAILS;
|
||||
}
|
||||
|
||||
// Create directory for images
|
||||
if (!is_dir($uploadDirectory)){
|
||||
Filesystem::mkdir($uploadDirectory, true);
|
||||
}
|
||||
|
||||
// Create directory for thumbnails
|
||||
if (!is_dir($thumbnailDirectory)){
|
||||
Filesystem::mkdir($thumbnailDirectory, true);
|
||||
}
|
||||
|
||||
// File extensions allowed
|
||||
$allowedExtensions = array('gif', 'png', 'jpg', 'jpeg', 'svg');
|
||||
|
||||
// Upload all images
|
||||
foreach ($_FILES['bluditInputFiles']['name'] as $key=>$filename) {
|
||||
|
||||
$images = array();
|
||||
foreach ($_FILES['images']['name'] as $uuid=>$filename) {
|
||||
// Check for errors
|
||||
if ($_FILES['bluditInputFiles']['error'][$key] != 0) {
|
||||
$message = 'Error occurred uploading the image, max file size allowed: '.ini_get('upload_max_filesize');
|
||||
if ($_FILES['images']['error'][$uuid] != 0) {
|
||||
$message = $L->g('Maximum load file size allowed:').' '.ini_get('upload_max_filesize');
|
||||
Log::set($message, LOG_TYPE_ERROR);
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'message'=>$message
|
||||
)));
|
||||
ajaxResponse(1, $message);
|
||||
}
|
||||
|
||||
// Convert URL characters such as spaces or quotes to characters
|
||||
$filename = urldecode($filename);
|
||||
|
||||
// Check path traversal on $filename
|
||||
if (Text::stringContains($filename, DS, false)) {
|
||||
$message = 'Path traversal detected.';
|
||||
Log::set($message, LOG_TYPE_ERROR);
|
||||
ajaxResponse(1, $message);
|
||||
}
|
||||
|
||||
// Check file extension
|
||||
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||
$fileExtension = Filesystem::extension($filename);
|
||||
$fileExtension = Text::lowercase($fileExtension);
|
||||
if (!in_array($fileExtension, $allowedExtensions) ) {
|
||||
$message = 'Extension file not supported.';
|
||||
if (!in_array($fileExtension, $GLOBALS['ALLOWED_IMG_EXTENSION']) ) {
|
||||
$message = $L->g('File type is not supported. Allowed types:').' '.implode(', ',$GLOBALS['ALLOWED_IMG_EXTENSION']);
|
||||
Log::set($message, LOG_TYPE_ERROR);
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'message'=>$message
|
||||
)));
|
||||
ajaxResponse(1, $message);
|
||||
}
|
||||
|
||||
// Generate the next filename to not overwrite the original file
|
||||
$nextFilename = Filesystem::nextFilename($uploadDirectory, $filename);
|
||||
// Move from PHP tmp file to Bludit tmp directory
|
||||
Filesystem::mv($_FILES['images']['tmp_name'][$uuid], PATH_TMP.$filename);
|
||||
|
||||
// Move from temporary directory to uploads folder
|
||||
rename($_FILES['bluditInputFiles']['tmp_name'][$key], $uploadDirectory.$nextFilename);
|
||||
chmod($uploadDirectory.$nextFilename, 0644);
|
||||
// Transform the image and generate the thumbnail
|
||||
$image = transformImage(PATH_TMP.$filename, $imageDirectory, $thumbnailDirectory);
|
||||
|
||||
// Generate Thumbnail
|
||||
// Exclude generate thumbnail for SVG format and generate a symlink to the svg
|
||||
if ($fileExtension == 'svg') {
|
||||
symlink($uploadDirectory.$nextFilename, $thumbnailDirectory.$nextFilename);
|
||||
if ($image) {
|
||||
chmod($image, 0644);
|
||||
$filename = Filesystem::filename($image);
|
||||
array_push($images, $filename);
|
||||
} else {
|
||||
$Image = new Image();
|
||||
$Image->setImage($uploadDirectory.$nextFilename, $site->thumbnailWidth(), $site->thumbnailHeight(), 'crop');
|
||||
$Image->saveImage($thumbnailDirectory.$nextFilename, $site->thumbnailQuality(), true);
|
||||
$message = 'Error after transformImage() function.';
|
||||
Log::set($message, LOG_TYPE_ERROR);
|
||||
ajaxResponse(1, $message);
|
||||
}
|
||||
}
|
||||
|
||||
exit (json_encode(array(
|
||||
'status'=>0,
|
||||
'message'=>'Image uploaded success.',
|
||||
'filename'=>$nextFilename
|
||||
)));
|
||||
ajaxResponse(0, 'Images uploaded.', array(
|
||||
'images'=>$images
|
||||
));
|
||||
|
||||
?>
|
@ -1,24 +0,0 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
*
|
||||
* This script check if the user is logged
|
||||
*
|
||||
*/
|
||||
|
||||
// Check UUID
|
||||
if ($login->isLogged()) {
|
||||
exit (json_encode(array(
|
||||
'status'=>1,
|
||||
'message'=>'The user is logged.'
|
||||
)));
|
||||
}
|
||||
|
||||
exit (json_encode(array(
|
||||
'status'=>0,
|
||||
'message'=>'The user is NOT logged.'
|
||||
)));
|
||||
|
||||
|
||||
?>
|
@ -23,14 +23,6 @@ $layout['controller'] = $layout['view'] = $layout['slug'] = empty($explodeSlug[0
|
||||
unset($explodeSlug[0]);
|
||||
$layout['parameters'] = implode('/', $explodeSlug);
|
||||
|
||||
// Disable Magic Quotes.
|
||||
// Thanks, http://stackoverflow.com/questions/517008/how-to-turn-off-magic-quotes-on-shared-hosting
|
||||
if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) ) {
|
||||
$_POST = array_map('stripslashes', $_POST);
|
||||
$_GET = array_map('stripslashes', $_GET);
|
||||
$_COOKIE = array_map('stripslashes', $_COOKIE);
|
||||
}
|
||||
|
||||
// Boot plugins rules
|
||||
include(PATH_RULES.'60.plugins.php');
|
||||
|
||||
|
@ -1,20 +1,20 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// Bludit version
|
||||
define('BLUDIT_VERSION', '3.5');
|
||||
define('BLUDIT_CODENAME', 'IPA');
|
||||
define('BLUDIT_RELEASE_DATE', '2018-11-29');
|
||||
define('BLUDIT_BUILD', '20181129');
|
||||
define('BLUDIT_VERSION', '3.12.0');
|
||||
define('BLUDIT_CODENAME', 'Hand washing');
|
||||
define('BLUDIT_RELEASE_DATE', '2020-03-20');
|
||||
define('BLUDIT_BUILD', '20200320');
|
||||
|
||||
// Debug mode
|
||||
// Change to FALSE, for prevent warning or errors on browser
|
||||
define('DEBUG_MODE', TRUE);
|
||||
define('DEBUG_TYPE', 'INFO'); // INFO, TRACE
|
||||
error_reporting(0); // Turn off all error reporting
|
||||
if (DEBUG_MODE) {
|
||||
// Turn on all error reporting
|
||||
ini_set("display_errors", 0);
|
||||
ini_set('display_startup_errors',0);
|
||||
ini_set("track_errors", 1);
|
||||
ini_set("html_errors", 1);
|
||||
ini_set('log_errors', 1);
|
||||
error_reporting(E_ALL | E_STRICT | E_NOTICE);
|
||||
@ -61,11 +61,6 @@ define('DB_SYSLOG', PATH_DATABASES.'syslog.php');
|
||||
define('DB_USERS', PATH_DATABASES.'users.php');
|
||||
define('DB_SECURITY', PATH_DATABASES.'security.php');
|
||||
|
||||
// JSON pretty print
|
||||
if (!defined('JSON_PRETTY_PRINT')) {
|
||||
define('JSON_PRETTY_PRINT', 128);
|
||||
}
|
||||
|
||||
// User environment variables
|
||||
include(PATH_KERNEL.'boot'.DS.'variables.php');
|
||||
|
||||
@ -168,9 +163,9 @@ define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT.ADMIN_URI_FILTER.'/');
|
||||
define('HTML_PATH_ADMIN_THEME', HTML_PATH_ROOT.'bl-kernel/admin/themes/'.$site->adminTheme().'/');
|
||||
define('HTML_PATH_ADMIN_THEME_JS', HTML_PATH_ADMIN_THEME.'js/');
|
||||
define('HTML_PATH_ADMIN_THEME_CSS', HTML_PATH_ADMIN_THEME.'css/');
|
||||
define('HTML_PATH_ADMIN_THEME_IMG', HTML_PATH_ADMIN_THEME.'img/');
|
||||
define('HTML_PATH_CORE_JS', HTML_PATH_ROOT.'bl-kernel/js/');
|
||||
define('HTML_PATH_CORE_CSS', HTML_PATH_ROOT.'bl-kernel/css/');
|
||||
define('HTML_PATH_CORE_IMG', HTML_PATH_ROOT.'bl-kernel/img/');
|
||||
define('HTML_PATH_CONTENT', HTML_PATH_ROOT.'bl-content/');
|
||||
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'bl-content/uploads/');
|
||||
define('HTML_PATH_UPLOADS_PAGES', HTML_PATH_UPLOADS.'pages/');
|
||||
@ -208,6 +203,9 @@ define('IMAGE_RESTRICT', $site->imageRestrict());
|
||||
// TRUE to convert relatives images to absoultes, FALSE No changes apply
|
||||
define('IMAGE_RELATIVE_TO_ABSOLUTE', $site->imageRelativeToAbsolute());
|
||||
|
||||
// TRUE if the markdown parser is enabled
|
||||
define('MARKDOWN_PARSER', $site->markdownParser());
|
||||
|
||||
// --- PHP paths with dependency ---
|
||||
// This paths are absolutes for the OS
|
||||
define('THEME_DIR', PATH_ROOT.'bl-themes'.DS.$site->theme().DS);
|
||||
|
@ -43,6 +43,8 @@ $plugins = array(
|
||||
$pluginsEvents = $plugins;
|
||||
unset($pluginsEvents['all']);
|
||||
|
||||
$pluginsInstalled = array();
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
@ -51,20 +53,20 @@ function buildPlugins()
|
||||
{
|
||||
global $plugins;
|
||||
global $pluginsEvents;
|
||||
global $pluginsInstalled;
|
||||
global $L;
|
||||
global $site;
|
||||
|
||||
// List plugins directories
|
||||
$list = Filesystem::listDirectories(PATH_PLUGINS);
|
||||
|
||||
// Get declared clasess BEFORE load plugins clasess
|
||||
$currentDeclaredClasess = get_declared_classes();
|
||||
|
||||
// List plugins directories
|
||||
$list = Filesystem::listDirectories(PATH_PLUGINS);
|
||||
// Load each plugin clasess
|
||||
foreach ($list as $pluginPath) {
|
||||
// Check if the directory has the plugin.php
|
||||
if (file_exists($pluginPath.DS.'plugin.php')) {
|
||||
include($pluginPath.DS.'plugin.php');
|
||||
include_once($pluginPath.DS.'plugin.php');
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,7 +78,7 @@ function buildPlugins()
|
||||
|
||||
// Check if the plugin is translated
|
||||
$languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.$site->language().'.json';
|
||||
if( !Sanitize::pathFile($languageFilename) ) {
|
||||
if (!Sanitize::pathFile($languageFilename)) {
|
||||
$languageFilename = PATH_PLUGINS.$Plugin->directoryName().DS.'languages'.DS.DEFAULT_LANGUAGE_FILE;
|
||||
}
|
||||
|
||||
@ -99,6 +101,17 @@ function buildPlugins()
|
||||
|
||||
// If the plugin is installed insert on the hooks
|
||||
if ($Plugin->installed()) {
|
||||
// Include custom hooks
|
||||
if (!empty($Plugin->customHooks)) {
|
||||
foreach ($Plugin->customHooks as $customHook) {
|
||||
if (!isset($plugins[$customHook])) {
|
||||
$plugins[$customHook] = array();
|
||||
$pluginsEvents[$customHook] = array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$pluginsInstalled[$pluginClass] = $Plugin;
|
||||
foreach ($pluginsEvents as $event=>$value) {
|
||||
if (method_exists($Plugin, $event)) {
|
||||
array_push($plugins[$event], $Plugin);
|
||||
@ -106,10 +119,11 @@ function buildPlugins()
|
||||
}
|
||||
}
|
||||
|
||||
// Sort the plugins by the position for the site sidebar
|
||||
uasort($plugins['siteSidebar'], function ($a, $b) {
|
||||
return $a->position()>$b->position();
|
||||
}
|
||||
);
|
||||
return $a->position()>$b->position();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,14 @@ if ($url->uri()==HTML_PATH_ROOT.ADMIN_URI_FILTER) {
|
||||
Redirect::url(DOMAIN_ADMIN);
|
||||
}
|
||||
|
||||
// Redirect blog, from /blog to /blog/
|
||||
// This rule only works when the user set a page as homepage
|
||||
if ($url->uri()==HTML_PATH_ROOT.'blog' && $site->homepage()) {
|
||||
$filter = $url->filters('blog');
|
||||
$finalURL = Text::addSlashes(DOMAIN_BASE.$filter, false, true);
|
||||
Redirect::url($finalURL);
|
||||
}
|
||||
|
||||
// Redirect pages, from /my-page/ to /my-page
|
||||
if ($url->whereAmI()=='page' && !$url->notFound()) {
|
||||
$pageKey = $url->slug();
|
||||
|
@ -50,7 +50,7 @@ if ($pages->scheduler()) {
|
||||
));
|
||||
}
|
||||
|
||||
// Set home page if the user defined them
|
||||
// Set home page if the user defined one
|
||||
if ($site->homepage() && $url->whereAmI()==='home') {
|
||||
$pageKey = $site->homepage();
|
||||
if ($pages->exists($pageKey)) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
header('HTTP/1.0 '.$url->httpCode().' '.$url->httpMessage());
|
||||
header('X-Powered-By: Bludit');
|
||||
|
@ -25,7 +25,7 @@ if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'init.php')) {
|
||||
if (Sanitize::pathFile(PATH_THEMES, $site->theme().DS.'index.php')) {
|
||||
include(PATH_THEMES.$site->theme().DS.'index.php');
|
||||
} else {
|
||||
$L->p('Please check your theme configuration');
|
||||
$L->p('Please check your theme configuration in the admin panel. Check for an active theme.');
|
||||
}
|
||||
|
||||
// Plugins after site loaded
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
Environment variables
|
||||
If you are going to do some changes in the variable, is recommended do it before the installation
|
||||
If you are going to do some changes is recommended do it before the installation
|
||||
*/
|
||||
|
||||
// Log
|
||||
@ -92,12 +92,19 @@ define('SESSION_GC_MAXLIFETIME', 3600);
|
||||
// The value 0 means until the browser is closed
|
||||
define('SESSION_COOKIE_LIFE_TIME', 0);
|
||||
|
||||
// Alert notification dissappear in X seconds
|
||||
$GLOBALS['ALERT_DISSAPEAR_IN'] = 3; // Seconds
|
||||
// Alert notification disappear in X seconds
|
||||
define('ALERT_DISAPPEAR_IN', 3);
|
||||
|
||||
// Number of images to show in the media manager per page
|
||||
$GLOBALS['MEDIA_MANAGER_NUMBER_OF_FILES'] = 5;
|
||||
define('MEDIA_MANAGER_NUMBER_OF_FILES', 5);
|
||||
|
||||
// Sort the image by date
|
||||
$GLOBALS['MEDIA_MANAGER_SORT_BY_DATE'] = true;
|
||||
define('MEDIA_MANAGER_SORT_BY_DATE', true);
|
||||
|
||||
// Constant arrays using define are not allowed in PHP 5.6 or earlier
|
||||
|
||||
// Type of pages included in the tag database
|
||||
$GLOBALS['DB_TAGS_TYPES'] = array('published','static','sticky');
|
||||
|
||||
// Allowed image extensions
|
||||
$GLOBALS['ALLOWED_IMG_EXTENSION'] = array('gif', 'png', 'jpg', 'jpeg', 'svg');
|
||||
|
@ -21,13 +21,19 @@ class Categories extends dbList {
|
||||
$this->db[$key]['list'] = array();
|
||||
}
|
||||
|
||||
// Get a database with published pages
|
||||
$db = $pages->getPublishedDB(false);
|
||||
// Get pages database
|
||||
$db = $pages->getDB(false);
|
||||
foreach ($db as $pageKey=>$pageFields) {
|
||||
if (!empty($pageFields['category'])) {
|
||||
$categoryKey = $pageFields['category'];
|
||||
if (isset($this->db[$categoryKey]['list'])) {
|
||||
array_push($this->db[$categoryKey]['list'], $pageKey);
|
||||
if (
|
||||
($db[$pageKey]['type']=='published') ||
|
||||
($db[$pageKey]['type']=='sticky') ||
|
||||
($db[$pageKey]['type']=='static')
|
||||
) {
|
||||
array_push($this->db[$categoryKey]['list'], $pageKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
class Category {
|
||||
|
||||
private $vars;
|
||||
protected $vars;
|
||||
|
||||
function __construct($key)
|
||||
{
|
||||
@ -59,4 +59,20 @@ class Category {
|
||||
{
|
||||
return $this->getValue('list');
|
||||
}
|
||||
|
||||
// Returns an array in json format with all the data of the tag
|
||||
public function json($returnsArray=false)
|
||||
{
|
||||
$tmp['key'] = $this->key();
|
||||
$tmp['name'] = $this->name();
|
||||
$tmp['description'] = $this->description();
|
||||
$tmp['permalink'] = $this->permalink();
|
||||
$tmp['pages'] = $this->pages();
|
||||
|
||||
if ($returnsArray) {
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
return json_encode($tmp);
|
||||
}
|
||||
}
|
8
bl-kernel/css/bootstrap.min.css
vendored
15
bl-kernel/css/line-awesome/css/line-awesome-font-awesome.min.css
vendored
Executable file
BIN
bl-kernel/css/line-awesome/fonts/line-awesome.eot
Executable file
2628
bl-kernel/css/line-awesome/fonts/line-awesome.svg
Executable file
After Width: | Height: | Size: 424 KiB |
BIN
bl-kernel/css/line-awesome/fonts/line-awesome.ttf
Executable file
BIN
bl-kernel/css/line-awesome/fonts/line-awesome.woff
Executable file
BIN
bl-kernel/css/line-awesome/fonts/line-awesome.woff2
Executable file
1
bl-kernel/css/select2-bootstrap4.min.css
vendored
Normal file
1
bl-kernel/css/select2.min.css
vendored
Normal file
@ -34,7 +34,7 @@ function buildErrorPage() {
|
||||
|
||||
// This function is only used from the rule 69.pages.php, DO NOT use this function!
|
||||
// This function generate a particular page from the current slug of the url
|
||||
// If the slug has not a page associacted returns FALSE and is set not-found as true
|
||||
// If the slug has not a page associated returns FALSE and set not-found as true
|
||||
function buildThePage() {
|
||||
global $url;
|
||||
|
||||
@ -46,9 +46,11 @@ function buildThePage() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $page->draft() || $page->scheduled() ) {
|
||||
$url->setNotFound();
|
||||
return false;
|
||||
if ($page->draft() || $page->scheduled() || $page->autosave()) {
|
||||
if ($url->parameter('preview')!==md5($page->uuid())) {
|
||||
$url->setNotFound();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return $page;
|
||||
@ -118,7 +120,12 @@ function buildPagesFor($for, $categoryKey=false, $tagKey=false) {
|
||||
foreach ($list as $pageKey) {
|
||||
try {
|
||||
$page = new Page($pageKey);
|
||||
array_push($content, $page);
|
||||
if ( ($page->type()=='published') ||
|
||||
($page->type()=='sticky') ||
|
||||
($page->type()=='static')
|
||||
) {
|
||||
array_push($content, $page);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// continue
|
||||
}
|
||||
@ -244,6 +251,24 @@ function deactivatePlugin($pluginClassName) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function deactivateAllPlugin() {
|
||||
global $plugins;
|
||||
global $syslog;
|
||||
global $L;
|
||||
|
||||
// Check if the plugin exists
|
||||
foreach ($plugins['all'] as $plugin) {
|
||||
if ($plugin->uninstall()) {
|
||||
// Add to syslog
|
||||
$syslog->add(array(
|
||||
'dictionaryKey'=>'plugin-deactivated',
|
||||
'notes'=>$plugin->name()
|
||||
));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function changePluginsPosition($pluginClassList) {
|
||||
global $plugins;
|
||||
global $syslog;
|
||||
@ -286,7 +311,7 @@ function createPage($args) {
|
||||
}
|
||||
}
|
||||
|
||||
// The user is always the one loggued
|
||||
// The user is always the one logged
|
||||
$args['username'] = Session::get('username');
|
||||
if (empty($args['username'])) {
|
||||
Log::set('Function createPage()'.LOG_SEP.'Empty username.', LOG_TYPE_ERROR);
|
||||
@ -299,15 +324,14 @@ function createPage($args) {
|
||||
Theme::plugins('afterPageCreate');
|
||||
|
||||
reindexCategories();
|
||||
reindextags();
|
||||
reindexTags();
|
||||
|
||||
// Add to syslog
|
||||
$syslog->add(array(
|
||||
'dictionaryKey'=>'new-content-created',
|
||||
'notes'=>$args['title']
|
||||
'notes'=>(empty($args['title'])?$key:$args['title'])
|
||||
));
|
||||
|
||||
Alert::set( $L->g('new-content-created') );
|
||||
return $key;
|
||||
}
|
||||
|
||||
@ -323,12 +347,12 @@ function editPage($args) {
|
||||
global $pages;
|
||||
global $syslog;
|
||||
|
||||
// Check if the autosave page exists for this new page and delete it
|
||||
// Check if the autosave/preview page exists for this new page and delete it
|
||||
if (isset($args['uuid'])) {
|
||||
$pageKey = $pages->getByUUID('autosave-'.$args['uuid']);
|
||||
if (!empty($pageKey)) {
|
||||
Log::set('Function editPage()'.LOG_SEP.'Autosave deleted for '.$args['title'], LOG_TYPE_INFO);
|
||||
deletePage($pageKey);
|
||||
$autosaveKey = $pages->getByUUID('autosave-'.$args['uuid']);
|
||||
if ($autosaveKey) {
|
||||
Log::set('Function editPage()'.LOG_SEP.'Autosave/Preview deleted for '.$autosaveKey, LOG_TYPE_INFO);
|
||||
deletePage($autosaveKey);
|
||||
}
|
||||
}
|
||||
|
||||
@ -344,33 +368,18 @@ function editPage($args) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Title and content need to be here because from inside the dbPages is not visible
|
||||
if (empty($args['title']) || empty($args['content'])) {
|
||||
try {
|
||||
$page = new Page($args['key']);
|
||||
if (empty($args['title'])) {
|
||||
$args['title'] = $page->title();
|
||||
}
|
||||
if (empty($args['content'])) {
|
||||
$args['content'] = $page->contentRaw();
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// continue
|
||||
}
|
||||
}
|
||||
|
||||
$key = $pages->edit($args);
|
||||
if ($key) {
|
||||
// Call the plugins after page modified
|
||||
Theme::plugins('afterPageModify');
|
||||
|
||||
reindexCategories();
|
||||
reindextags();
|
||||
reindexTags();
|
||||
|
||||
// Add to syslog
|
||||
$syslog->add(array(
|
||||
'dictionaryKey'=>'content-edited',
|
||||
'notes'=>$args['title']
|
||||
'notes'=>empty($args['title'])?$key:$args['title']
|
||||
));
|
||||
|
||||
return $key;
|
||||
@ -389,7 +398,7 @@ function deletePage($key) {
|
||||
Theme::plugins('afterPageDelete');
|
||||
|
||||
reindexCategories();
|
||||
reindextags();
|
||||
reindexTags();
|
||||
|
||||
// Add to syslog
|
||||
$syslog->add(array(
|
||||
@ -500,6 +509,8 @@ function createUser($args) {
|
||||
global $L;
|
||||
global $syslog;
|
||||
|
||||
$args['new_username'] = Text::removeSpecialCharacters($args['new_username']);
|
||||
|
||||
// Check empty username
|
||||
if (Text::isEmpty($args['new_username'])) {
|
||||
Alert::set($L->g('username-field-is-empty'), ALERT_STATUS_FAIL);
|
||||
@ -526,7 +537,7 @@ function createUser($args) {
|
||||
|
||||
// Filter form fields
|
||||
$tmp = array();
|
||||
$tmp['username'] = Text::removeSpecialCharacters($args['new_username']);
|
||||
$tmp['username'] = $args['new_username'];
|
||||
$tmp['password'] = $args['new_password'];
|
||||
$tmp['role'] = $args['role'];
|
||||
$tmp['email'] = $args['email'];
|
||||
@ -562,6 +573,15 @@ function editSettings($args) {
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($args['homepage'])) {
|
||||
$args['homepage'] = '';
|
||||
$args['uriBlog'] = '';
|
||||
}
|
||||
|
||||
if (empty($args['pageNotFound'])) {
|
||||
$args['pageNotFound'] = '';
|
||||
}
|
||||
|
||||
if (isset($args['uriPage'])) {
|
||||
$args['uriPage'] = Text::addSlashes($args['uriPage']);
|
||||
}
|
||||
@ -574,13 +594,28 @@ function editSettings($args) {
|
||||
$args['uriCategory'] = Text::addSlashes($args['uriCategory']);
|
||||
}
|
||||
|
||||
if (isset($args['uriBlog'])) {
|
||||
if (!empty($args['uriBlog'])) {
|
||||
$args['uriBlog'] = Text::addSlashes($args['uriBlog']);
|
||||
} else {
|
||||
$args['uriBlog'] = '';
|
||||
if (!empty($args['homepage']) && empty($args['uriBlog'])) {
|
||||
$args['uriBlog'] = '/blog/';
|
||||
} else {
|
||||
$args['uriBlog'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
$args['extremeFriendly'] = (($args['extremeFriendly']=='true')?true:false);
|
||||
if (isset($args['extremeFriendly'])) {
|
||||
$args['extremeFriendly'] = (($args['extremeFriendly']=='true')?true:false);
|
||||
}
|
||||
|
||||
if (isset($args['customFields'])) {
|
||||
// Custom fields need to be JSON format valid, also the empty JSON need to be "{}"
|
||||
json_decode($args['customFields']);
|
||||
if (json_last_error() != JSON_ERROR_NONE) {
|
||||
return false;
|
||||
}
|
||||
$pages->setCustomFields($args['customFields']);
|
||||
}
|
||||
|
||||
if ($site->set($args)) {
|
||||
// Check current order-by if changed it reorder the content
|
||||
@ -595,7 +630,7 @@ function editSettings($args) {
|
||||
|
||||
// Add syslog
|
||||
$syslog->add(array(
|
||||
'dictionaryKey'=>'changes-on-settings',
|
||||
'dictionaryKey'=>'settings-changes',
|
||||
'notes'=>''
|
||||
));
|
||||
|
||||
@ -642,7 +677,7 @@ function changeUserPassword($args) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns true if the user is allowed to procceded
|
||||
// Returns true if the user is allowed to proceed
|
||||
function checkRole($allowRoles, $redirect=true) {
|
||||
global $login;
|
||||
global $L;
|
||||
@ -794,9 +829,13 @@ function getTag($key) {
|
||||
function activateTheme($themeDirectory) {
|
||||
global $site;
|
||||
global $syslog;
|
||||
global $L;
|
||||
global $L, $language;
|
||||
|
||||
if (Sanitize::pathFile(PATH_THEMES.$themeDirectory)) {
|
||||
if (Filesystem::fileExists(PATH_THEMES.$themeDirectory.DS.'install.php')) {
|
||||
include_once(PATH_THEMES.$themeDirectory.DS.'install.php');
|
||||
}
|
||||
|
||||
$site->set(array('theme'=>$themeDirectory));
|
||||
|
||||
$syslog->add(array(
|
||||
@ -809,3 +848,68 @@ function activateTheme($themeDirectory) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function ajaxResponse($status=0, $message="", $data=array()) {
|
||||
$default = array('status'=>$status, 'message'=>$message);
|
||||
$output = array_merge($default, $data);
|
||||
exit (json_encode($output));
|
||||
}
|
||||
|
||||
/*
|
||||
| This function checks the image extension,
|
||||
| generate a new filename to not overwrite the exists,
|
||||
| generate the thumbnail,
|
||||
| and move the image to a proper place
|
||||
|
|
||||
| @file string Path and filename of the image
|
||||
| @imageDir string Path where the image is going to be stored
|
||||
| @thumbnailDir string Path where the thumbnail is going to be stored, if you don't set the variable is not going to create the thumbnail
|
||||
|
|
||||
| @return string/boolean Path and filename of the new image or FALSE if there were some error
|
||||
*/
|
||||
function transformImage($file, $imageDir, $thumbnailDir=false) {
|
||||
global $site;
|
||||
|
||||
// Check image extension
|
||||
$fileExtension = Filesystem::extension($file);
|
||||
$fileExtension = Text::lowercase($fileExtension);
|
||||
if (!in_array($fileExtension, $GLOBALS['ALLOWED_IMG_EXTENSION']) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Generate a filename to not overwrite current image if exists
|
||||
$filename = Filesystem::filename($file);
|
||||
$nextFilename = Filesystem::nextFilename($imageDir, $filename);
|
||||
|
||||
// Move the image to a proper place and rename
|
||||
$image = $imageDir.$nextFilename;
|
||||
Filesystem::mv($file, $image);
|
||||
chmod($image, 0644);
|
||||
|
||||
// Generate Thumbnail
|
||||
if (!empty($thumbnailDir)) {
|
||||
if ($fileExtension == 'svg') {
|
||||
symlink($image, $thumbnailDir.$nextFilename);
|
||||
} else {
|
||||
$Image = new Image();
|
||||
$Image->setImage($image, $site->thumbnailWidth(), $site->thumbnailHeight(), 'crop');
|
||||
$Image->saveImage($thumbnailDir.$nextFilename, $site->thumbnailQuality(), true);
|
||||
}
|
||||
}
|
||||
|
||||
return $image;
|
||||
}
|
||||
|
||||
function downloadRestrictedFile($file) {
|
||||
if (is_file($file)) {
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="'.basename($file).'"');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Pragma: public');
|
||||
header('Content-Length: ' . filesize($file));
|
||||
readfile($file);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
@ -1,41 +0,0 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
class Crypt {
|
||||
|
||||
// return string
|
||||
public static function encrypt($string, $key)
|
||||
{
|
||||
if(function_exists('get_loaded_extensions'))
|
||||
{
|
||||
if( in_array('mcrypt', get_loaded_extensions()) )
|
||||
{
|
||||
$string = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5($key) ) );
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
|
||||
return('---');
|
||||
}
|
||||
|
||||
// return string
|
||||
public static function decrypt($string, $key)
|
||||
{
|
||||
if(function_exists('get_loaded_extensions'))
|
||||
{
|
||||
if( in_array('mcrypt', get_loaded_extensions()) )
|
||||
{
|
||||
$string = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, md5($key) ), "\0" );
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
|
||||
return('---');
|
||||
}
|
||||
|
||||
public static function getHash($string, $salt = '$#!')
|
||||
{
|
||||
$sha1 = sha1($string.$salt);
|
||||
|
||||
return($sha1);
|
||||
}
|
||||
}
|
@ -47,6 +47,15 @@ class Date {
|
||||
return self::translate($output);
|
||||
}
|
||||
|
||||
public static function offset($date, $format, $offset)
|
||||
{
|
||||
$Date = new DateTime($date);
|
||||
$Date->modify($offset);
|
||||
$output = $Date->format($format);
|
||||
|
||||
return self::translate($output);
|
||||
}
|
||||
|
||||
// Format a local time/date according to locale settings.
|
||||
public static function format($date, $currentFormat, $outputFormat)
|
||||
{
|
||||
|
@ -27,6 +27,7 @@ class Filesystem {
|
||||
// $chunk = amount of chunks, FALSE if you don't want to chunk
|
||||
public static function listFiles($path, $regex='*', $extension='*', $sortByDate=false, $chunk=false)
|
||||
{
|
||||
error_log($path.$regex.'.'.$extension);
|
||||
$files = glob($path.$regex.'.'.$extension);
|
||||
|
||||
if (empty($files)) {
|
||||
@ -57,16 +58,19 @@ class Filesystem {
|
||||
|
||||
public static function rmdir($pathname)
|
||||
{
|
||||
Log::set('rmdir = '.$pathname, LOG_TYPE_INFO);
|
||||
return rmdir($pathname);
|
||||
}
|
||||
|
||||
public static function mv($oldname, $newname)
|
||||
{
|
||||
Log::set('mv '.$oldname.' '.$newname, LOG_TYPE_INFO);
|
||||
return rename($oldname, $newname);
|
||||
}
|
||||
|
||||
public static function rmfile($filename)
|
||||
{
|
||||
Log::set('rmfile = '.$filename, LOG_TYPE_INFO);
|
||||
return unlink($filename);
|
||||
}
|
||||
|
||||
@ -123,6 +127,8 @@ class Filesystem {
|
||||
// The directory is delete
|
||||
public static function deleteRecursive($source, $deleteDirectory=true)
|
||||
{
|
||||
Log::set('deleteRecursive = '.$source, LOG_TYPE_INFO);
|
||||
|
||||
if (!self::directoryExists($source)) {
|
||||
return false;
|
||||
}
|
||||
@ -130,7 +136,7 @@ class Filesystem {
|
||||
foreach (new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($source, FilesystemIterator::SKIP_DOTS),
|
||||
RecursiveIteratorIterator::CHILD_FIRST) as $item) {
|
||||
if ($item->isFile()) {
|
||||
if ($item->isFile() || $item->isLink()) {
|
||||
unlink($item);
|
||||
} else {
|
||||
rmdir($item);
|
||||
@ -169,9 +175,9 @@ class Filesystem {
|
||||
foreach ($files as $file) {
|
||||
$file = realpath($file);
|
||||
if (is_dir($file)) {
|
||||
$zip->addEmptyDir(str_replace($source, '', $file));
|
||||
$zip->addEmptyDir(ltrim(str_replace($source, '', $file), "/\\"));
|
||||
} elseif (is_file($file)) {
|
||||
$zip->addFromString(str_replace($source, '', $file), file_get_contents($file));
|
||||
$zip->addFromString(ltrim(str_replace($source, '', $file), "/\\"), file_get_contents($file));
|
||||
}
|
||||
}
|
||||
} elseif (is_file($source)) {
|
||||
@ -203,14 +209,21 @@ class Filesystem {
|
||||
return $zip->close();
|
||||
}
|
||||
|
||||
// Returns the next filename if the filename already exist
|
||||
/*
|
||||
| Returns the next filename if the filename already exist otherwise returns the original filename
|
||||
|
|
||||
| @path string Path
|
||||
| @filename string Filename
|
||||
|
|
||||
| @return string
|
||||
*/
|
||||
public static function nextFilename($path=PATH_UPLOADS, $filename) {
|
||||
// Clean filename and get extension
|
||||
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||
$fileExtension = Text::lowercase($fileExtension);
|
||||
$filename = pathinfo($filename, PATHINFO_FILENAME);
|
||||
$filename = Text::replace(' ', '', $filename);
|
||||
$filename = Text::replace('_', '', $filename);
|
||||
$filename = Text::removeSpaces($filename);
|
||||
$filename = Text::removeQuotes($filename);
|
||||
|
||||
// Search for the next filename
|
||||
$tmpName = $filename.'.'.$fileExtension;
|
||||
@ -224,4 +237,78 @@ class Filesystem {
|
||||
}
|
||||
return $tmpName;
|
||||
}
|
||||
|
||||
/*
|
||||
| Returns the filename
|
||||
| Example:
|
||||
| @file /home/diego/dog.jpg
|
||||
| @return dog.jpg
|
||||
|
|
||||
| @file string Full path of the file
|
||||
|
|
||||
| @return string
|
||||
*/
|
||||
public static function filename($file) {
|
||||
return basename($file);
|
||||
}
|
||||
|
||||
/*
|
||||
| Returns the file extension
|
||||
| Example:
|
||||
| @file /home/diego/dog.jpg
|
||||
| @return jpg
|
||||
|
|
||||
| @file string Full path of the file
|
||||
|
|
||||
| @return string
|
||||
*/
|
||||
public static function extension($file) {
|
||||
return pathinfo($file, PATHINFO_EXTENSION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Size of file or directory in bytes
|
||||
* @param [string] $fileOrDirectory
|
||||
* @return [int|bool] [bytes or false on error]
|
||||
*/
|
||||
public static function getSize($fileOrDirectory) {
|
||||
// Files
|
||||
if (is_file($fileOrDirectory)) {
|
||||
return filesize($fileOrDirectory);
|
||||
}
|
||||
// Directories
|
||||
if (file_exists($fileOrDirectory)) {
|
||||
$size = 0;
|
||||
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($fileOrDirectory, FilesystemIterator::SKIP_DOTS)) as $file){
|
||||
try {
|
||||
$size += $file->getSize();
|
||||
} catch (Exception $e) {
|
||||
// SplFileInfo::getSize RuntimeException will be thrown on broken symlinks/errors
|
||||
}
|
||||
}
|
||||
return $size;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function bytesToHumanFileSize($bytes, $decimals = 2) {
|
||||
$size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');
|
||||
$factor = floor((strlen($bytes) - 1) / 3);
|
||||
return sprintf("%.{$decimals}f ", $bytes / pow(1024, $factor)) . @$size[$factor];
|
||||
}
|
||||
|
||||
/*
|
||||
| Returns the mime type of the file
|
||||
| Example:
|
||||
| @file /home/diego/dog.jpg
|
||||
| @return image/jpeg
|
||||
|
|
||||
| @file string Full path of the file
|
||||
|
|
||||
| @return string
|
||||
*/
|
||||
public static function mimeType($file) {
|
||||
return mime_content_type($file);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,6 +19,10 @@ class Log {
|
||||
error_log('------------------------', $messageType);
|
||||
}
|
||||
error_log($type.' ['.BLUDIT_VERSION.'] ['.$_SERVER['REQUEST_URI'].'] '.$text, $messageType);
|
||||
|
||||
if (DEBUG_TYPE=='TRACE') {
|
||||
error_log(print_r(debug_backtrace(), true));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ class Paginator {
|
||||
}
|
||||
if ($currentPage > 1){
|
||||
$html .= '<li class="page-item'.$show_previois.'">';
|
||||
$html .= '<a class="page-link" href="'.self::prevPageUrl().'" aria-label="Previous"><span aria-hidden="true">«</span> '.$language->get('Previous').'</a>';
|
||||
$html .= '<a class="page-link" href="'.self::previousPageUrl().'" aria-label="Previous"><span aria-hidden="true">«</span> '.$language->get('Previous').'</a>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
if ($currentPage > $howMany + 1){
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
class Sanitize {
|
||||
|
||||
// new
|
||||
public static function removeTags($text) {
|
||||
return strip_tags($text);
|
||||
}
|
||||
|
||||
// Convert special characters to HTML entities
|
||||
public static function html($text)
|
||||
@ -30,30 +32,28 @@ class Sanitize {
|
||||
|
||||
public static function pathFile($path, $file=false)
|
||||
{
|
||||
if($file!==false){
|
||||
if ($file!==false){
|
||||
$fullPath = $path.$file;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$fullPath = $path;
|
||||
}
|
||||
|
||||
// Fix for Windows on paths. eg: $path = c:\diego/page/subpage convert to c:\diego\page\subpages
|
||||
$fullPath = str_replace('/', DS, $fullPath);
|
||||
|
||||
if(CHECK_SYMBOLIC_LINKS) {
|
||||
if (CHECK_SYMBOLIC_LINKS) {
|
||||
$real = realpath($fullPath);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$real = file_exists($fullPath)?$fullPath:false;
|
||||
}
|
||||
|
||||
// If $real is FALSE the file does not exist.
|
||||
if($real===false) {
|
||||
if ($real===false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the $real path does not start with the systemPath then this is Path Traversal.
|
||||
if(strpos($fullPath, $real)!==0) {
|
||||
if (strpos($fullPath, $real)!==0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -72,21 +72,27 @@ class Text {
|
||||
|
||||
public static function addSlashes($string, $begin=true, $end=true)
|
||||
{
|
||||
if($begin) {
|
||||
$string = '/' . ltrim($string, '/');
|
||||
if ($begin) {
|
||||
$string = '/'.ltrim($string, '/');
|
||||
}
|
||||
|
||||
if($end) {
|
||||
$string = rtrim($string, '/') . '/';
|
||||
if ($end) {
|
||||
$string = rtrim($string, '/').'/';
|
||||
}
|
||||
|
||||
if($string=='//') {
|
||||
if ($string=='//') {
|
||||
return '/';
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
// Escape quotes and backslash
|
||||
public static function escapeQuotes($string)
|
||||
{
|
||||
return addslashes($string);
|
||||
}
|
||||
|
||||
public static function startsWith($string, $startString)
|
||||
{
|
||||
$length = self::length($startString);
|
||||
@ -110,7 +116,7 @@ class Text {
|
||||
$characteres = "1234567890abcdefghijklmnopqrstuvwxyz!@#%^&*";
|
||||
$text = '';
|
||||
for($i=0; $i<$length; $i++) {
|
||||
$text .= $characteres{rand(0,41)};
|
||||
$text .= $characteres[rand(0,41)];
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
@ -125,9 +131,22 @@ class Text {
|
||||
return preg_replace("/[\/_|+:!@#$%^&*()'\"<>\\\`}{;=,?\[\]~. -]+/", $replace, $string);
|
||||
}
|
||||
|
||||
public static function removeQuotes($string, $replace='')
|
||||
{
|
||||
$remove = array('\''=>$replace, '"'=>$replace);
|
||||
return self::replaceAssoc($remove, $string);
|
||||
}
|
||||
|
||||
public static function removeLineBreaks($string)
|
||||
{
|
||||
return str_replace(array("\r", "\n"), '', $string);
|
||||
$remove = array("\r"=>'', "\n"=>'');
|
||||
return self::replaceAssoc($remove, $string);
|
||||
}
|
||||
|
||||
public static function removeSpaces($string, $replace='')
|
||||
{
|
||||
$remove = array(' '=>$replace);
|
||||
return self::replaceAssoc($remove, $string);
|
||||
}
|
||||
|
||||
// Convert unicode characters to utf-8 characters
|
||||
@ -278,4 +297,10 @@ class Text {
|
||||
return $truncate;
|
||||
}
|
||||
|
||||
public static function toBytes($value) {
|
||||
$value = trim($value);
|
||||
$s = [ 'g'=> 1<<30, 'm' => 1<<20, 'k' => 1<<10 ];
|
||||
return intval($value) * ($s[strtolower(substr($value,-1))] ?: 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,11 +7,14 @@ class Theme {
|
||||
global $site;
|
||||
$socialNetworks = array(
|
||||
'github'=>'Github',
|
||||
'gitlab'=>'GitLab',
|
||||
'twitter'=>'Twitter',
|
||||
'facebook'=>'Facebook',
|
||||
'instagram'=>'Instagram',
|
||||
'codepen'=>'Codepen',
|
||||
'linkedin'=>'Linkedin'
|
||||
'linkedin'=>'Linkedin',
|
||||
'mastodon'=>'Mastodon',
|
||||
'vk'=>'VK'
|
||||
);
|
||||
|
||||
foreach ($socialNetworks as $key=>$label) {
|
||||
@ -203,7 +206,7 @@ class Theme {
|
||||
return $links;
|
||||
}
|
||||
|
||||
public static function javascript($files, $base=DOMAIN_THEME)
|
||||
public static function javascript($files, $base=DOMAIN_THEME, $attributes="async")
|
||||
{
|
||||
if( !is_array($files) ) {
|
||||
$files = array($files);
|
||||
@ -211,15 +214,15 @@ class Theme {
|
||||
|
||||
$scripts = '';
|
||||
foreach($files as $file) {
|
||||
$scripts .= '<script src="'.$base.$file.'?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
|
||||
$scripts .= '<script '.$attributes.' src="'.$base.$file.'?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
return $scripts;
|
||||
}
|
||||
|
||||
public static function js($files, $base=DOMAIN_THEME)
|
||||
public static function js($files, $base=DOMAIN_THEME, $attributes="async")
|
||||
{
|
||||
return self::javascript($files, $base);
|
||||
return self::javascript($files, $base, $attributes);
|
||||
}
|
||||
|
||||
public static function plugins($type)
|
||||
@ -232,7 +235,7 @@ class Theme {
|
||||
|
||||
public static function favicon($file='favicon.png', $typeIcon='image/png')
|
||||
{
|
||||
return '<link rel="shortcut icon" href="'.DOMAIN_THEME.$file.'" type="'.$typeIcon.'">'.PHP_EOL;
|
||||
return '<link rel="icon" href="'.DOMAIN_THEME.$file.'" type="'.$typeIcon.'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
public static function keywords($keywords)
|
||||
@ -250,7 +253,7 @@ class Theme {
|
||||
|
||||
public static function jsBootstrap()
|
||||
{
|
||||
return '<script src="'.DOMAIN_CORE_JS.'bootstrap.bundle.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
|
||||
return '<script async src="'.DOMAIN_CORE_JS.'bootstrap.bundle.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
public static function cssBootstrap()
|
||||
@ -258,11 +261,17 @@ class Theme {
|
||||
return '<link rel="stylesheet" type="text/css" href="'.DOMAIN_CORE_CSS.'bootstrap.min.css?version='.BLUDIT_VERSION.'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
public static function cssLineAwesome()
|
||||
{
|
||||
return '<link rel="stylesheet" type="text/css" href="'.DOMAIN_CORE_CSS.'line-awesome/css/line-awesome-font-awesome.min.css?version='.BLUDIT_VERSION.'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
public static function jsSortable()
|
||||
{
|
||||
// https://github.com/psfpro/bootstrap-html5sortable
|
||||
return '<script src="'.DOMAIN_CORE_JS.'jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
|
||||
return '<script async src="'.DOMAIN_CORE_JS.'jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@ -1,41 +1,51 @@
|
||||
class bluditAjax {
|
||||
|
||||
// Autosave works only when the content has more than 100 characters
|
||||
// callBack function need to be showAlert(), this function is for display alerts to the user, defined in alert.php
|
||||
autosave(uuid, title, content, callBack) {
|
||||
var ajaxRequest;
|
||||
if (ajaxRequest) {
|
||||
ajaxRequest.abort();
|
||||
static async saveAsDraft(uuid, title, content) {
|
||||
let url = HTML_PATH_ADMIN_ROOT+"ajax/save-as-draft"
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
credentials: 'same-origin',
|
||||
method: "POST",
|
||||
headers: new Headers({
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
||||
}),
|
||||
body: new URLSearchParams({
|
||||
'tokenCSRF': tokenCSRF,
|
||||
'uuid': "autosave-" + uuid,
|
||||
'title': title,
|
||||
'content': content,
|
||||
'type': 'autosave'
|
||||
}),
|
||||
});
|
||||
const json = await response.json();
|
||||
return json;
|
||||
}
|
||||
|
||||
if (content.length<100) {
|
||||
return false;
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
ajaxRequest = $.ajax({
|
||||
type: "POST",
|
||||
data: {
|
||||
tokenCSRF: tokenCSRF, // token from env variables
|
||||
uuid: uuid,
|
||||
title: title,
|
||||
content: content
|
||||
},
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/save-as-draft"
|
||||
});
|
||||
|
||||
ajaxRequest.done(function (response, textStatus, jqXHR) {
|
||||
console.log("Bludit AJAX: autosave(): done handler");
|
||||
callBack("Autosave success");
|
||||
});
|
||||
|
||||
ajaxRequest.fail(function (jqXHR, textStatus, errorThrown) {
|
||||
console.log("Bludit AJAX: autosave(): fail handler");
|
||||
callBack("Autosave failure");
|
||||
});
|
||||
|
||||
ajaxRequest.always(function () {
|
||||
console.log("Bludit AJAX: autosave(): always handler");
|
||||
});
|
||||
static async removeLogo() {
|
||||
let url = HTML_PATH_ADMIN_ROOT+"ajax/logo-remove"
|
||||
try {
|
||||
const response = await fetch(url, {
|
||||
credentials: 'same-origin',
|
||||
method: "POST",
|
||||
headers: new Headers({
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
||||
}),
|
||||
body: new URLSearchParams({
|
||||
'tokenCSRF': tokenCSRF
|
||||
}),
|
||||
});
|
||||
const json = await response.json();
|
||||
return json;
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Alert the user when the user is not logged
|
||||
|
6
bl-kernel/js/bootstrap.bundle.min.js
vendored
@ -1,14 +1,3 @@
|
||||
<script>
|
||||
|
||||
function copyToClipboard(elementId) {
|
||||
var aux = document.createElement("input");
|
||||
aux.setAttribute("value", document.getElementById(elementId).innerHTML);
|
||||
document.body.appendChild(aux);
|
||||
aux.select();
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(aux);
|
||||
}
|
||||
|
||||
function sanitizeHTML(text) {
|
||||
var map = {
|
||||
'&': '&',
|
||||
@ -45,5 +34,3 @@ function getCookie(name) {
|
||||
function deleteCookie(name) {
|
||||
document.cookie = name+'=; Max-Age=-999;';
|
||||
}
|
||||
|
||||
</script>
|