11<?php
2+ global $ USR ;
3+
24$ massiveHiddenSection = GSDATAOTHERPATH . '/massiveHiddenSection/ ' ;
3- $ filejson = ' userhidden .json ' ;
5+ $ filejson = $ USR . ' .json ' ;
46$ finaljson = $ massiveHiddenSection . $ filejson ;
57
68
911 file_put_contents ($ finaljson , '' );
1012};
1113
12- $ datee = file_get_contents ($ finaljson );
14+ $ datee = @ file_get_contents ($ finaljson );
1315$ data = json_decode ($ datee );
1416
1517
1820<script>
1921 document.body.setAttribute('data-login', '<?php echo $ _COOKIE ['GS_ADMIN_USERNAME ' ]; ?> ');
2022
23+
24+
2125
2226
27+ if (document.querySelector("#nav_pages") !== null) {
28+ if ("<?php if (isset ($ data ->hidepages )) {
29+ echo $ data ->hidepages ;
30+ }; ?> " == "hide") {
31+ document.querySelector("#nav_pages").remove()
32+ };
33+ };
2334
24- const userHideListString = "<?php if (isset ($ data ->hideuser )) {
25- echo $ data ->hideuser ;
26- }; ?> ";
27- const userAfterSplit = userHideListString.split(',');
28-
29-
30- userAfterSplit.forEach(e => {
31-
32-
33- if (e == document.body.getAttribute('data-login')) {
34- console.log('tak!');
35-
36-
37-
38-
39-
40-
41-
42-
43-
44- if (document.querySelector("#nav_pages") !== null) {
45- if ("<?php if (isset ($ data ->hidepages )) {
46- echo $ data ->hidepages ;
47- }; ?> " == "hide") {
48- document.querySelector("#nav_pages").remove()
49- };
50- };
51-
52- if (document.querySelector("#nav_upload") !== null) {
53- if ("<?php if (isset ($ data ->hidefiles )) {
54- echo $ data ->hidefiles ;
55- }; ?> " == "hide") {
56- document.querySelector("#nav_upload").remove()
57- };
58- };
59-
60- if (document.querySelector("#nav_theme") !== null) {
61- if ("<?php if (isset ($ data ->hidethemes )) {
62- echo $ data ->hidethemes ;
63- }; ?> " == "hide") {
64- document.querySelector("#nav_theme").remove()
65- };
66- };
67-
68- if (document.querySelector("#nav_plugins") !== null) {
69- if ("<?php if (isset ($ data ->hideplugin )) {
70- echo $ data ->hideplugin ;
71- }; ?> " == "hide") {
72- document.querySelector("#nav_plugins").remove()
73- };
74- };
35+ if (document.querySelector("#nav_upload") !== null) {
36+ if ("<?php if (isset ($ data ->hidefiles )) {
37+ echo $ data ->hidefiles ;
38+ }; ?> " == "hide") {
39+ document.querySelector("#nav_upload").remove()
40+ };
41+ };
7542
43+ if (document.querySelector("#nav_theme") !== null) {
44+ if ("<?php if (isset ($ data ->hidethemes )) {
45+ echo $ data ->hidethemes ;
46+ }; ?> " == "hide") {
47+ document.querySelector("#nav_theme").remove()
48+ };
49+ };
7650
77- if (document.querySelector("#nav_backups ") !== null) {
78- if ("<?php if (isset ($ data ->hidebackup )) {
79- echo $ data ->hidebackup ;
80- } ?> " == "hide") {
81- document.querySelector("#nav_backups ").remove()
82- };
83- };
51+ if (document.querySelector("#nav_plugins ") !== null) {
52+ if ("<?php if (isset ($ data ->hideplugin )) {
53+ echo $ data ->hideplugin ;
54+ }; ?> " == "hide") {
55+ document.querySelector("#nav_plugins ").remove()
56+ };
57+ };
8458
8559
86- if (document.querySelector("#nav_i18n_gallery ") !== null) {
87- if ("<?php if (isset ($ data ->hidei18n )) {
88- echo $ data ->hidei18n ;
89- }; ?> " == "hide") {
90- document.querySelector("#nav_i18n_gallery ").remove()
91- };
92- };
60+ if (document.querySelector("#nav_backups ") !== null) {
61+ if ("<?php if (isset ($ data ->hidebackup )) {
62+ echo $ data ->hidebackup ;
63+ } ?> " == "hide") {
64+ document.querySelector("#nav_backups ").remove()
65+ };
66+ };
9367
94- if (document.querySelector(".support") !== null) {
95- if ("<?php if (isset ($ data ->hidesupport )) {
96- echo $ data ->hidesupport ;
97- }; ?> " == "hide") {
98- document.querySelector(".support").remove()
99- };
100- };
10168
102- if (document.querySelector('#sb_massiveAdmin') !== null) {
103- if ("<?php if (isset ($ data ->hidesettings )) {
104- echo $ data ->hidesettings ;
105- }; ?> " == "hide") {
69+ if (document.querySelector("#nav_i18n_gallery") !== null) {
70+ if ("<?php if (isset ($ data ->hidei18n )) {
71+ echo $ data ->hidei18n ;
72+ }; ?> " == "hide") {
73+ document.querySelector("#nav_i18n_gallery").remove()
74+ };
75+ };
10676
107- if (document.querySelector('#pages') == null) {
108- document.querySelectorAll(' .snav #sb_massiveAdmin').forEach(x => {
109- x.remove();
110- });
111- };
77+ if (document.querySelector(".support") !== null) {
78+ if ("<?php if (isset ($ data ->hidesupport )) {
79+ echo $ data ->hidesupport ;
80+ }; ?> " == "hide") {
81+ document.querySelector(".support").remove()
82+ };
83+ };
11284
113- };
114- };
85+ if (document.querySelector('#sb_massiveAdmin') !== null) {
86+ if ("<?php if (isset ($ data ->hidesettings )) {
87+ echo $ data ->hidesettings ;
88+ }; ?> " == "hide") {
11589
116- if (document.querySelector(`a[href="settings.php#profile"]`) !== null) {
117- if ("<?php if (isset ($ data ->hidesettings )) {
118- echo $ data ->hidesettings ;
119- }; ?> " == "hide") {
120- document.querySelector('a[href="settings.php#profile"]').remove()
121- };
90+ if (document.querySelector('#pages') == null) {
91+ document.querySelectorAll(' .snav #sb_massiveAdmin').forEach(x => {
92+ x.remove();
93+ });
12294 };
12395
12496 };
97+ };
12598
126-
127- });
99+ if (document.querySelector(`a[href="settings.php#profile"]`) !== null) {
100+ if ("<?php if (isset ($ data ->hidesettings )) {
101+ echo $ data ->hidesettings ;
102+ }; ?> " == "hide") {
103+ document.querySelector('a[href="settings.php#profile"]').remove()
104+ };
105+ };
128106</script>
0 commit comments