@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('save_web_user')) { |
6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | $tbl_web_users = $modx->getFullTableName('web_users'); |
@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | |
13 | 13 | $input = $_POST; |
14 | 14 | foreach($input as $k => $v) { |
15 | - if($k !== 'comment') { |
|
16 | - $v = $modx->htmlspecialchars($v, ENT_NOQUOTES); |
|
17 | - } |
|
18 | - $input[$k] = $v; |
|
15 | + if($k !== 'comment') { |
|
16 | + $v = $modx->htmlspecialchars($v, ENT_NOQUOTES); |
|
17 | + } |
|
18 | + $input[$k] = $v; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | $id = (int)$input['id']; |
@@ -51,82 +51,82 @@ discard block |
||
51 | 51 | |
52 | 52 | // verify password |
53 | 53 | if($passwordgenmethod == "spec" && $input['specifiedpassword'] != $input['confirmpassword']) { |
54 | - webAlertAndQuit("Password typed is mismatched", 88); |
|
54 | + webAlertAndQuit("Password typed is mismatched", 88); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | // verify email |
58 | 58 | if($email == '' || !preg_match("/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,24}$/i", $email)) { |
59 | - webAlertAndQuit("E-mail address doesn't seem to be valid!", 88); |
|
59 | + webAlertAndQuit("E-mail address doesn't seem to be valid!", 88); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | switch($input['mode']) { |
63 | - case '87' : // new user |
|
64 | - // check if this user name already exist |
|
65 | - $rs = $modx->db->select('count(id)', $tbl_web_users, "username='{$esc_newusername}'"); |
|
66 | - $limit = $modx->db->getValue($rs); |
|
67 | - if($limit > 0) { |
|
68 | - webAlertAndQuit("User name is already in use!", 88); |
|
69 | - } |
|
70 | - |
|
71 | - // check if the email address already exist |
|
72 | - if ($modx->config['allow_multiple_emails'] != 1) { |
|
73 | - $rs = $modx->db->select('count(id)', $tbl_web_user_attributes, "email='{$esc_email}' AND id!='{$id}'"); |
|
74 | - $limit = $modx->db->getValue($rs); |
|
75 | - if($limit > 0) { |
|
76 | - webAlertAndQuit("Email is already in use!", 88); |
|
77 | - } |
|
78 | - } |
|
79 | - |
|
80 | - // generate a new password for this user |
|
81 | - if($specifiedpassword != "" && $passwordgenmethod == "spec") { |
|
82 | - if(strlen($specifiedpassword) < 6) { |
|
83 | - webAlertAndQuit("Password is too short!", 88); |
|
84 | - } else { |
|
85 | - $newpassword = $specifiedpassword; |
|
86 | - } |
|
87 | - } elseif($specifiedpassword == "" && $passwordgenmethod == "spec") { |
|
88 | - webAlertAndQuit("You didn't specify a password for this user!", 88); |
|
89 | - } elseif($passwordgenmethod == 'g') { |
|
90 | - $newpassword = generate_password(8); |
|
91 | - } else { |
|
92 | - webAlertAndQuit("No password generation method specified!", 88); |
|
93 | - } |
|
94 | - |
|
95 | - // invoke OnBeforeWUsrFormSave event |
|
96 | - $modx->invokeEvent("OnBeforeWUsrFormSave", array( |
|
97 | - "mode" => "new", |
|
98 | - )); |
|
99 | - |
|
100 | - // create the user account |
|
101 | - $field = array(); |
|
102 | - $field['username'] = $esc_newusername; |
|
103 | - $field['password'] = md5($newpassword); |
|
104 | - $internalKey = $modx->db->insert($field, $tbl_web_users); |
|
105 | - |
|
106 | - $field = compact('internalKey', 'fullname', 'role', 'email', 'phone', 'mobilephone', 'fax', 'zip', 'street', 'city', 'state', 'country', 'gender', 'dob', 'photo', 'comment', 'blocked', 'blockeduntil', 'blockedafter'); |
|
107 | - $field = $modx->db->escape($field); |
|
108 | - $modx->db->insert($field, $tbl_web_user_attributes); |
|
109 | - |
|
110 | - // Save User Settings |
|
63 | + case '87' : // new user |
|
64 | + // check if this user name already exist |
|
65 | + $rs = $modx->db->select('count(id)', $tbl_web_users, "username='{$esc_newusername}'"); |
|
66 | + $limit = $modx->db->getValue($rs); |
|
67 | + if($limit > 0) { |
|
68 | + webAlertAndQuit("User name is already in use!", 88); |
|
69 | + } |
|
70 | + |
|
71 | + // check if the email address already exist |
|
72 | + if ($modx->config['allow_multiple_emails'] != 1) { |
|
73 | + $rs = $modx->db->select('count(id)', $tbl_web_user_attributes, "email='{$esc_email}' AND id!='{$id}'"); |
|
74 | + $limit = $modx->db->getValue($rs); |
|
75 | + if($limit > 0) { |
|
76 | + webAlertAndQuit("Email is already in use!", 88); |
|
77 | + } |
|
78 | + } |
|
79 | + |
|
80 | + // generate a new password for this user |
|
81 | + if($specifiedpassword != "" && $passwordgenmethod == "spec") { |
|
82 | + if(strlen($specifiedpassword) < 6) { |
|
83 | + webAlertAndQuit("Password is too short!", 88); |
|
84 | + } else { |
|
85 | + $newpassword = $specifiedpassword; |
|
86 | + } |
|
87 | + } elseif($specifiedpassword == "" && $passwordgenmethod == "spec") { |
|
88 | + webAlertAndQuit("You didn't specify a password for this user!", 88); |
|
89 | + } elseif($passwordgenmethod == 'g') { |
|
90 | + $newpassword = generate_password(8); |
|
91 | + } else { |
|
92 | + webAlertAndQuit("No password generation method specified!", 88); |
|
93 | + } |
|
94 | + |
|
95 | + // invoke OnBeforeWUsrFormSave event |
|
96 | + $modx->invokeEvent("OnBeforeWUsrFormSave", array( |
|
97 | + "mode" => "new", |
|
98 | + )); |
|
99 | + |
|
100 | + // create the user account |
|
101 | + $field = array(); |
|
102 | + $field['username'] = $esc_newusername; |
|
103 | + $field['password'] = md5($newpassword); |
|
104 | + $internalKey = $modx->db->insert($field, $tbl_web_users); |
|
105 | + |
|
106 | + $field = compact('internalKey', 'fullname', 'role', 'email', 'phone', 'mobilephone', 'fax', 'zip', 'street', 'city', 'state', 'country', 'gender', 'dob', 'photo', 'comment', 'blocked', 'blockeduntil', 'blockedafter'); |
|
107 | + $field = $modx->db->escape($field); |
|
108 | + $modx->db->insert($field, $tbl_web_user_attributes); |
|
109 | + |
|
110 | + // Save User Settings |
|
111 | 111 | saveWebUserSettings($internalKey); |
112 | 112 | |
113 | - // Set the item name for logger |
|
114 | - $_SESSION['itemname'] = $newusername; |
|
115 | - |
|
116 | - /*******************************************************************************/ |
|
117 | - // put the user in the user_groups he/ she should be in |
|
118 | - // first, check that up_perms are switched on! |
|
119 | - if($use_udperms == 1) { |
|
120 | - if(!empty($user_groups)) { |
|
121 | - for($i = 0; $i < count($user_groups); $i++) { |
|
122 | - $f = array(); |
|
123 | - $f['webgroup'] = (int)$user_groups[$i]; |
|
124 | - $f['webuser'] = $internalKey; |
|
125 | - $modx->db->insert($f, $tbl_web_groups); |
|
126 | - } |
|
127 | - } |
|
128 | - } |
|
129 | - // end of user_groups stuff! |
|
113 | + // Set the item name for logger |
|
114 | + $_SESSION['itemname'] = $newusername; |
|
115 | + |
|
116 | + /*******************************************************************************/ |
|
117 | + // put the user in the user_groups he/ she should be in |
|
118 | + // first, check that up_perms are switched on! |
|
119 | + if($use_udperms == 1) { |
|
120 | + if(!empty($user_groups)) { |
|
121 | + for($i = 0; $i < count($user_groups); $i++) { |
|
122 | + $f = array(); |
|
123 | + $f['webgroup'] = (int)$user_groups[$i]; |
|
124 | + $f['webuser'] = $internalKey; |
|
125 | + $modx->db->insert($f, $tbl_web_groups); |
|
126 | + } |
|
127 | + } |
|
128 | + } |
|
129 | + // end of user_groups stuff! |
|
130 | 130 | |
131 | 131 | // invoke OnWebSaveUser event |
132 | 132 | $modx->invokeEvent("OnWebSaveUser", array( |
@@ -144,26 +144,26 @@ discard block |
||
144 | 144 | "id" => $internalKey |
145 | 145 | )); |
146 | 146 | |
147 | - if($passwordnotifymethod == 'e') { |
|
147 | + if($passwordnotifymethod == 'e') { |
|
148 | 148 | sendMailMessageForUser($email, $newusername, $newpassword, $fullname, $websignupemail_message, $site_url); |
149 | - if($input['stay'] != '') { |
|
150 | - $a = ($input['stay'] == '2') ? "88&id={$internalKey}" : "87"; |
|
151 | - $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
152 | - header($header); |
|
153 | - } else { |
|
154 | - $header = "Location: index.php?a=99&r=2"; |
|
155 | - header($header); |
|
156 | - } |
|
157 | - } else { |
|
158 | - if($input['stay'] != '') { |
|
159 | - $a = ($input['stay'] == '2') ? "88&id={$internalKey}" : "87"; |
|
160 | - $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
161 | - } else { |
|
162 | - $stayUrl = "index.php?a=99&r=2"; |
|
163 | - } |
|
164 | - |
|
165 | - include_once "header.inc.php"; |
|
166 | - ?> |
|
149 | + if($input['stay'] != '') { |
|
150 | + $a = ($input['stay'] == '2') ? "88&id={$internalKey}" : "87"; |
|
151 | + $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
152 | + header($header); |
|
153 | + } else { |
|
154 | + $header = "Location: index.php?a=99&r=2"; |
|
155 | + header($header); |
|
156 | + } |
|
157 | + } else { |
|
158 | + if($input['stay'] != '') { |
|
159 | + $a = ($input['stay'] == '2') ? "88&id={$internalKey}" : "87"; |
|
160 | + $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
161 | + } else { |
|
162 | + $stayUrl = "index.php?a=99&r=2"; |
|
163 | + } |
|
164 | + |
|
165 | + include_once "header.inc.php"; |
|
166 | + ?> |
|
167 | 167 | |
168 | 168 | <h1><?php echo $_lang['web_user_title']; ?></h1> |
169 | 169 | |
@@ -185,86 +185,86 @@ discard block |
||
185 | 185 | </div> |
186 | 186 | <?php |
187 | 187 | |
188 | - include_once "footer.inc.php"; |
|
189 | - } |
|
190 | - break; |
|
191 | - case '88' : // edit user |
|
192 | - // generate a new password for this user |
|
193 | - if($genpassword == 1) { |
|
194 | - if($specifiedpassword != "" && $passwordgenmethod == "spec") { |
|
195 | - if(strlen($specifiedpassword) < 6) { |
|
196 | - webAlertAndQuit("Password is too short!", 88); |
|
197 | - } else { |
|
198 | - $newpassword = $specifiedpassword; |
|
199 | - } |
|
200 | - } elseif($specifiedpassword == "" && $passwordgenmethod == "spec") { |
|
201 | - webAlertAndQuit("You didn't specify a password for this user!", 88); |
|
202 | - } elseif($passwordgenmethod == 'g') { |
|
203 | - $newpassword = generate_password(8); |
|
204 | - } else { |
|
205 | - webAlertAndQuit("No password generation method specified!", 88); |
|
206 | - } |
|
207 | - } |
|
208 | - if($passwordnotifymethod == 'e') { |
|
188 | + include_once "footer.inc.php"; |
|
189 | + } |
|
190 | + break; |
|
191 | + case '88' : // edit user |
|
192 | + // generate a new password for this user |
|
193 | + if($genpassword == 1) { |
|
194 | + if($specifiedpassword != "" && $passwordgenmethod == "spec") { |
|
195 | + if(strlen($specifiedpassword) < 6) { |
|
196 | + webAlertAndQuit("Password is too short!", 88); |
|
197 | + } else { |
|
198 | + $newpassword = $specifiedpassword; |
|
199 | + } |
|
200 | + } elseif($specifiedpassword == "" && $passwordgenmethod == "spec") { |
|
201 | + webAlertAndQuit("You didn't specify a password for this user!", 88); |
|
202 | + } elseif($passwordgenmethod == 'g') { |
|
203 | + $newpassword = generate_password(8); |
|
204 | + } else { |
|
205 | + webAlertAndQuit("No password generation method specified!", 88); |
|
206 | + } |
|
207 | + } |
|
208 | + if($passwordnotifymethod == 'e') { |
|
209 | 209 | sendMailMessageForUser($email, $newusername, $newpassword, $fullname, $websignupemail_message, $site_url); |
210 | - } |
|
211 | - |
|
212 | - // check if the username already exist |
|
213 | - $rs = $modx->db->select('count(id)', $tbl_web_users, "username='{$esc_newusername}' AND id!='{$id}'"); |
|
214 | - $limit = $modx->db->getValue($rs); |
|
215 | - if($limit > 0) { |
|
216 | - webAlertAndQuit("User name is already in use!", 88); |
|
217 | - } |
|
218 | - |
|
219 | - // check if the email address already exists |
|
220 | - if ($modx->config['allow_multiple_emails'] != 1) { |
|
221 | - $rs = $modx->db->select('count(internalKey)', $tbl_web_user_attributes, "email='{$esc_email}' AND internalKey!='{$id}'"); |
|
222 | - $limit = $modx->db->getValue($rs); |
|
223 | - if($limit > 0) { |
|
224 | - webAlertAndQuit("Email is already in use!", 88); |
|
225 | - } |
|
226 | - } |
|
227 | - |
|
228 | - // invoke OnBeforeWUsrFormSave event |
|
229 | - $modx->invokeEvent("OnBeforeWUsrFormSave", array( |
|
230 | - "mode" => "upd", |
|
231 | - "id" => $id |
|
232 | - )); |
|
233 | - |
|
234 | - // update user name and password |
|
235 | - $field = array(); |
|
236 | - $field['username'] = $esc_newusername; |
|
237 | - if($genpassword == 1) { |
|
238 | - $field['password'] = md5($newpassword); |
|
239 | - } |
|
240 | - $modx->db->update($field, $tbl_web_users, "id='{$id}'"); |
|
241 | - $field = compact('fullname', 'role', 'email', 'phone', 'mobilephone', 'fax', 'zip', 'street', 'city', 'state', 'country', 'gender', 'dob', 'photo', 'comment', 'failedlogincount', 'blocked', 'blockeduntil', 'blockedafter'); |
|
242 | - $field = $modx->db->escape($field); |
|
243 | - $modx->db->update($field, $tbl_web_user_attributes, "internalKey='{$id}'"); |
|
244 | - |
|
245 | - // Save User Settings |
|
210 | + } |
|
211 | + |
|
212 | + // check if the username already exist |
|
213 | + $rs = $modx->db->select('count(id)', $tbl_web_users, "username='{$esc_newusername}' AND id!='{$id}'"); |
|
214 | + $limit = $modx->db->getValue($rs); |
|
215 | + if($limit > 0) { |
|
216 | + webAlertAndQuit("User name is already in use!", 88); |
|
217 | + } |
|
218 | + |
|
219 | + // check if the email address already exists |
|
220 | + if ($modx->config['allow_multiple_emails'] != 1) { |
|
221 | + $rs = $modx->db->select('count(internalKey)', $tbl_web_user_attributes, "email='{$esc_email}' AND internalKey!='{$id}'"); |
|
222 | + $limit = $modx->db->getValue($rs); |
|
223 | + if($limit > 0) { |
|
224 | + webAlertAndQuit("Email is already in use!", 88); |
|
225 | + } |
|
226 | + } |
|
227 | + |
|
228 | + // invoke OnBeforeWUsrFormSave event |
|
229 | + $modx->invokeEvent("OnBeforeWUsrFormSave", array( |
|
230 | + "mode" => "upd", |
|
231 | + "id" => $id |
|
232 | + )); |
|
233 | + |
|
234 | + // update user name and password |
|
235 | + $field = array(); |
|
236 | + $field['username'] = $esc_newusername; |
|
237 | + if($genpassword == 1) { |
|
238 | + $field['password'] = md5($newpassword); |
|
239 | + } |
|
240 | + $modx->db->update($field, $tbl_web_users, "id='{$id}'"); |
|
241 | + $field = compact('fullname', 'role', 'email', 'phone', 'mobilephone', 'fax', 'zip', 'street', 'city', 'state', 'country', 'gender', 'dob', 'photo', 'comment', 'failedlogincount', 'blocked', 'blockeduntil', 'blockedafter'); |
|
242 | + $field = $modx->db->escape($field); |
|
243 | + $modx->db->update($field, $tbl_web_user_attributes, "internalKey='{$id}'"); |
|
244 | + |
|
245 | + // Save User Settings |
|
246 | 246 | saveWebUserSettings($id); |
247 | 247 | |
248 | - // Set the item name for logger |
|
249 | - $_SESSION['itemname'] = $newusername; |
|
250 | - |
|
251 | - /*******************************************************************************/ |
|
252 | - // put the user in the user_groups he/ she should be in |
|
253 | - // first, check that up_perms are switched on! |
|
254 | - if($use_udperms == 1) { |
|
255 | - // as this is an existing user, delete his/ her entries in the groups before saving the new groups |
|
256 | - $modx->db->delete($tbl_web_groups, "webuser='{$id}'"); |
|
257 | - if(!empty($user_groups)) { |
|
258 | - for($i = 0; $i < count($user_groups); $i++) { |
|
259 | - $field = array(); |
|
260 | - $field['webgroup'] = (int)$user_groups[$i]; |
|
261 | - $field['webuser'] = $id; |
|
262 | - $modx->db->insert($field, $tbl_web_groups); |
|
263 | - } |
|
264 | - } |
|
265 | - } |
|
266 | - // end of user_groups stuff! |
|
267 | - /*******************************************************************************/ |
|
248 | + // Set the item name for logger |
|
249 | + $_SESSION['itemname'] = $newusername; |
|
250 | + |
|
251 | + /*******************************************************************************/ |
|
252 | + // put the user in the user_groups he/ she should be in |
|
253 | + // first, check that up_perms are switched on! |
|
254 | + if($use_udperms == 1) { |
|
255 | + // as this is an existing user, delete his/ her entries in the groups before saving the new groups |
|
256 | + $modx->db->delete($tbl_web_groups, "webuser='{$id}'"); |
|
257 | + if(!empty($user_groups)) { |
|
258 | + for($i = 0; $i < count($user_groups); $i++) { |
|
259 | + $field = array(); |
|
260 | + $field['webgroup'] = (int)$user_groups[$i]; |
|
261 | + $field['webuser'] = $id; |
|
262 | + $modx->db->insert($field, $tbl_web_groups); |
|
263 | + } |
|
264 | + } |
|
265 | + } |
|
266 | + // end of user_groups stuff! |
|
267 | + /*******************************************************************************/ |
|
268 | 268 | |
269 | 269 | // invoke OnWebSaveUser event |
270 | 270 | $modx->invokeEvent("OnWebSaveUser", array( |
@@ -293,16 +293,16 @@ discard block |
||
293 | 293 | "id" => $id |
294 | 294 | )); |
295 | 295 | |
296 | - if($genpassword == 1 && $passwordnotifymethod == 's') { |
|
297 | - if($input['stay'] != '') { |
|
298 | - $a = ($input['stay'] == '2') ? "88&id={$id}" : "87"; |
|
299 | - $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
300 | - } else { |
|
301 | - $stayUrl = "index.php?a=99&r=2"; |
|
302 | - } |
|
296 | + if($genpassword == 1 && $passwordnotifymethod == 's') { |
|
297 | + if($input['stay'] != '') { |
|
298 | + $a = ($input['stay'] == '2') ? "88&id={$id}" : "87"; |
|
299 | + $stayUrl = "index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
300 | + } else { |
|
301 | + $stayUrl = "index.php?a=99&r=2"; |
|
302 | + } |
|
303 | 303 | |
304 | - include_once "header.inc.php"; |
|
305 | - ?> |
|
304 | + include_once "header.inc.php"; |
|
305 | + ?> |
|
306 | 306 | |
307 | 307 | <h1><?php echo $_lang['web_user_title']; ?></h1> |
308 | 308 | |
@@ -322,18 +322,18 @@ discard block |
||
322 | 322 | </div> |
323 | 323 | <?php |
324 | 324 | |
325 | - include_once "footer.inc.php"; |
|
326 | - } else { |
|
327 | - if($input['stay'] != '') { |
|
328 | - $a = ($input['stay'] == '2') ? "88&id={$id}" : "87"; |
|
329 | - $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
330 | - header($header); |
|
331 | - } else { |
|
332 | - $header = "Location: index.php?a=99&r=2"; |
|
333 | - header($header); |
|
334 | - } |
|
335 | - } |
|
336 | - break; |
|
337 | - default : |
|
338 | - webAlertAndQuit("No operation set in request.", 88); |
|
325 | + include_once "footer.inc.php"; |
|
326 | + } else { |
|
327 | + if($input['stay'] != '') { |
|
328 | + $a = ($input['stay'] == '2') ? "88&id={$id}" : "87"; |
|
329 | + $header = "Location: index.php?a={$a}&r=2&stay=" . $input['stay']; |
|
330 | + header($header); |
|
331 | + } else { |
|
332 | + $header = "Location: index.php?a=99&r=2"; |
|
333 | + header($header); |
|
334 | + } |
|
335 | + } |
|
336 | + break; |
|
337 | + default : |
|
338 | + webAlertAndQuit("No operation set in request.", 88); |
|
339 | 339 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | /********************/ |
@@ -12,29 +12,29 @@ discard block |
||
12 | 12 | |
13 | 13 | // check permissions |
14 | 14 | switch($modx->manager->action) { |
15 | - case 27: |
|
16 | - if(!$modx->hasPermission('edit_document')) { |
|
17 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
18 | - } |
|
19 | - break; |
|
20 | - case 85: |
|
21 | - case 72: |
|
22 | - case 4: |
|
23 | - if(!$modx->hasPermission('new_document')) { |
|
24 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
25 | - } elseif(isset($_REQUEST['pid']) && $_REQUEST['pid'] != '0') { |
|
26 | - // check user has permissions for parent |
|
27 | - $udperms = new EvolutionCMS\Legacy\Permissions(); |
|
28 | - $udperms->user = $modx->getLoginUserID(); |
|
29 | - $udperms->document = empty($_REQUEST['pid']) ? 0 : $_REQUEST['pid']; |
|
30 | - $udperms->role = $_SESSION['mgrRole']; |
|
31 | - if(!$udperms->checkPermissions()) { |
|
32 | - $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
33 | - } |
|
34 | - } |
|
35 | - break; |
|
36 | - default: |
|
37 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
15 | + case 27: |
|
16 | + if(!$modx->hasPermission('edit_document')) { |
|
17 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
18 | + } |
|
19 | + break; |
|
20 | + case 85: |
|
21 | + case 72: |
|
22 | + case 4: |
|
23 | + if(!$modx->hasPermission('new_document')) { |
|
24 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
25 | + } elseif(isset($_REQUEST['pid']) && $_REQUEST['pid'] != '0') { |
|
26 | + // check user has permissions for parent |
|
27 | + $udperms = new EvolutionCMS\Legacy\Permissions(); |
|
28 | + $udperms->user = $modx->getLoginUserID(); |
|
29 | + $udperms->document = empty($_REQUEST['pid']) ? 0 : $_REQUEST['pid']; |
|
30 | + $udperms->role = $_SESSION['mgrRole']; |
|
31 | + if(!$udperms->checkPermissions()) { |
|
32 | + $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
33 | + } |
|
34 | + } |
|
35 | + break; |
|
36 | + default: |
|
37 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
@@ -53,21 +53,21 @@ discard block |
||
53 | 53 | $tbl_site_tmplvars = $modx->getFullTableName('site_tmplvars'); |
54 | 54 | |
55 | 55 | if($modx->manager->action == 27) { |
56 | - //editing an existing document |
|
57 | - // check permissions on the document |
|
58 | - $udperms = new EvolutionCMS\Legacy\Permissions(); |
|
59 | - $udperms->user = $modx->getLoginUserID(); |
|
60 | - $udperms->document = $id; |
|
61 | - $udperms->role = $_SESSION['mgrRole']; |
|
62 | - |
|
63 | - if(!$udperms->checkPermissions()) { |
|
64 | - $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
65 | - } |
|
56 | + //editing an existing document |
|
57 | + // check permissions on the document |
|
58 | + $udperms = new EvolutionCMS\Legacy\Permissions(); |
|
59 | + $udperms->user = $modx->getLoginUserID(); |
|
60 | + $udperms->document = $id; |
|
61 | + $udperms->role = $_SESSION['mgrRole']; |
|
62 | + |
|
63 | + if(!$udperms->checkPermissions()) { |
|
64 | + $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
65 | + } |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | // check to see if resource isn't locked |
69 | 69 | if($lockedEl = $modx->elementIsLocked(7, $id)) { |
70 | - $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['resource'])); |
|
70 | + $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['resource'])); |
|
71 | 71 | } |
72 | 72 | // end check for lock |
73 | 73 | |
@@ -76,74 +76,74 @@ discard block |
||
76 | 76 | |
77 | 77 | // get document groups for current user |
78 | 78 | if($_SESSION['mgrDocgroups']) { |
79 | - $docgrp = implode(',', $_SESSION['mgrDocgroups']); |
|
79 | + $docgrp = implode(',', $_SESSION['mgrDocgroups']); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | if(!empty ($id)) { |
83 | - $access = sprintf("1='%s' OR sc.privatemgr=0", $_SESSION['mgrRole']); |
|
84 | - if($docgrp) { |
|
85 | - $access .= " OR dg.document_group IN ({$docgrp})"; |
|
86 | - } |
|
87 | - $rs = $modx->db->select('sc.*', "{$tbl_site_content} AS sc LEFT JOIN {$tbl_document_groups} AS dg ON dg.document=sc.id", "sc.id='{$id}' AND ({$access})"); |
|
88 | - $content = array(); |
|
89 | - $content = $modx->db->getRow($rs); |
|
90 | - $modx->documentObject = &$content; |
|
91 | - if(!$content) { |
|
92 | - $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
93 | - } |
|
94 | - $_SESSION['itemname'] = $content['pagetitle']; |
|
83 | + $access = sprintf("1='%s' OR sc.privatemgr=0", $_SESSION['mgrRole']); |
|
84 | + if($docgrp) { |
|
85 | + $access .= " OR dg.document_group IN ({$docgrp})"; |
|
86 | + } |
|
87 | + $rs = $modx->db->select('sc.*', "{$tbl_site_content} AS sc LEFT JOIN {$tbl_document_groups} AS dg ON dg.document=sc.id", "sc.id='{$id}' AND ({$access})"); |
|
88 | + $content = array(); |
|
89 | + $content = $modx->db->getRow($rs); |
|
90 | + $modx->documentObject = &$content; |
|
91 | + if(!$content) { |
|
92 | + $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
|
93 | + } |
|
94 | + $_SESSION['itemname'] = $content['pagetitle']; |
|
95 | 95 | } else { |
96 | - $content = array(); |
|
96 | + $content = array(); |
|
97 | 97 | |
98 | - if(isset($_REQUEST['newtemplate'])) { |
|
99 | - $content['template'] = $_REQUEST['newtemplate']; |
|
100 | - } else { |
|
101 | - $content['template'] = getDefaultTemplate(); |
|
102 | - } |
|
98 | + if(isset($_REQUEST['newtemplate'])) { |
|
99 | + $content['template'] = $_REQUEST['newtemplate']; |
|
100 | + } else { |
|
101 | + $content['template'] = getDefaultTemplate(); |
|
102 | + } |
|
103 | 103 | |
104 | - $_SESSION['itemname'] = $_lang["new_resource"]; |
|
104 | + $_SESSION['itemname'] = $_lang["new_resource"]; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | // restore saved form |
108 | 108 | $formRestored = $modx->manager->loadFormValues(); |
109 | 109 | if(isset($_REQUEST['newtemplate'])) { |
110 | - $formRestored = true; |
|
110 | + $formRestored = true; |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | // retain form values if template was changed |
114 | 114 | // edited to convert pub_date and unpub_date |
115 | 115 | // sottwell 02-09-2006 |
116 | 116 | if($formRestored == true) { |
117 | - $content = array_merge($content, $_POST); |
|
118 | - $content['content'] = $_POST['ta']; |
|
119 | - if(empty ($content['pub_date'])) { |
|
120 | - unset ($content['pub_date']); |
|
121 | - } else { |
|
122 | - $content['pub_date'] = $modx->toTimeStamp($content['pub_date']); |
|
123 | - } |
|
124 | - if(empty ($content['unpub_date'])) { |
|
125 | - unset ($content['unpub_date']); |
|
126 | - } else { |
|
127 | - $content['unpub_date'] = $modx->toTimeStamp($content['unpub_date']); |
|
128 | - } |
|
117 | + $content = array_merge($content, $_POST); |
|
118 | + $content['content'] = $_POST['ta']; |
|
119 | + if(empty ($content['pub_date'])) { |
|
120 | + unset ($content['pub_date']); |
|
121 | + } else { |
|
122 | + $content['pub_date'] = $modx->toTimeStamp($content['pub_date']); |
|
123 | + } |
|
124 | + if(empty ($content['unpub_date'])) { |
|
125 | + unset ($content['unpub_date']); |
|
126 | + } else { |
|
127 | + $content['unpub_date'] = $modx->toTimeStamp($content['unpub_date']); |
|
128 | + } |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | // increase menu index if this is a new document |
132 | 132 | if(!isset ($_REQUEST['id'])) { |
133 | - if(!isset ($modx->config['auto_menuindex'])) { |
|
134 | - $modx->config['auto_menuindex'] = 1; |
|
135 | - } |
|
136 | - if($modx->config['auto_menuindex']) { |
|
137 | - $pid = (int)$_REQUEST['pid']; |
|
138 | - $rs = $modx->db->select('count(*)', $tbl_site_content, "parent='{$pid}'"); |
|
139 | - $content['menuindex'] = $modx->db->getValue($rs); |
|
140 | - } else { |
|
141 | - $content['menuindex'] = 0; |
|
142 | - } |
|
133 | + if(!isset ($modx->config['auto_menuindex'])) { |
|
134 | + $modx->config['auto_menuindex'] = 1; |
|
135 | + } |
|
136 | + if($modx->config['auto_menuindex']) { |
|
137 | + $pid = (int)$_REQUEST['pid']; |
|
138 | + $rs = $modx->db->select('count(*)', $tbl_site_content, "parent='{$pid}'"); |
|
139 | + $content['menuindex'] = $modx->db->getValue($rs); |
|
140 | + } else { |
|
141 | + $content['menuindex'] = 0; |
|
142 | + } |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | if(isset ($_POST['which_editor'])) { |
146 | - $modx->config['which_editor'] = $_POST['which_editor']; |
|
146 | + $modx->config['which_editor'] = $_POST['which_editor']; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | // Add lock-element JS-Script |
@@ -543,23 +543,23 @@ discard block |
||
543 | 543 | |
544 | 544 | <form name="mutate" id="mutate" class="content" method="post" enctype="multipart/form-data" action="index.php" onsubmit="documentDirty=false;"> |
545 | 545 | <?php |
546 | - // invoke OnDocFormPrerender event |
|
547 | - $evtOut = $modx->invokeEvent('OnDocFormPrerender', array( |
|
548 | - 'id' => $id, |
|
549 | - 'template' => $content['template'] |
|
550 | - )); |
|
551 | - |
|
552 | - if(is_array($evtOut)) { |
|
553 | - echo implode('', $evtOut); |
|
554 | - } |
|
555 | - |
|
556 | - /*************************/ |
|
557 | - $dir = isset($_REQUEST['dir']) ? $_REQUEST['dir'] : ''; |
|
558 | - $sort = isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 'createdon'; |
|
559 | - $page = isset($_REQUEST['page']) ? (int) $_REQUEST['page'] : ''; |
|
560 | - /*************************/ |
|
561 | - |
|
562 | - ?> |
|
546 | + // invoke OnDocFormPrerender event |
|
547 | + $evtOut = $modx->invokeEvent('OnDocFormPrerender', array( |
|
548 | + 'id' => $id, |
|
549 | + 'template' => $content['template'] |
|
550 | + )); |
|
551 | + |
|
552 | + if(is_array($evtOut)) { |
|
553 | + echo implode('', $evtOut); |
|
554 | + } |
|
555 | + |
|
556 | + /*************************/ |
|
557 | + $dir = isset($_REQUEST['dir']) ? $_REQUEST['dir'] : ''; |
|
558 | + $sort = isset($_REQUEST['sort']) ? $_REQUEST['sort'] : 'createdon'; |
|
559 | + $page = isset($_REQUEST['page']) ? (int) $_REQUEST['page'] : ''; |
|
560 | + /*************************/ |
|
561 | + |
|
562 | + ?> |
|
563 | 563 | <input type="hidden" name="a" value="5" /> |
564 | 564 | <input type="hidden" name="id" value="<?= $content['id'] ?>" /> |
565 | 565 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>" /> |
@@ -574,54 +574,54 @@ discard block |
||
574 | 574 | |
575 | 575 | <h1> |
576 | 576 | <i class="fa fa-pencil-square-o"></i><?php if(isset($_REQUEST['id'])) { |
577 | - echo iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']) . (iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '') . '<small>(' . $_REQUEST['id'] . ')</small>'; |
|
578 | - } else { |
|
579 | - if ($modx->manager->action == '4') { |
|
577 | + echo iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']) . (iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '') . '<small>(' . $_REQUEST['id'] . ')</small>'; |
|
578 | + } else { |
|
579 | + if ($modx->manager->action == '4') { |
|
580 | 580 | echo $_lang['add_resource']; |
581 | 581 | } else if ($modx->manager->action == '72') { |
582 | 582 | echo $_lang['add_weblink']; |
583 | 583 | } else { |
584 | 584 | echo $_lang['create_resource_title']; |
585 | 585 | } |
586 | - } ?> |
|
586 | + } ?> |
|
587 | 587 | </h1> |
588 | 588 | |
589 | 589 | <?= $_style['actionbuttons']['dynamic']['document'] ?> |
590 | 590 | |
591 | 591 | <?php |
592 | - // breadcrumbs |
|
593 | - if($modx->config['use_breadcrumbs']) { |
|
594 | - $temp = array(); |
|
595 | - $title = isset($content['pagetitle']) ? $content['pagetitle'] : $_lang['create_resource_title']; |
|
596 | - |
|
597 | - if(isset($_REQUEST['id']) && $content['parent'] != 0) { |
|
598 | - $bID = (int) $_REQUEST['id']; |
|
599 | - $temp = $modx->getParentIds($bID); |
|
600 | - } else if(isset($_REQUEST['pid'])) { |
|
601 | - $bID = (int) $_REQUEST['pid']; |
|
602 | - $temp = $modx->getParentIds($bID); |
|
603 | - array_unshift($temp, $bID); |
|
604 | - } |
|
605 | - |
|
606 | - if($temp) { |
|
607 | - $parents = implode(',', $temp); |
|
608 | - |
|
609 | - if(!empty($parents)) { |
|
610 | - $where = "FIND_IN_SET(id,'{$parents}') DESC"; |
|
611 | - $rs = $modx->db->select('id, pagetitle', $tbl_site_content, "id IN ({$parents})", $where); |
|
612 | - while($row = $modx->db->getRow($rs)) { |
|
613 | - $out .= '<li class="breadcrumbs__li"> |
|
592 | + // breadcrumbs |
|
593 | + if($modx->config['use_breadcrumbs']) { |
|
594 | + $temp = array(); |
|
595 | + $title = isset($content['pagetitle']) ? $content['pagetitle'] : $_lang['create_resource_title']; |
|
596 | + |
|
597 | + if(isset($_REQUEST['id']) && $content['parent'] != 0) { |
|
598 | + $bID = (int) $_REQUEST['id']; |
|
599 | + $temp = $modx->getParentIds($bID); |
|
600 | + } else if(isset($_REQUEST['pid'])) { |
|
601 | + $bID = (int) $_REQUEST['pid']; |
|
602 | + $temp = $modx->getParentIds($bID); |
|
603 | + array_unshift($temp, $bID); |
|
604 | + } |
|
605 | + |
|
606 | + if($temp) { |
|
607 | + $parents = implode(',', $temp); |
|
608 | + |
|
609 | + if(!empty($parents)) { |
|
610 | + $where = "FIND_IN_SET(id,'{$parents}') DESC"; |
|
611 | + $rs = $modx->db->select('id, pagetitle', $tbl_site_content, "id IN ({$parents})", $where); |
|
612 | + while($row = $modx->db->getRow($rs)) { |
|
613 | + $out .= '<li class="breadcrumbs__li"> |
|
614 | 614 | <a href="index.php?a=27&id=' . $row['id'] . '" class="breadcrumbs__a">' . htmlspecialchars($row['pagetitle'], ENT_QUOTES, $modx->config['modx_charset']) . '</a> |
615 | 615 | <span class="breadcrumbs__sep">></span> |
616 | 616 | </li>'; |
617 | - } |
|
618 | - } |
|
619 | - } |
|
617 | + } |
|
618 | + } |
|
619 | + } |
|
620 | 620 | |
621 | - $out .= '<li class="breadcrumbs__li breadcrumbs__li_current">' . $title . '</li>'; |
|
622 | - echo '<ul class="breadcrumbs">' . $out . '</ul>'; |
|
623 | - } |
|
624 | - ?> |
|
621 | + $out .= '<li class="breadcrumbs__li breadcrumbs__li_current">' . $title . '</li>'; |
|
622 | + echo '<ul class="breadcrumbs">' . $out . '</ul>'; |
|
623 | + } |
|
624 | + ?> |
|
625 | 625 | |
626 | 626 | <!-- start main wrapper --> |
627 | 627 | <div class="sectionBody"> |
@@ -633,13 +633,13 @@ discard block |
||
633 | 633 | |
634 | 634 | <!-- General --> |
635 | 635 | <?php |
636 | - $evtOut = $modx->invokeEvent('OnDocFormTemplateRender', array( |
|
637 | - 'id' => $id |
|
638 | - )); |
|
639 | - if(is_array($evtOut)) { |
|
640 | - echo implode('', $evtOut); |
|
641 | - } else { |
|
642 | - ?> |
|
636 | + $evtOut = $modx->invokeEvent('OnDocFormTemplateRender', array( |
|
637 | + 'id' => $id |
|
638 | + )); |
|
639 | + if(is_array($evtOut)) { |
|
640 | + echo implode('', $evtOut); |
|
641 | + } else { |
|
642 | + ?> |
|
643 | 643 | <div class="tab-page" id="tabGeneral"> |
644 | 644 | <h2 class="tab"><?= $_lang['settings_general'] ?></h2> |
645 | 645 | <script type="text/javascript">tpSettings.addTabPage(document.getElementById("tabGeneral"));</script> |
@@ -724,36 +724,36 @@ discard block |
||
724 | 724 | <select id="template" name="template" class="inputBox" onchange="templateWarning();"> |
725 | 725 | <option value="0">(blank)</option> |
726 | 726 | <?php |
727 | - $field = "t.templatename, t.selectable, t.id, c.category"; |
|
728 | - $from = "{$tbl_site_templates} AS t LEFT JOIN {$tbl_categories} AS c ON t.category = c.id"; |
|
729 | - $rs = $modx->db->select($field, $from, '', 'c.category, t.templatename ASC'); |
|
730 | - $currentCategory = ''; |
|
731 | - while($row = $modx->db->getRow($rs)) { |
|
732 | - if($row['selectable'] != 1 && $row['id'] != $content['template']) { |
|
733 | - continue; |
|
734 | - }; |
|
735 | - // Skip if not selectable but show if selected! |
|
736 | - $thisCategory = $row['category']; |
|
737 | - if($thisCategory == null) { |
|
738 | - $thisCategory = $_lang["no_category"]; |
|
739 | - } |
|
740 | - if($thisCategory != $currentCategory) { |
|
741 | - if($closeOptGroup) { |
|
742 | - echo "\t\t\t\t\t</optgroup>\n"; |
|
743 | - } |
|
744 | - echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
|
745 | - $closeOptGroup = true; |
|
746 | - } |
|
727 | + $field = "t.templatename, t.selectable, t.id, c.category"; |
|
728 | + $from = "{$tbl_site_templates} AS t LEFT JOIN {$tbl_categories} AS c ON t.category = c.id"; |
|
729 | + $rs = $modx->db->select($field, $from, '', 'c.category, t.templatename ASC'); |
|
730 | + $currentCategory = ''; |
|
731 | + while($row = $modx->db->getRow($rs)) { |
|
732 | + if($row['selectable'] != 1 && $row['id'] != $content['template']) { |
|
733 | + continue; |
|
734 | + }; |
|
735 | + // Skip if not selectable but show if selected! |
|
736 | + $thisCategory = $row['category']; |
|
737 | + if($thisCategory == null) { |
|
738 | + $thisCategory = $_lang["no_category"]; |
|
739 | + } |
|
740 | + if($thisCategory != $currentCategory) { |
|
741 | + if($closeOptGroup) { |
|
742 | + echo "\t\t\t\t\t</optgroup>\n"; |
|
743 | + } |
|
744 | + echo "\t\t\t\t\t<optgroup label=\"$thisCategory\">\n"; |
|
745 | + $closeOptGroup = true; |
|
746 | + } |
|
747 | 747 | |
748 | - $selectedtext = ($row['id'] == $content['template']) ? ' selected="selected"' : ''; |
|
748 | + $selectedtext = ($row['id'] == $content['template']) ? ' selected="selected"' : ''; |
|
749 | 749 | |
750 | - echo "\t\t\t\t\t" . '<option value="' . $row['id'] . '"' . $selectedtext . '>' . $row['templatename'] . "</option>\n"; |
|
751 | - $currentCategory = $thisCategory; |
|
752 | - } |
|
753 | - if($thisCategory != '') { |
|
754 | - echo "\t\t\t\t\t</optgroup>\n"; |
|
755 | - } |
|
756 | - ?> |
|
750 | + echo "\t\t\t\t\t" . '<option value="' . $row['id'] . '"' . $selectedtext . '>' . $row['templatename'] . "</option>\n"; |
|
751 | + $currentCategory = $thisCategory; |
|
752 | + } |
|
753 | + if($thisCategory != '') { |
|
754 | + echo "\t\t\t\t\t</optgroup>\n"; |
|
755 | + } |
|
756 | + ?> |
|
757 | 757 | </select> |
758 | 758 | </td> |
759 | 759 | </tr> |
@@ -793,37 +793,37 @@ discard block |
||
793 | 793 | </td> |
794 | 794 | <td valign="top"> |
795 | 795 | <?php |
796 | - $parentlookup = false; |
|
797 | - if(isset ($_REQUEST['id'])) { |
|
798 | - if($content['parent'] == 0) { |
|
799 | - $parentname = $site_name; |
|
800 | - } else { |
|
801 | - $parentlookup = $content['parent']; |
|
802 | - } |
|
803 | - } elseif(isset ($_REQUEST['pid'])) { |
|
804 | - if($_REQUEST['pid'] == 0) { |
|
805 | - $parentname = $site_name; |
|
806 | - } else { |
|
807 | - $parentlookup = $_REQUEST['pid']; |
|
808 | - } |
|
809 | - } elseif(isset($_POST['parent'])) { |
|
810 | - if($_POST['parent'] == 0) { |
|
811 | - $parentname = $site_name; |
|
812 | - } else { |
|
813 | - $parentlookup = $_POST['parent']; |
|
814 | - } |
|
815 | - } else { |
|
816 | - $parentname = $site_name; |
|
817 | - $content['parent'] = 0; |
|
818 | - } |
|
819 | - if($parentlookup !== false && is_numeric($parentlookup)) { |
|
820 | - $rs = $modx->db->select('pagetitle', $tbl_site_content, "id='{$parentlookup}'"); |
|
821 | - $parentname = $modx->db->getValue($rs); |
|
822 | - if(!$parentname) { |
|
823 | - $modx->webAlertAndQuit($_lang["error_no_parent"]); |
|
824 | - } |
|
825 | - } |
|
826 | - ?> |
|
796 | + $parentlookup = false; |
|
797 | + if(isset ($_REQUEST['id'])) { |
|
798 | + if($content['parent'] == 0) { |
|
799 | + $parentname = $site_name; |
|
800 | + } else { |
|
801 | + $parentlookup = $content['parent']; |
|
802 | + } |
|
803 | + } elseif(isset ($_REQUEST['pid'])) { |
|
804 | + if($_REQUEST['pid'] == 0) { |
|
805 | + $parentname = $site_name; |
|
806 | + } else { |
|
807 | + $parentlookup = $_REQUEST['pid']; |
|
808 | + } |
|
809 | + } elseif(isset($_POST['parent'])) { |
|
810 | + if($_POST['parent'] == 0) { |
|
811 | + $parentname = $site_name; |
|
812 | + } else { |
|
813 | + $parentlookup = $_POST['parent']; |
|
814 | + } |
|
815 | + } else { |
|
816 | + $parentname = $site_name; |
|
817 | + $content['parent'] = 0; |
|
818 | + } |
|
819 | + if($parentlookup !== false && is_numeric($parentlookup)) { |
|
820 | + $rs = $modx->db->select('pagetitle', $tbl_site_content, "id='{$parentlookup}'"); |
|
821 | + $parentname = $modx->db->getValue($rs); |
|
822 | + if(!$parentname) { |
|
823 | + $modx->webAlertAndQuit($_lang["error_no_parent"]); |
|
824 | + } |
|
825 | + } |
|
826 | + ?> |
|
827 | 827 | <i id="plock" class="<?= $_style["actions_folder"] ?>" onclick="enableParentSelection(!allowParentSelection);"></i> |
828 | 828 | <b><span id="parentName"><?= (isset($_REQUEST['pid']) ? $_REQUEST['pid'] : $content['parent']) ?> (<?= $parentname ?>)</span></b> |
829 | 829 | <input type="hidden" name="parent" value="<?= (isset($_REQUEST['pid']) ? $_REQUEST['pid'] : $content['parent']) ?>" onchange="documentDirty=true;" /> |
@@ -831,7 +831,7 @@ discard block |
||
831 | 831 | </tr> |
832 | 832 | <tr></tr> |
833 | 833 | <?php |
834 | - /* |
|
834 | + /* |
|
835 | 835 | if($content['type'] == 'reference' || $modx->manager->action == '72') { |
836 | 836 | ?> |
837 | 837 | <tr> |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | </tr> |
860 | 860 | <?php |
861 | 861 | }*/ |
862 | - ?> |
|
862 | + ?> |
|
863 | 863 | |
864 | 864 | <?php if($content['type'] == 'document' || $modx->manager->action == '4') { ?> |
865 | 865 | <tr> |
@@ -872,36 +872,36 @@ discard block |
||
872 | 872 | <select id="which_editor" class="form-control form-control-sm" size="1" name="which_editor" onchange="changeRTE();"> |
873 | 873 | <option value="none"><?= $_lang['none'] ?></option> |
874 | 874 | <?php |
875 | - // invoke OnRichTextEditorRegister event |
|
876 | - $evtOut = $modx->invokeEvent("OnRichTextEditorRegister"); |
|
877 | - if(is_array($evtOut)) { |
|
878 | - for($i = 0; $i < count($evtOut); $i++) { |
|
879 | - $editor = $evtOut[$i]; |
|
880 | - echo "\t\t\t", '<option value="', $editor, '"', ($modx->config['which_editor'] == $editor ? ' selected="selected"' : ''), '>', $editor, "</option>\n"; |
|
881 | - } |
|
882 | - } |
|
883 | - ?> |
|
875 | + // invoke OnRichTextEditorRegister event |
|
876 | + $evtOut = $modx->invokeEvent("OnRichTextEditorRegister"); |
|
877 | + if(is_array($evtOut)) { |
|
878 | + for($i = 0; $i < count($evtOut); $i++) { |
|
879 | + $editor = $evtOut[$i]; |
|
880 | + echo "\t\t\t", '<option value="', $editor, '"', ($modx->config['which_editor'] == $editor ? ' selected="selected"' : ''), '>', $editor, "</option>\n"; |
|
881 | + } |
|
882 | + } |
|
883 | + ?> |
|
884 | 884 | </select> |
885 | 885 | </label> |
886 | 886 | </div> |
887 | 887 | <div id="content_body"> |
888 | 888 | <?php |
889 | - if(($content['richtext'] == 1 || $modx->manager->action == '4') && $use_editor == 1) { |
|
890 | - $htmlContent = $content['content']; |
|
891 | - ?> |
|
889 | + if(($content['richtext'] == 1 || $modx->manager->action == '4') && $use_editor == 1) { |
|
890 | + $htmlContent = $content['content']; |
|
891 | + ?> |
|
892 | 892 | <div class="section-editor clearfix"> |
893 | 893 | <textarea id="ta" name="ta" onchange="documentDirty=true;"><?= $modx->htmlspecialchars($htmlContent) ?></textarea> |
894 | 894 | </div> |
895 | 895 | <?php |
896 | - // Richtext-[*content*] |
|
897 | - $richtexteditorIds = array(); |
|
898 | - $richtexteditorOptions = array(); |
|
899 | - $richtexteditorIds[$modx->config['which_editor']][] = 'ta'; |
|
900 | - $richtexteditorOptions[$modx->config['which_editor']]['ta'] = ''; |
|
901 | - } else { |
|
902 | - echo "\t" . '<div><textarea class="phptextarea" id="ta" name="ta" rows="20" wrap="soft" onchange="documentDirty=true;">', $modx->htmlspecialchars($content['content']), '</textarea></div>' . "\n"; |
|
903 | - } |
|
904 | - ?> |
|
896 | + // Richtext-[*content*] |
|
897 | + $richtexteditorIds = array(); |
|
898 | + $richtexteditorOptions = array(); |
|
899 | + $richtexteditorIds[$modx->config['which_editor']][] = 'ta'; |
|
900 | + $richtexteditorOptions[$modx->config['which_editor']]['ta'] = ''; |
|
901 | + } else { |
|
902 | + echo "\t" . '<div><textarea class="phptextarea" id="ta" name="ta" rows="20" wrap="soft" onchange="documentDirty=true;">', $modx->htmlspecialchars($content['content']), '</textarea></div>' . "\n"; |
|
903 | + } |
|
904 | + ?> |
|
905 | 905 | </div> |
906 | 906 | </td> |
907 | 907 | </tr> |
@@ -1207,8 +1207,8 @@ discard block |
||
1207 | 1207 | |
1208 | 1208 | <?php |
1209 | 1209 | |
1210 | - if($_SESSION['mgrRole'] == 1 || $modx->manager->action != '27' || $_SESSION['mgrInternalKey'] == $content['createdby'] || $modx->hasPermission('change_resourcetype')) { |
|
1211 | - ?> |
|
1210 | + if($_SESSION['mgrRole'] == 1 || $modx->manager->action != '27' || $_SESSION['mgrInternalKey'] == $content['createdby'] || $modx->hasPermission('change_resourcetype')) { |
|
1211 | + ?> |
|
1212 | 1212 | <tr> |
1213 | 1213 | <td> |
1214 | 1214 | <span class="warning"><?= $_lang['resource_type'] ?></span> |
@@ -1230,15 +1230,15 @@ discard block |
||
1230 | 1230 | <td> |
1231 | 1231 | <select name="contentType" class="inputBox" onchange="documentDirty=true;"> |
1232 | 1232 | <?php |
1233 | - if(!$content['contentType']) { |
|
1234 | - $content['contentType'] = 'text/html'; |
|
1235 | - } |
|
1236 | - $custom_contenttype = (isset ($custom_contenttype) ? $custom_contenttype : "text/html,text/plain,text/xml"); |
|
1237 | - $ct = explode(",", $custom_contenttype); |
|
1238 | - for($i = 0; $i < count($ct); $i++) { |
|
1239 | - echo "\t\t\t\t\t" . '<option value="' . $ct[$i] . '"' . ($content['contentType'] == $ct[$i] ? ' selected="selected"' : '') . '>' . $ct[$i] . "</option>\n"; |
|
1240 | - } |
|
1241 | - ?> |
|
1233 | + if(!$content['contentType']) { |
|
1234 | + $content['contentType'] = 'text/html'; |
|
1235 | + } |
|
1236 | + $custom_contenttype = (isset ($custom_contenttype) ? $custom_contenttype : "text/html,text/plain,text/xml"); |
|
1237 | + $ct = explode(",", $custom_contenttype); |
|
1238 | + for($i = 0; $i < count($ct); $i++) { |
|
1239 | + echo "\t\t\t\t\t" . '<option value="' . $ct[$i] . '"' . ($content['contentType'] == $ct[$i] ? ' selected="selected"' : '') . '>' . $ct[$i] . "</option>\n"; |
|
1240 | + } |
|
1241 | + ?> |
|
1242 | 1242 | </select> |
1243 | 1243 | </td> |
1244 | 1244 | </tr> |
@@ -1261,23 +1261,23 @@ discard block |
||
1261 | 1261 | </td> |
1262 | 1262 | </tr> |
1263 | 1263 | <?php |
1264 | - } else { |
|
1265 | - if($content['type'] != 'reference' && $modx->manager->action != '72') { |
|
1266 | - // non-admin managers creating or editing a document resource |
|
1267 | - ?> |
|
1264 | + } else { |
|
1265 | + if($content['type'] != 'reference' && $modx->manager->action != '72') { |
|
1266 | + // non-admin managers creating or editing a document resource |
|
1267 | + ?> |
|
1268 | 1268 | <input type="hidden" name="contentType" value="<?= (isset($content['contentType']) ? $content['contentType'] : "text/html") ?>" /> |
1269 | 1269 | <input type="hidden" name="type" value="document" /> |
1270 | 1270 | <input type="hidden" name="content_dispo" value="<?= (isset($content['content_dispo']) ? $content['content_dispo'] : '0') ?>" /> |
1271 | 1271 | <?php |
1272 | - } else { |
|
1273 | - // non-admin managers creating or editing a reference (weblink) resource |
|
1274 | - ?> |
|
1272 | + } else { |
|
1273 | + // non-admin managers creating or editing a reference (weblink) resource |
|
1274 | + ?> |
|
1275 | 1275 | <input type="hidden" name="type" value="reference" /> |
1276 | 1276 | <input type="hidden" name="contentType" value="text/html" /> |
1277 | 1277 | <?php |
1278 | - } |
|
1279 | - }//if mgrRole |
|
1280 | - ?> |
|
1278 | + } |
|
1279 | + }//if mgrRole |
|
1280 | + ?> |
|
1281 | 1281 | |
1282 | 1282 | <tr> |
1283 | 1283 | <td> |
@@ -1360,112 +1360,112 @@ discard block |
||
1360 | 1360 | ?> |
1361 | 1361 | |
1362 | 1362 | <?php |
1363 | - /******************************* |
|
1363 | + /******************************* |
|
1364 | 1364 | * Document Access Permissions */ |
1365 | - if($use_udperms == 1) { |
|
1366 | - $groupsarray = array(); |
|
1367 | - $sql = ''; |
|
1368 | - |
|
1369 | - $documentId = ($modx->manager->action == '27' ? $id : (!empty($_REQUEST['pid']) ? $_REQUEST['pid'] : $content['parent'])); |
|
1370 | - if($documentId > 0) { |
|
1371 | - // Load up, the permissions from the parent (if new document) or existing document |
|
1372 | - $rs = $modx->db->select('id, document_group', $tbl_document_groups, "document='{$documentId}'"); |
|
1373 | - while($currentgroup = $modx->db->getRow($rs)) $groupsarray[] = $currentgroup['document_group'] . ',' . $currentgroup['id']; |
|
1374 | - |
|
1375 | - // Load up the current permissions and names |
|
1376 | - $vs = array( |
|
1377 | - $tbl_document_group_names, |
|
1378 | - $tbl_document_groups, |
|
1379 | - $documentId |
|
1380 | - ); |
|
1381 | - $from = vsprintf("%s AS dgn LEFT JOIN %s AS groups ON groups.document_group=dgn.id AND groups.document='%s'", $vs); |
|
1382 | - $rs = $modx->db->select('dgn.*, groups.id AS link_id', $from, '', 'name'); |
|
1383 | - } else { |
|
1384 | - // Just load up the names, we're starting clean |
|
1385 | - $rs = $modx->db->select('*, NULL AS link_id', $tbl_document_group_names, '', 'name'); |
|
1386 | - } |
|
1387 | - |
|
1388 | - // retain selected doc groups between post |
|
1389 | - if(isset($_POST['docgroups'])) { |
|
1390 | - $groupsarray = array_merge($groupsarray, $_POST['docgroups']); |
|
1391 | - } |
|
1365 | + if($use_udperms == 1) { |
|
1366 | + $groupsarray = array(); |
|
1367 | + $sql = ''; |
|
1368 | + |
|
1369 | + $documentId = ($modx->manager->action == '27' ? $id : (!empty($_REQUEST['pid']) ? $_REQUEST['pid'] : $content['parent'])); |
|
1370 | + if($documentId > 0) { |
|
1371 | + // Load up, the permissions from the parent (if new document) or existing document |
|
1372 | + $rs = $modx->db->select('id, document_group', $tbl_document_groups, "document='{$documentId}'"); |
|
1373 | + while($currentgroup = $modx->db->getRow($rs)) $groupsarray[] = $currentgroup['document_group'] . ',' . $currentgroup['id']; |
|
1374 | + |
|
1375 | + // Load up the current permissions and names |
|
1376 | + $vs = array( |
|
1377 | + $tbl_document_group_names, |
|
1378 | + $tbl_document_groups, |
|
1379 | + $documentId |
|
1380 | + ); |
|
1381 | + $from = vsprintf("%s AS dgn LEFT JOIN %s AS groups ON groups.document_group=dgn.id AND groups.document='%s'", $vs); |
|
1382 | + $rs = $modx->db->select('dgn.*, groups.id AS link_id', $from, '', 'name'); |
|
1383 | + } else { |
|
1384 | + // Just load up the names, we're starting clean |
|
1385 | + $rs = $modx->db->select('*, NULL AS link_id', $tbl_document_group_names, '', 'name'); |
|
1386 | + } |
|
1387 | + |
|
1388 | + // retain selected doc groups between post |
|
1389 | + if(isset($_POST['docgroups'])) { |
|
1390 | + $groupsarray = array_merge($groupsarray, $_POST['docgroups']); |
|
1391 | + } |
|
1392 | + |
|
1393 | + $isManager = $modx->hasPermission('access_permissions'); |
|
1394 | + $isWeb = $modx->hasPermission('web_access_permissions'); |
|
1395 | + |
|
1396 | + // Setup Basic attributes for each Input box |
|
1397 | + $inputAttributes = array( |
|
1398 | + 'type' => 'checkbox', |
|
1399 | + 'class' => 'checkbox', |
|
1400 | + 'name' => 'docgroups[]', |
|
1401 | + 'onclick' => 'makePublic(false);', |
|
1402 | + ); |
|
1403 | + $permissions = array(); // New Permissions array list (this contains the HTML) |
|
1404 | + $permissions_yes = 0; // count permissions the current mgr user has |
|
1405 | + $permissions_no = 0; // count permissions the current mgr user doesn't have |
|
1406 | + |
|
1407 | + // Loop through the permissions list |
|
1408 | + while($row = $modx->db->getRow($rs)) { |
|
1409 | + |
|
1410 | + // Create an inputValue pair (group ID and group link (if it exists)) |
|
1411 | + $inputValue = $row['id'] . ',' . ($row['link_id'] ? $row['link_id'] : 'new'); |
|
1412 | + $inputId = 'group-' . $row['id']; |
|
1413 | + |
|
1414 | + $checked = in_array($inputValue, $groupsarray); |
|
1415 | + if($checked) { |
|
1416 | + $notPublic = true; |
|
1417 | + } // Mark as private access (either web or manager) |
|
1418 | + |
|
1419 | + // Skip the access permission if the user doesn't have access... |
|
1420 | + if((!$isManager && $row['private_memgroup'] == '1') || (!$isWeb && $row['private_webgroup'] == '1')) { |
|
1421 | + continue; |
|
1422 | + } |
|
1392 | 1423 | |
1393 | - $isManager = $modx->hasPermission('access_permissions'); |
|
1394 | - $isWeb = $modx->hasPermission('web_access_permissions'); |
|
1395 | - |
|
1396 | - // Setup Basic attributes for each Input box |
|
1397 | - $inputAttributes = array( |
|
1398 | - 'type' => 'checkbox', |
|
1399 | - 'class' => 'checkbox', |
|
1400 | - 'name' => 'docgroups[]', |
|
1401 | - 'onclick' => 'makePublic(false);', |
|
1402 | - ); |
|
1403 | - $permissions = array(); // New Permissions array list (this contains the HTML) |
|
1404 | - $permissions_yes = 0; // count permissions the current mgr user has |
|
1405 | - $permissions_no = 0; // count permissions the current mgr user doesn't have |
|
1406 | - |
|
1407 | - // Loop through the permissions list |
|
1408 | - while($row = $modx->db->getRow($rs)) { |
|
1409 | - |
|
1410 | - // Create an inputValue pair (group ID and group link (if it exists)) |
|
1411 | - $inputValue = $row['id'] . ',' . ($row['link_id'] ? $row['link_id'] : 'new'); |
|
1412 | - $inputId = 'group-' . $row['id']; |
|
1413 | - |
|
1414 | - $checked = in_array($inputValue, $groupsarray); |
|
1415 | - if($checked) { |
|
1416 | - $notPublic = true; |
|
1417 | - } // Mark as private access (either web or manager) |
|
1418 | - |
|
1419 | - // Skip the access permission if the user doesn't have access... |
|
1420 | - if((!$isManager && $row['private_memgroup'] == '1') || (!$isWeb && $row['private_webgroup'] == '1')) { |
|
1421 | - continue; |
|
1422 | - } |
|
1423 | - |
|
1424 | - // Setup attributes for this Input box |
|
1425 | - $inputAttributes['id'] = $inputId; |
|
1426 | - $inputAttributes['value'] = $inputValue; |
|
1427 | - if($checked) { |
|
1428 | - $inputAttributes['checked'] = 'checked'; |
|
1429 | - } else { |
|
1430 | - unset($inputAttributes['checked']); |
|
1431 | - } |
|
1432 | - |
|
1433 | - // Create attribute string list |
|
1434 | - $inputString = array(); |
|
1435 | - foreach($inputAttributes as $k => $v) $inputString[] = $k . '="' . $v . '"'; |
|
1436 | - |
|
1437 | - // Make the <input> HTML |
|
1438 | - $inputHTML = '<input ' . implode(' ', $inputString) . ' />'; |
|
1439 | - |
|
1440 | - // does user have this permission? |
|
1441 | - $from = "{$tbl_membergroup_access} AS mga, {$tbl_member_groups} AS mg"; |
|
1442 | - $vs = array( |
|
1443 | - $row['id'], |
|
1444 | - $_SESSION['mgrInternalKey'] |
|
1445 | - ); |
|
1446 | - $where = vsprintf("mga.membergroup=mg.user_group AND mga.documentgroup=%s AND mg.member=%s", $vs); |
|
1447 | - $rsp = $modx->db->select('COUNT(mg.id)', $from, $where); |
|
1448 | - $count = $modx->db->getValue($rsp); |
|
1449 | - if($count > 0) { |
|
1450 | - ++$permissions_yes; |
|
1451 | - } else { |
|
1452 | - ++$permissions_no; |
|
1453 | - } |
|
1454 | - $permissions[] = "\t\t" . '<li>' . $inputHTML . '<label for="' . $inputId . '">' . $row['name'] . '</label></li>'; |
|
1455 | - } |
|
1456 | - // if mgr user doesn't have access to any of the displayable permissions, forget about them and make doc public |
|
1457 | - if($_SESSION['mgrRole'] != 1 && ($permissions_yes == 0 && $permissions_no > 0)) { |
|
1458 | - $permissions = array(); |
|
1459 | - } |
|
1424 | + // Setup attributes for this Input box |
|
1425 | + $inputAttributes['id'] = $inputId; |
|
1426 | + $inputAttributes['value'] = $inputValue; |
|
1427 | + if($checked) { |
|
1428 | + $inputAttributes['checked'] = 'checked'; |
|
1429 | + } else { |
|
1430 | + unset($inputAttributes['checked']); |
|
1431 | + } |
|
1460 | 1432 | |
1461 | - // See if the Access Permissions section is worth displaying... |
|
1462 | - if(!empty($permissions)) { |
|
1463 | - // Add the "All Document Groups" item if we have rights in both contexts |
|
1464 | - if($isManager && $isWeb) { |
|
1465 | - array_unshift($permissions, "\t\t" . '<li><input type="checkbox" class="checkbox" name="chkalldocs" id="groupall"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true);" /><label for="groupall" class="warning">' . $_lang['all_doc_groups'] . '</label></li>'); |
|
1466 | - } |
|
1467 | - // Output the permissions list... |
|
1468 | - ?> |
|
1433 | + // Create attribute string list |
|
1434 | + $inputString = array(); |
|
1435 | + foreach($inputAttributes as $k => $v) $inputString[] = $k . '="' . $v . '"'; |
|
1436 | + |
|
1437 | + // Make the <input> HTML |
|
1438 | + $inputHTML = '<input ' . implode(' ', $inputString) . ' />'; |
|
1439 | + |
|
1440 | + // does user have this permission? |
|
1441 | + $from = "{$tbl_membergroup_access} AS mga, {$tbl_member_groups} AS mg"; |
|
1442 | + $vs = array( |
|
1443 | + $row['id'], |
|
1444 | + $_SESSION['mgrInternalKey'] |
|
1445 | + ); |
|
1446 | + $where = vsprintf("mga.membergroup=mg.user_group AND mga.documentgroup=%s AND mg.member=%s", $vs); |
|
1447 | + $rsp = $modx->db->select('COUNT(mg.id)', $from, $where); |
|
1448 | + $count = $modx->db->getValue($rsp); |
|
1449 | + if($count > 0) { |
|
1450 | + ++$permissions_yes; |
|
1451 | + } else { |
|
1452 | + ++$permissions_no; |
|
1453 | + } |
|
1454 | + $permissions[] = "\t\t" . '<li>' . $inputHTML . '<label for="' . $inputId . '">' . $row['name'] . '</label></li>'; |
|
1455 | + } |
|
1456 | + // if mgr user doesn't have access to any of the displayable permissions, forget about them and make doc public |
|
1457 | + if($_SESSION['mgrRole'] != 1 && ($permissions_yes == 0 && $permissions_no > 0)) { |
|
1458 | + $permissions = array(); |
|
1459 | + } |
|
1460 | + |
|
1461 | + // See if the Access Permissions section is worth displaying... |
|
1462 | + if(!empty($permissions)) { |
|
1463 | + // Add the "All Document Groups" item if we have rights in both contexts |
|
1464 | + if($isManager && $isWeb) { |
|
1465 | + array_unshift($permissions, "\t\t" . '<li><input type="checkbox" class="checkbox" name="chkalldocs" id="groupall"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true);" /><label for="groupall" class="warning">' . $_lang['all_doc_groups'] . '</label></li>'); |
|
1466 | + } |
|
1467 | + // Output the permissions list... |
|
1468 | + ?> |
|
1469 | 1469 | <!-- Access Permissions --> |
1470 | 1470 | <div class="tab-page" id="tabAccess"> |
1471 | 1471 | <h2 class="tab" id="tab_access_header"><?= $_lang['access_permissions'] ?></h2> |
@@ -1499,31 +1499,31 @@ discard block |
||
1499 | 1499 | </ul> |
1500 | 1500 | </div><!--div class="tab-page" id="tabAccess"--> |
1501 | 1501 | <?php |
1502 | - } // !empty($permissions) |
|
1503 | - elseif($_SESSION['mgrRole'] != 1 && ($permissions_yes == 0 && $permissions_no > 0) && ($_SESSION['mgrPermissions']['access_permissions'] == 1 || $_SESSION['mgrPermissions']['web_access_permissions'] == 1)) { |
|
1504 | - ?> |
|
1502 | + } // !empty($permissions) |
|
1503 | + elseif($_SESSION['mgrRole'] != 1 && ($permissions_yes == 0 && $permissions_no > 0) && ($_SESSION['mgrPermissions']['access_permissions'] == 1 || $_SESSION['mgrPermissions']['web_access_permissions'] == 1)) { |
|
1504 | + ?> |
|
1505 | 1505 | <p><?= $_lang["access_permissions_docs_collision"] ?></p> |
1506 | 1506 | <?php |
1507 | 1507 | |
1508 | - } |
|
1509 | - } |
|
1510 | - /* End Document Access Permissions * |
|
1508 | + } |
|
1509 | + } |
|
1510 | + /* End Document Access Permissions * |
|
1511 | 1511 | ***********************************/ |
1512 | - ?> |
|
1512 | + ?> |
|
1513 | 1513 | |
1514 | 1514 | <input type="submit" name="save" style="display:none" /> |
1515 | 1515 | <?php |
1516 | 1516 | |
1517 | - // invoke OnDocFormRender event |
|
1518 | - $evtOut = $modx->invokeEvent('OnDocFormRender', array( |
|
1519 | - 'id' => $id, |
|
1520 | - 'template' => $content['template'] |
|
1521 | - )); |
|
1517 | + // invoke OnDocFormRender event |
|
1518 | + $evtOut = $modx->invokeEvent('OnDocFormRender', array( |
|
1519 | + 'id' => $id, |
|
1520 | + 'template' => $content['template'] |
|
1521 | + )); |
|
1522 | 1522 | |
1523 | - if(is_array($evtOut)) { |
|
1524 | - echo implode('', $evtOut); |
|
1525 | - } |
|
1526 | - ?> |
|
1523 | + if(is_array($evtOut)) { |
|
1524 | + echo implode('', $evtOut); |
|
1525 | + } |
|
1526 | + ?> |
|
1527 | 1527 | </div><!--div class="tab-pane" id="documentPane"--> |
1528 | 1528 | </div><!--div class="sectionBody"--> |
1529 | 1529 | </fieldset> |
@@ -1534,17 +1534,17 @@ discard block |
||
1534 | 1534 | </script> |
1535 | 1535 | <?php |
1536 | 1536 | if(($content['richtext'] == 1 || $modx->manager->action == '4' || $modx->manager->action == '72') && $use_editor == 1) { |
1537 | - if(is_array($richtexteditorIds)) { |
|
1538 | - foreach($richtexteditorIds as $editor => $elements) { |
|
1539 | - // invoke OnRichTextEditorInit event |
|
1540 | - $evtOut = $modx->invokeEvent('OnRichTextEditorInit', array( |
|
1541 | - 'editor' => $editor, |
|
1542 | - 'elements' => $elements, |
|
1543 | - 'options' => $richtexteditorOptions[$editor] |
|
1544 | - )); |
|
1545 | - if(is_array($evtOut)) { |
|
1546 | - echo implode('', $evtOut); |
|
1547 | - } |
|
1548 | - } |
|
1549 | - } |
|
1537 | + if(is_array($richtexteditorIds)) { |
|
1538 | + foreach($richtexteditorIds as $editor => $elements) { |
|
1539 | + // invoke OnRichTextEditorInit event |
|
1540 | + $evtOut = $modx->invokeEvent('OnRichTextEditorInit', array( |
|
1541 | + 'editor' => $editor, |
|
1542 | + 'elements' => $elements, |
|
1543 | + 'options' => $richtexteditorOptions[$editor] |
|
1544 | + )); |
|
1545 | + if(is_array($evtOut)) { |
|
1546 | + echo implode('', $evtOut); |
|
1547 | + } |
|
1548 | + } |
|
1549 | + } |
|
1550 | 1550 | } |
@@ -1,20 +1,20 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
4 | 4 | } |
5 | 5 | switch($modx->manager->action) { |
6 | - case 107: |
|
7 | - if(!$modx->hasPermission('new_module')) { |
|
8 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
9 | - } |
|
10 | - break; |
|
11 | - case 108: |
|
12 | - if(!$modx->hasPermission('edit_module')) { |
|
13 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
14 | - } |
|
15 | - break; |
|
16 | - default: |
|
17 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
6 | + case 107: |
|
7 | + if(!$modx->hasPermission('new_module')) { |
|
8 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
9 | + } |
|
10 | + break; |
|
11 | + case 108: |
|
12 | + if(!$modx->hasPermission('edit_module')) { |
|
13 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
14 | + } |
|
15 | + break; |
|
16 | + default: |
|
17 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
18 | 18 | } |
19 | 19 | $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
20 | 20 | // Get table names (alphabetical) |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | // check to see the module editor isn't locked |
34 | 34 | if($lockedEl = $modx->elementIsLocked(6, $id)) { |
35 | - $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
|
35 | + $modx->webAlertAndQuit(sprintf($_lang['lock_msg'], $lockedEl['username'], $_lang['module'])); |
|
36 | 36 | } |
37 | 37 | // end check for lock |
38 | 38 | |
@@ -40,22 +40,22 @@ discard block |
||
40 | 40 | $modx->lockElement(6, $id); |
41 | 41 | |
42 | 42 | if(isset($_GET['id'])) { |
43 | - $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'"); |
|
44 | - $content = $modx->db->getRow($rs); |
|
45 | - if(!$content) { |
|
46 | - $modx->webAlertAndQuit("Module not found for id '{$id}'."); |
|
47 | - } |
|
48 | - $content['properties'] = str_replace("&", "&", $content['properties']); |
|
49 | - $_SESSION['itemname'] = $content['name']; |
|
50 | - if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
51 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
52 | - } |
|
43 | + $rs = $modx->db->select('*', $tbl_site_modules, "id='{$id}'"); |
|
44 | + $content = $modx->db->getRow($rs); |
|
45 | + if(!$content) { |
|
46 | + $modx->webAlertAndQuit("Module not found for id '{$id}'."); |
|
47 | + } |
|
48 | + $content['properties'] = str_replace("&", "&", $content['properties']); |
|
49 | + $_SESSION['itemname'] = $content['name']; |
|
50 | + if($content['locked'] == 1 && $_SESSION['mgrRole'] != 1) { |
|
51 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
52 | + } |
|
53 | 53 | } else { |
54 | - $_SESSION['itemname'] = $_lang["new_module"]; |
|
55 | - $content['wrap'] = '1'; |
|
54 | + $_SESSION['itemname'] = $_lang["new_module"]; |
|
55 | + $content['wrap'] = '1'; |
|
56 | 56 | } |
57 | 57 | if($modx->manager->hasFormValues()) { |
58 | - $modx->manager->loadFormValues(); |
|
58 | + $modx->manager->loadFormValues(); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | // Add lock-element JS-Script |
@@ -426,18 +426,18 @@ discard block |
||
426 | 426 | |
427 | 427 | <form name="mutate" id="mutate" class="module" method="post" action="index.php?a=109"> |
428 | 428 | <?php |
429 | - // invoke OnModFormPrerender event |
|
430 | - $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id)); |
|
431 | - if(is_array($evtOut)) { |
|
432 | - echo implode('', $evtOut); |
|
433 | - } |
|
434 | - |
|
435 | - // Prepare internal params & info-tab via parseDocBlock |
|
436 | - $modulecode = isset($content['modulecode']) ? $modx->db->escape($content['modulecode']) : ''; |
|
437 | - $docBlock = $modx->parseDocBlockFromString($modulecode); |
|
438 | - $docBlockList = $modx->convertDocBlockIntoList($docBlock); |
|
439 | - $internal = array(); |
|
440 | - ?> |
|
429 | + // invoke OnModFormPrerender event |
|
430 | + $evtOut = $modx->invokeEvent('OnModFormPrerender', array('id' => $id)); |
|
431 | + if(is_array($evtOut)) { |
|
432 | + echo implode('', $evtOut); |
|
433 | + } |
|
434 | + |
|
435 | + // Prepare internal params & info-tab via parseDocBlock |
|
436 | + $modulecode = isset($content['modulecode']) ? $modx->db->escape($content['modulecode']) : ''; |
|
437 | + $docBlock = $modx->parseDocBlockFromString($modulecode); |
|
438 | + $docBlockList = $modx->convertDocBlockIntoList($docBlock); |
|
439 | + $internal = array(); |
|
440 | + ?> |
|
441 | 441 | <input type="hidden" name="id" value="<?= $content['id'] ?>"> |
442 | 442 | <input type="hidden" name="mode" value="<?= $modx->manager->action ?>"> |
443 | 443 | |
@@ -490,11 +490,11 @@ discard block |
||
490 | 490 | <select name="categoryid" class="form-control" onchange="documentDirty=true;"> |
491 | 491 | <option> </option> |
492 | 492 | <?php |
493 | - include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
494 | - foreach(getCategories() as $n => $v) { |
|
495 | - echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
496 | - } |
|
497 | - ?> |
|
493 | + include_once(MODX_MANAGER_PATH . 'includes/categories.inc.php'); |
|
494 | + foreach(getCategories() as $n => $v) { |
|
495 | + echo "\t\t\t" . '<option value="' . $v['id'] . '"' . ($content['category'] == $v['id'] ? ' selected="selected"' : '') . '>' . $modx->htmlspecialchars($v['category']) . "</option>\n"; |
|
496 | + } |
|
497 | + ?> |
|
498 | 498 | </select> |
499 | 499 | </div> |
500 | 500 | </div> |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | <i class="<?= $_style["actions_save"] ?>"></i> <?= $_lang['manage_depends'] ?></a> |
602 | 602 | </div> |
603 | 603 | <?php |
604 | - $ds = $modx->db->select("smd.id, COALESCE(ss.name,st.templatename,sv.name,sc.name,sp.name,sd.pagetitle) AS name, |
|
604 | + $ds = $modx->db->select("smd.id, COALESCE(ss.name,st.templatename,sv.name,sc.name,sp.name,sd.pagetitle) AS name, |
|
605 | 605 | CASE smd.type |
606 | 606 | WHEN 10 THEN 'Chunk' |
607 | 607 | WHEN 20 THEN 'Document' |
@@ -617,17 +617,17 @@ discard block |
||
617 | 617 | LEFT JOIN {$tbl_site_templates} AS st ON st.id = smd.resource AND smd.type = 50 |
618 | 618 | LEFT JOIN {$tbl_site_tmplvars} AS sv ON sv.id = smd.resource AND smd.type = 60", "smd.module='{$id}'", 'smd.type,name'); |
619 | 619 | |
620 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
621 | - $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items |
|
622 | - $grd->noRecordMsg = $_lang['no_records_found']; |
|
623 | - $grd->cssClass = 'grid'; |
|
624 | - $grd->columnHeaderClass = 'gridHeader'; |
|
625 | - $grd->itemClass = 'gridItem'; |
|
626 | - $grd->altItemClass = 'gridAltItem'; |
|
627 | - $grd->columns = $_lang['element_name'] . " ," . $_lang['type']; |
|
628 | - $grd->fields = "name,type"; |
|
629 | - echo $grd->render(); |
|
630 | - ?> |
|
620 | + include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
621 | + $grd = new DataGrid('', $ds, 0); // set page size to 0 t show all items |
|
622 | + $grd->noRecordMsg = $_lang['no_records_found']; |
|
623 | + $grd->cssClass = 'grid'; |
|
624 | + $grd->columnHeaderClass = 'gridHeader'; |
|
625 | + $grd->itemClass = 'gridItem'; |
|
626 | + $grd->altItemClass = 'gridAltItem'; |
|
627 | + $grd->columns = $_lang['element_name'] . " ," . $_lang['type']; |
|
628 | + $grd->fields = "name,type"; |
|
629 | + echo $grd->render(); |
|
630 | + ?> |
|
631 | 631 | </div> |
632 | 632 | </div> |
633 | 633 | <?php endif; ?> |
@@ -639,12 +639,12 @@ discard block |
||
639 | 639 | <div class="container container-body"> |
640 | 640 | <?php if($use_udperms == 1) : ?> |
641 | 641 | <?php |
642 | - // fetch user access permissions for the module |
|
643 | - $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'"); |
|
644 | - $groupsarray = $modx->db->getColumn('usergroup', $rs); |
|
642 | + // fetch user access permissions for the module |
|
643 | + $rs = $modx->db->select('usergroup', $tbl_site_module_access, "module='{$id}'"); |
|
644 | + $groupsarray = $modx->db->getColumn('usergroup', $rs); |
|
645 | 645 | |
646 | - if($modx->hasPermission('access_permissions')) { |
|
647 | - ?> |
|
646 | + if($modx->hasPermission('access_permissions')) { |
|
647 | + ?> |
|
648 | 648 | <!-- User Group Access Permissions --> |
649 | 649 | <script type="text/javascript"> |
650 | 650 | function makePublic(b) { |
@@ -668,28 +668,28 @@ discard block |
||
668 | 668 | </script> |
669 | 669 | <p><?= $_lang['module_group_access_msg'] ?></p> |
670 | 670 | <?php |
671 | - } |
|
672 | - $chk = ''; |
|
673 | - $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name'); |
|
674 | - while($row = $modx->db->getRow($rs)) { |
|
675 | - $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
|
676 | - $checked = in_array($row['id'], $groupsarray); |
|
677 | - if($modx->hasPermission('access_permissions')) { |
|
678 | - if($checked) { |
|
679 | - $notPublic = true; |
|
680 | - } |
|
681 | - $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
|
682 | - } else { |
|
683 | - if($checked) { |
|
684 | - $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
|
685 | - } |
|
686 | - } |
|
687 | - } |
|
688 | - if($modx->hasPermission('access_permissions')) { |
|
689 | - $chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks; |
|
690 | - } |
|
691 | - echo $chks; |
|
692 | - ?> |
|
671 | + } |
|
672 | + $chk = ''; |
|
673 | + $rs = $modx->db->select('name, id', $tbl_membergroup_names, '', 'name'); |
|
674 | + while($row = $modx->db->getRow($rs)) { |
|
675 | + $groupsarray = is_numeric($id) && $id > 0 ? $groupsarray : array(); |
|
676 | + $checked = in_array($row['id'], $groupsarray); |
|
677 | + if($modx->hasPermission('access_permissions')) { |
|
678 | + if($checked) { |
|
679 | + $notPublic = true; |
|
680 | + } |
|
681 | + $chks .= '<label><input type="checkbox" name="usrgroups[]" value="' . $row['id'] . '"' . ($checked ? ' checked="checked"' : '') . ' onclick="makePublic(false)" /> ' . $row['name'] . "</label><br />\n"; |
|
682 | + } else { |
|
683 | + if($checked) { |
|
684 | + $chks = '<input type="hidden" name="usrgroups[]" value="' . $row['id'] . '" />' . "\n" . $chks; |
|
685 | + } |
|
686 | + } |
|
687 | + } |
|
688 | + if($modx->hasPermission('access_permissions')) { |
|
689 | + $chks = '<label><input type="checkbox" name="chkallgroups"' . (!$notPublic ? ' checked="checked"' : '') . ' onclick="makePublic(true)" /><span class="warning"> ' . $_lang['all_usr_groups'] . '</span></label><br />' . "\n" . $chks; |
|
690 | + } |
|
691 | + echo $chks; |
|
692 | + ?> |
|
693 | 693 | <?php endif; ?> |
694 | 694 | </div> |
695 | 695 | </div> |
@@ -705,11 +705,11 @@ discard block |
||
705 | 705 | |
706 | 706 | <input type="submit" name="save" style="display:none;"> |
707 | 707 | <?php |
708 | - // invoke OnModFormRender event |
|
709 | - $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id)); |
|
710 | - if(is_array($evtOut)) { |
|
711 | - echo implode('', $evtOut); |
|
712 | - } |
|
713 | - ?> |
|
708 | + // invoke OnModFormRender event |
|
709 | + $evtOut = $modx->invokeEvent('OnModFormRender', array('id' => $id)); |
|
710 | + if(is_array($evtOut)) { |
|
711 | + echo implode('', $evtOut); |
|
712 | + } |
|
713 | + ?> |
|
714 | 714 | </form> |
715 | 715 | <script type="text/javascript">setTimeout('showParameters();', 10);</script> |
@@ -4,18 +4,18 @@ |
||
4 | 4 | } |
5 | 5 | $logo= '<img src="media/style/default/images/misc/login-logo.png" height="54" width="358" border="0">'; |
6 | 6 | $downloadLinks = array( |
7 | - 0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'), |
|
8 | - 1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | - 2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | - 3=>array('title'=>$_lang["extras"],'link'=>array( |
|
11 | - 'http://extras.evolution-cms.com/', |
|
12 | - 'https://github.com/extras-evolution' |
|
13 | - )), |
|
7 | + 0=>array('title'=>$_lang["information"],'link'=>'https://evo.im/'), |
|
8 | + 1=>array('title'=>$_lang["download"],'link'=>'https://github.com/evolution-cms/evolution/releases'), |
|
9 | + 2=>array('title'=>$_lang["previous_releases"],'link'=>'https://modx.com/download/evolution/previous-releases.html'), |
|
10 | + 3=>array('title'=>$_lang["extras"],'link'=>array( |
|
11 | + 'http://extras.evolution-cms.com/', |
|
12 | + 'https://github.com/extras-evolution' |
|
13 | + )), |
|
14 | 14 | ); |
15 | 15 | |
16 | 16 | $translationLinks = array( |
17 | - 0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | - 1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
17 | + 0=>array('title'=>'Evolution CMS','link'=>'https://www.transifex.com/evolutioncms/evolution/'), |
|
18 | + 1=>array('title'=>$_lang["extras"],'link'=>'https://www.transifex.com/evolutioncms/extras/'), |
|
19 | 19 | ); |
20 | 20 | |
21 | 21 |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
4 | 4 | } |
5 | 5 | if(!$modx->hasPermission('settings')) { |
6 | - $modx->webAlertAndQuit($_lang['error_no_privileges']); |
|
6 | + $modx->webAlertAndQuit($_lang['error_no_privileges']); |
|
7 | 7 | } |
8 | 8 | |
9 | 9 | // check to see the edit settings page isn't locked |
10 | 10 | $rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=17 AND internalKey!='" . $modx->getLoginUserID() . "'"); |
11 | 11 | if($username = $modx->db->getValue($rs)) { |
12 | - $modx->webAlertAndQuit(sprintf($_lang['lock_settings_msg'], $username)); |
|
12 | + $modx->webAlertAndQuit(sprintf($_lang['lock_settings_msg'], $username)); |
|
13 | 13 | } |
14 | 14 | // end check for lock |
15 | 15 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | include_once(MODX_MANAGER_PATH . 'includes/default_config.php'); |
20 | 20 | $rs = $modx->db->select('setting_name, setting_value', '[+prefix+]system_settings'); |
21 | 21 | while($row = $modx->db->getRow($rs)) { |
22 | - $settings[$row['setting_name']] = $row['setting_value']; |
|
22 | + $settings[$row['setting_name']] = $row['setting_value']; |
|
23 | 23 | } |
24 | 24 | $settings['filemanager_path'] = preg_replace('@^' . preg_quote(MODX_BASE_PATH) . '@', '[(base_path)]', $settings['filemanager_path']); |
25 | 25 | $settings['rb_base_dir'] = preg_replace('@^' . preg_quote(MODX_BASE_PATH) . '@', '[(base_path)]', $settings['rb_base_dir']); |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | $lang_keys = array(); |
31 | 31 | $dir = dir('includes/lang'); |
32 | 32 | while($file = $dir->read()) { |
33 | - if(strpos($file, '.inc.php') > 0) { |
|
34 | - $endpos = strpos($file, '.'); |
|
35 | - $languagename = substr($file, 0, $endpos); |
|
36 | - $lang_keys[$languagename] = get_lang_keys($file); |
|
37 | - } |
|
33 | + if(strpos($file, '.inc.php') > 0) { |
|
34 | + $endpos = strpos($file, '.'); |
|
35 | + $languagename = substr($file, 0, $endpos); |
|
36 | + $lang_keys[$languagename] = get_lang_keys($file); |
|
37 | + } |
|
38 | 38 | } |
39 | 39 | $dir->close(); |
40 | 40 | $displayStyle = ($_SESSION['browser'] === 'modern') ? 'table-row' : 'block'; |
@@ -76,14 +76,14 @@ discard block |
||
76 | 76 | </script> |
77 | 77 | |
78 | 78 | <?php |
79 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab1_site_settings.inc.php'); |
|
80 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab2_furl_settings.inc.php'); |
|
81 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab3_user_settings.inc.php'); |
|
82 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab4_manager_settings.inc.php'); |
|
83 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab5_security_settings.inc.php'); |
|
84 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab6_filemanager_settings.inc.php'); |
|
85 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab7_filebrowser_settings.inc.php'); |
|
86 | - ?> |
|
79 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab1_site_settings.inc.php'); |
|
80 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab2_furl_settings.inc.php'); |
|
81 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab3_user_settings.inc.php'); |
|
82 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab4_manager_settings.inc.php'); |
|
83 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab5_security_settings.inc.php'); |
|
84 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab6_filemanager_settings.inc.php'); |
|
85 | + include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab7_filebrowser_settings.inc.php'); |
|
86 | + ?> |
|
87 | 87 | </div> |
88 | 88 | </div> |
89 | 89 | </form> |
@@ -130,5 +130,5 @@ discard block |
||
130 | 130 | </script> |
131 | 131 | <?php |
132 | 132 | if(is_numeric($_GET['tab'])) { |
133 | - echo '<script type="text/javascript">tpSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
133 | + echo '<script type="text/javascript">tpSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
134 | 134 | } |
@@ -114,9 +114,9 @@ |
||
114 | 114 | $field['menuindex'] = 1; |
115 | 115 | $find = false; |
116 | 116 | foreach (array( |
117 | - 'index.html', |
|
118 | - 'index.htm' |
|
119 | - ) as $filename) { |
|
117 | + 'index.html', |
|
118 | + 'index.htm' |
|
119 | + ) as $filename) { |
|
120 | 120 | $filepath = $filedir . $alias . '/' . $filename; |
121 | 121 | if ($find === false && file_exists($filepath)) { |
122 | 122 | $file = getFileContent($filepath); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | $autoloader = realpath(__DIR__.'/../vendor/autoload.php'); |
52 | 52 | if (file_exists($autoloader) && is_readable($autoloader)) { |
53 | - include_once($autoloader); |
|
53 | + include_once($autoloader); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | // get start time |
@@ -65,22 +65,22 @@ discard block |
||
65 | 65 | $site_hostnames_path = $base_path . 'assets/cache/siteHostnames.php'; |
66 | 66 | if(is_file($site_hostnames_path)) include_once($site_hostnames_path); |
67 | 67 | if(!defined('MGR_DIR') || MGR_DIR!==$mgr_dir) { |
68 | - $src = "<?php\n"; |
|
69 | - $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
|
70 | - $rs = file_put_contents($site_mgr_path,$src); |
|
71 | - if(!$rs) { |
|
72 | - echo 'siteManager.php write error'; |
|
73 | - exit; |
|
74 | - } |
|
75 | - sleep(1); |
|
76 | - header('Location:' . $_SERVER['REQUEST_URI']); |
|
77 | - exit; |
|
68 | + $src = "<?php\n"; |
|
69 | + $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
|
70 | + $rs = file_put_contents($site_mgr_path,$src); |
|
71 | + if(!$rs) { |
|
72 | + echo 'siteManager.php write error'; |
|
73 | + exit; |
|
74 | + } |
|
75 | + sleep(1); |
|
76 | + header('Location:' . $_SERVER['REQUEST_URI']); |
|
77 | + exit; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | // we use this to make sure files are accessed through |
81 | 81 | // the manager instead of seperately. |
82 | 82 | if ( ! defined('IN_MANAGER_MODE')) { |
83 | - define('IN_MANAGER_MODE', true); |
|
83 | + define('IN_MANAGER_MODE', true); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | // harden it |
@@ -101,16 +101,16 @@ discard block |
||
101 | 101 | |
102 | 102 | // check PHP version. EVO is compatible with php 5 (5.0.0+) |
103 | 103 | $php_ver_comp = version_compare(phpversion(), "5.0.0"); |
104 | - // -1 if left is less, 0 if equal, +1 if left is higher |
|
104 | + // -1 if left is less, 0 if equal, +1 if left is higher |
|
105 | 105 | if($php_ver_comp < 0) { |
106 | - echo sprintf($_lang['php_version_check'], phpversion()); |
|
107 | - exit; |
|
106 | + echo sprintf($_lang['php_version_check'], phpversion()); |
|
107 | + exit; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | // check if iconv is installed |
111 | 111 | if(!function_exists('iconv')) { |
112 | - echo $_lang['iconv_not_available']; |
|
113 | - exit; |
|
112 | + echo $_lang['iconv_not_available']; |
|
113 | + exit; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | // set some runtime options |
@@ -123,15 +123,15 @@ discard block |
||
123 | 123 | |
124 | 124 | // set the document_root :| |
125 | 125 | if(!isset($_SERVER['DOCUMENT_ROOT']) || empty($_SERVER['DOCUMENT_ROOT'])) { |
126 | - $_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['PATH_INFO'], "", preg_replace("/\\\\/", "/", $_SERVER['PATH_TRANSLATED']))."/"; |
|
126 | + $_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['PATH_INFO'], "", preg_replace("/\\\\/", "/", $_SERVER['PATH_TRANSLATED']))."/"; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | // include_once config file |
130 | 130 | $config_filename = "./includes/config.inc.php"; |
131 | 131 | if (!file_exists($config_filename)) { |
132 | - echo "<h3>Unable to load configuration settings</h3>"; |
|
133 | - echo "Please run the EVO <a href='../install'>install utility</a>"; |
|
134 | - exit; |
|
132 | + echo "<h3>Unable to load configuration settings</h3>"; |
|
133 | + echo "Please run the EVO <a href='../install'>install utility</a>"; |
|
134 | + exit; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | // include the database configuration file |
@@ -139,11 +139,11 @@ discard block |
||
139 | 139 | |
140 | 140 | // initiate the content manager class |
141 | 141 | if (isset($coreClass) && class_exists($coreClass)) { |
142 | - $modx = new $coreClass; |
|
142 | + $modx = new $coreClass; |
|
143 | 143 | } |
144 | 144 | if (!isset($modx) || !($modx instanceof DocumentParser)) { |
145 | - include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
146 | - $modx = evolutionCMS(); |
|
145 | + include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
146 | + $modx = evolutionCMS(); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | $modx->loadExtension("ManagerAPI"); |
@@ -166,25 +166,25 @@ discard block |
||
166 | 166 | |
167 | 167 | // now include_once different language file as english |
168 | 168 | if(!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
169 | - $manager_language = "english"; // if not set, get the english language file. |
|
169 | + $manager_language = "english"; // if not set, get the english language file. |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | // $length_eng_lang = count($_lang); // Not used for now, required for difference-check with other languages than english (i.e. inside installer) |
173 | 173 | |
174 | 174 | if($manager_language!="english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
175 | - include_once "lang/".$manager_language.".inc.php"; |
|
175 | + include_once "lang/".$manager_language.".inc.php"; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | // allow custom language overrides not altered by future EVO-updates |
179 | 179 | if(file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) { |
180 | - include_once "lang/override/".$manager_language.".inc.php"; |
|
180 | + include_once "lang/override/".$manager_language.".inc.php"; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | $s = array('[+MGR_DIR+]'); |
184 | 184 | $r = array(MGR_DIR); |
185 | 185 | foreach($_lang as $k=>$v) |
186 | 186 | { |
187 | - if(strpos($v,'[+')!==false) $_lang[$k] = str_replace($s, $r, $v); |
|
187 | + if(strpos($v,'[+')!==false) $_lang[$k] = str_replace($s, $r, $v); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | // send the charset header |
@@ -199,19 +199,19 @@ discard block |
||
199 | 199 | |
200 | 200 | // double check the session |
201 | 201 | if(!isset($_SESSION['mgrValidated'])){ |
202 | - echo "Not Logged In!"; |
|
203 | - exit; |
|
202 | + echo "Not Logged In!"; |
|
203 | + exit; |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | // include_once the style variables file |
207 | 207 | if(isset($manager_theme) && !isset($_style)) { |
208 | - $_style = array(); |
|
209 | - include_once "media/style/".$manager_theme."/style.php"; |
|
208 | + $_style = array(); |
|
209 | + include_once "media/style/".$manager_theme."/style.php"; |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | // check if user is allowed to access manager interface |
213 | 213 | if(isset($allow_manager_access) && $allow_manager_access==0) { |
214 | - include_once "manager.lockout.inc.php"; |
|
214 | + include_once "manager.lockout.inc.php"; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | // Initialize System Alert Message Queque |
@@ -220,13 +220,13 @@ discard block |
||
220 | 220 | |
221 | 221 | // first we check to see if this is a frameset request |
222 | 222 | if(!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) { |
223 | - // this looks to be a top-level frameset request, so let's serve up a frameset |
|
224 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
|
225 | - include_once "media/style/".$manager_theme."/frames/1.php"; |
|
226 | - }else{ |
|
227 | - include_once "frames/1.php"; |
|
228 | - } |
|
229 | - exit; |
|
223 | + // this looks to be a top-level frameset request, so let's serve up a frameset |
|
224 | + if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
|
225 | + include_once "media/style/".$manager_theme."/frames/1.php"; |
|
226 | + }else{ |
|
227 | + include_once "frames/1.php"; |
|
228 | + } |
|
229 | + exit; |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | // OK, let's retrieve the action directive from the request |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | else $action = null; |
238 | 238 | |
239 | 239 | if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) { |
240 | - include_once 'messageCount.inc.php'; |
|
240 | + include_once 'messageCount.inc.php'; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | // save page to manager object |
@@ -245,19 +245,19 @@ discard block |
||
245 | 245 | |
246 | 246 | // attempt to foil some simple types of CSRF attacks |
247 | 247 | if (isset($modx->config['validate_referer']) && (int)$modx->config['validate_referer']) { |
248 | - if (isset($_SERVER['HTTP_REFERER'])) { |
|
249 | - $referer = $_SERVER['HTTP_REFERER']; |
|
250 | - |
|
251 | - if (!empty($referer)) { |
|
252 | - if (!preg_match('/^'.preg_quote(MODX_SITE_URL, '/').'/i', $referer)) { |
|
253 | - $modx->webAlertAndQuit("A possible CSRF attempt was detected from referer: {$referer}.", "index.php"); |
|
254 | - } |
|
255 | - } else { |
|
256 | - $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the client.", "index.php"); |
|
257 | - } |
|
258 | - } else { |
|
259 | - $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the server.", "index.php"); |
|
260 | - } |
|
248 | + if (isset($_SERVER['HTTP_REFERER'])) { |
|
249 | + $referer = $_SERVER['HTTP_REFERER']; |
|
250 | + |
|
251 | + if (!empty($referer)) { |
|
252 | + if (!preg_match('/^'.preg_quote(MODX_SITE_URL, '/').'/i', $referer)) { |
|
253 | + $modx->webAlertAndQuit("A possible CSRF attempt was detected from referer: {$referer}.", "index.php"); |
|
254 | + } |
|
255 | + } else { |
|
256 | + $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the client.", "index.php"); |
|
257 | + } |
|
258 | + } else { |
|
259 | + $modx->webAlertAndQuit("A possible CSRF attempt was detected. No referer was provided by the server.", "index.php"); |
|
260 | + } |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | // invoke OnManagerPageInit event |
@@ -265,13 +265,13 @@ discard block |
||
265 | 265 | |
266 | 266 | // return element filepath |
267 | 267 | function includeFileProcessor ($filepath,$manager_theme) { |
268 | - $element = ""; |
|
269 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
270 | - $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
|
271 | - }else{ |
|
272 | - $element = $filepath; |
|
273 | - } |
|
274 | - return $element; |
|
268 | + $element = ""; |
|
269 | + if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
270 | + $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
|
271 | + }else{ |
|
272 | + $element = $filepath; |
|
273 | + } |
|
274 | + return $element; |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | $managerTheme = new EvolutionCMS\ManagerTheme($modx, $manager_theme); |
@@ -281,713 +281,713 @@ discard block |
||
281 | 281 | /********************************************************************/ |
282 | 282 | /* frame management - show the requested frame */ |
283 | 283 | /********************************************************************/ |
284 | - case 1 : |
|
285 | - // get the requested frame |
|
286 | - $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
287 | - if($frame>9) { |
|
288 | - $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
289 | - } |
|
290 | - include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
291 | - break; |
|
284 | + case 1 : |
|
285 | + // get the requested frame |
|
286 | + $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
287 | + if($frame>9) { |
|
288 | + $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
289 | + } |
|
290 | + include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
291 | + break; |
|
292 | 292 | /********************************************************************/ |
293 | 293 | /* show the homepage */ |
294 | 294 | /********************************************************************/ |
295 | - case 2: |
|
296 | - // get the home page |
|
297 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
298 | - include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
299 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
300 | - break; |
|
295 | + case 2: |
|
296 | + // get the home page |
|
297 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
298 | + include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
299 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
300 | + break; |
|
301 | 301 | /********************************************************************/ |
302 | 302 | /* document data */ |
303 | 303 | /********************************************************************/ |
304 | - case 3: |
|
305 | - // get the page to show document's data |
|
306 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
307 | - include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
308 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
309 | - break; |
|
304 | + case 3: |
|
305 | + // get the page to show document's data |
|
306 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
307 | + include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
308 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
309 | + break; |
|
310 | 310 | /********************************************************************/ |
311 | 311 | /* content management */ |
312 | 312 | /********************************************************************/ |
313 | - case 85: |
|
314 | - // get the mutate page for adding a folder |
|
315 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
316 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
317 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
318 | - break; |
|
319 | - case 27: |
|
320 | - // get the mutate page for changing content |
|
321 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
322 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
323 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
324 | - break; |
|
325 | - case 4: |
|
326 | - // get the mutate page for adding content |
|
327 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
328 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
329 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
330 | - break; |
|
331 | - case 5: |
|
332 | - // get the save processor |
|
333 | - include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
334 | - break; |
|
335 | - case 6: |
|
336 | - // get the delete processor |
|
337 | - include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
338 | - break; |
|
339 | - case 63: |
|
340 | - // get the undelete processor |
|
341 | - include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
342 | - break; |
|
343 | - case 51: |
|
344 | - // get the move action |
|
345 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
346 | - include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
347 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
348 | - break; |
|
349 | - case 52: |
|
350 | - // get the move document processor |
|
351 | - include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
352 | - break; |
|
353 | - case 61: |
|
354 | - // get the processor for publishing content |
|
355 | - include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
356 | - break; |
|
357 | - case 62: |
|
358 | - // get the processor for publishing content |
|
359 | - include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
360 | - break; |
|
361 | - case 56: |
|
362 | - // get the sort menuindex action |
|
363 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
364 | - include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
365 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
366 | - break; |
|
313 | + case 85: |
|
314 | + // get the mutate page for adding a folder |
|
315 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
316 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
317 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
318 | + break; |
|
319 | + case 27: |
|
320 | + // get the mutate page for changing content |
|
321 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
322 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
323 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
324 | + break; |
|
325 | + case 4: |
|
326 | + // get the mutate page for adding content |
|
327 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
328 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
329 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
330 | + break; |
|
331 | + case 5: |
|
332 | + // get the save processor |
|
333 | + include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
334 | + break; |
|
335 | + case 6: |
|
336 | + // get the delete processor |
|
337 | + include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
338 | + break; |
|
339 | + case 63: |
|
340 | + // get the undelete processor |
|
341 | + include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
342 | + break; |
|
343 | + case 51: |
|
344 | + // get the move action |
|
345 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
346 | + include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
347 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
348 | + break; |
|
349 | + case 52: |
|
350 | + // get the move document processor |
|
351 | + include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
352 | + break; |
|
353 | + case 61: |
|
354 | + // get the processor for publishing content |
|
355 | + include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
356 | + break; |
|
357 | + case 62: |
|
358 | + // get the processor for publishing content |
|
359 | + include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
360 | + break; |
|
361 | + case 56: |
|
362 | + // get the sort menuindex action |
|
363 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
364 | + include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
365 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
366 | + break; |
|
367 | 367 | /********************************************************************/ |
368 | 368 | /* show the wait page - gives the tree time to refresh (hopefully) */ |
369 | 369 | /********************************************************************/ |
370 | - case 7: |
|
371 | - // get the wait page (so the tree can reload) |
|
372 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
373 | - include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
374 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
375 | - break; |
|
370 | + case 7: |
|
371 | + // get the wait page (so the tree can reload) |
|
372 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
373 | + include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
374 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
375 | + break; |
|
376 | 376 | /********************************************************************/ |
377 | 377 | /* let the user log out */ |
378 | 378 | /********************************************************************/ |
379 | - case 8: |
|
380 | - // get the logout processor |
|
381 | - include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
382 | - break; |
|
379 | + case 8: |
|
380 | + // get the logout processor |
|
381 | + include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
382 | + break; |
|
383 | 383 | /********************************************************************/ |
384 | 384 | /* user management */ |
385 | 385 | /********************************************************************/ |
386 | - case 87: |
|
387 | - // get the new web user page |
|
388 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
389 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
390 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
391 | - break; |
|
392 | - case 88: |
|
393 | - // get the edit web user page |
|
394 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
395 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
396 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
397 | - break; |
|
398 | - case 89: |
|
399 | - // get the save web user processor |
|
400 | - include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
401 | - break; |
|
402 | - case 90: |
|
403 | - // get the delete web user page |
|
404 | - include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
405 | - break; |
|
406 | - case 11: |
|
407 | - // get the new user page |
|
408 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
409 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
410 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
411 | - break; |
|
412 | - case 12: |
|
413 | - // get the edit user page |
|
414 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
415 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
416 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
417 | - break; |
|
418 | - case 32: |
|
419 | - // get the save user processor |
|
420 | - include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
421 | - break; |
|
422 | - case 28: |
|
423 | - // get the change password page |
|
424 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
425 | - include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
426 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
427 | - break; |
|
428 | - case 34: |
|
429 | - // get the save new password page |
|
430 | - include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
431 | - break; |
|
432 | - case 33: |
|
433 | - // get the delete user page |
|
434 | - include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
435 | - break; |
|
386 | + case 87: |
|
387 | + // get the new web user page |
|
388 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
389 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
390 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
391 | + break; |
|
392 | + case 88: |
|
393 | + // get the edit web user page |
|
394 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
395 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
396 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
397 | + break; |
|
398 | + case 89: |
|
399 | + // get the save web user processor |
|
400 | + include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
401 | + break; |
|
402 | + case 90: |
|
403 | + // get the delete web user page |
|
404 | + include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
405 | + break; |
|
406 | + case 11: |
|
407 | + // get the new user page |
|
408 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
409 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
410 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
411 | + break; |
|
412 | + case 12: |
|
413 | + // get the edit user page |
|
414 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
415 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
416 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
417 | + break; |
|
418 | + case 32: |
|
419 | + // get the save user processor |
|
420 | + include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
421 | + break; |
|
422 | + case 28: |
|
423 | + // get the change password page |
|
424 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
425 | + include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
426 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
427 | + break; |
|
428 | + case 34: |
|
429 | + // get the save new password page |
|
430 | + include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
431 | + break; |
|
432 | + case 33: |
|
433 | + // get the delete user page |
|
434 | + include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
435 | + break; |
|
436 | 436 | /********************************************************************/ |
437 | 437 | /* role management */ |
438 | 438 | /********************************************************************/ |
439 | - case 38: |
|
440 | - // get the new role page |
|
441 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
442 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
443 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
444 | - break; |
|
445 | - case 35: |
|
446 | - // get the edit role page |
|
447 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
448 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
449 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
450 | - break; |
|
451 | - case 36: |
|
452 | - // get the save role page |
|
453 | - include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
454 | - break; |
|
455 | - case 37: |
|
456 | - // get the delete role page |
|
457 | - include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
458 | - break; |
|
439 | + case 38: |
|
440 | + // get the new role page |
|
441 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
442 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
443 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
444 | + break; |
|
445 | + case 35: |
|
446 | + // get the edit role page |
|
447 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
448 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
449 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
450 | + break; |
|
451 | + case 36: |
|
452 | + // get the save role page |
|
453 | + include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
454 | + break; |
|
455 | + case 37: |
|
456 | + // get the delete role page |
|
457 | + include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
458 | + break; |
|
459 | 459 | /********************************************************************/ |
460 | 460 | /* category management */ |
461 | 461 | /********************************************************************/ |
462 | - case 120: |
|
463 | - // get the edit category page |
|
464 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
465 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
466 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
467 | - break; |
|
468 | - case 121: |
|
469 | - // for ajax-requests |
|
470 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
471 | - break; |
|
462 | + case 120: |
|
463 | + // get the edit category page |
|
464 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
465 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
466 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
467 | + break; |
|
468 | + case 121: |
|
469 | + // for ajax-requests |
|
470 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
471 | + break; |
|
472 | 472 | /********************************************************************/ |
473 | 473 | /* template management */ |
474 | 474 | /********************************************************************/ |
475 | - case 16: |
|
476 | - // get the edit template action |
|
477 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
478 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
479 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
480 | - break; |
|
481 | - case 19: |
|
482 | - // get the new template action |
|
483 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
484 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
485 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
486 | - break; |
|
487 | - case 20: |
|
488 | - // get the save processor |
|
489 | - include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
490 | - break; |
|
491 | - case 21: |
|
492 | - // get the delete processor |
|
493 | - include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
494 | - break; |
|
495 | - case 96: |
|
496 | - // get the duplicate template processor |
|
497 | - include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
498 | - break; |
|
499 | - case 117: |
|
500 | - // change the tv rank for selected template |
|
501 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
502 | - include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
503 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
504 | - break; |
|
475 | + case 16: |
|
476 | + // get the edit template action |
|
477 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
478 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
479 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
480 | + break; |
|
481 | + case 19: |
|
482 | + // get the new template action |
|
483 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
484 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
485 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
486 | + break; |
|
487 | + case 20: |
|
488 | + // get the save processor |
|
489 | + include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
490 | + break; |
|
491 | + case 21: |
|
492 | + // get the delete processor |
|
493 | + include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
494 | + break; |
|
495 | + case 96: |
|
496 | + // get the duplicate template processor |
|
497 | + include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
498 | + break; |
|
499 | + case 117: |
|
500 | + // change the tv rank for selected template |
|
501 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
502 | + include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
503 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
504 | + break; |
|
505 | 505 | /********************************************************************/ |
506 | 506 | /* snippet management */ |
507 | 507 | /********************************************************************/ |
508 | - case 22: |
|
509 | - // get the edit snippet action |
|
510 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
511 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
512 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
513 | - break; |
|
514 | - case 23: |
|
515 | - // get the new snippet action |
|
516 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
517 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
518 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
519 | - break; |
|
520 | - case 24: |
|
521 | - // get the save processor |
|
522 | - include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
523 | - break; |
|
524 | - case 25: |
|
525 | - // get the delete processor |
|
526 | - include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
527 | - break; |
|
528 | - case 98: |
|
529 | - // get the duplicate processor |
|
530 | - include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
531 | - break; |
|
508 | + case 22: |
|
509 | + // get the edit snippet action |
|
510 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
511 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
512 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
513 | + break; |
|
514 | + case 23: |
|
515 | + // get the new snippet action |
|
516 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
517 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
518 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
519 | + break; |
|
520 | + case 24: |
|
521 | + // get the save processor |
|
522 | + include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
523 | + break; |
|
524 | + case 25: |
|
525 | + // get the delete processor |
|
526 | + include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
527 | + break; |
|
528 | + case 98: |
|
529 | + // get the duplicate processor |
|
530 | + include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
531 | + break; |
|
532 | 532 | /********************************************************************/ |
533 | 533 | /* htmlsnippet management */ |
534 | 534 | /********************************************************************/ |
535 | - case 78: |
|
536 | - // get the edit snippet action |
|
537 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
538 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
539 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
540 | - break; |
|
541 | - case 77: |
|
542 | - // get the new snippet action |
|
543 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
544 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
545 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
546 | - break; |
|
547 | - case 79: |
|
548 | - // get the save processor |
|
549 | - include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
550 | - break; |
|
551 | - case 80: |
|
552 | - // get the delete processor |
|
553 | - include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
554 | - break; |
|
555 | - case 97: |
|
556 | - // get the duplicate processor |
|
557 | - include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
558 | - break; |
|
535 | + case 78: |
|
536 | + // get the edit snippet action |
|
537 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
538 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
539 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
540 | + break; |
|
541 | + case 77: |
|
542 | + // get the new snippet action |
|
543 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
544 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
545 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
546 | + break; |
|
547 | + case 79: |
|
548 | + // get the save processor |
|
549 | + include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
550 | + break; |
|
551 | + case 80: |
|
552 | + // get the delete processor |
|
553 | + include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
554 | + break; |
|
555 | + case 97: |
|
556 | + // get the duplicate processor |
|
557 | + include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
558 | + break; |
|
559 | 559 | /********************************************************************/ |
560 | 560 | /* show the credits page */ |
561 | 561 | /********************************************************************/ |
562 | - case 18: |
|
563 | - // get the credits page |
|
564 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
565 | - include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
566 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
567 | - break; |
|
562 | + case 18: |
|
563 | + // get the credits page |
|
564 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
565 | + include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
566 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
567 | + break; |
|
568 | 568 | /********************************************************************/ |
569 | 569 | /* empty cache & synchronisation */ |
570 | 570 | /********************************************************************/ |
571 | - case 26: |
|
572 | - // get the cache emptying processor |
|
573 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
574 | - include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
575 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
576 | - break; |
|
571 | + case 26: |
|
572 | + // get the cache emptying processor |
|
573 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
574 | + include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
575 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
576 | + break; |
|
577 | 577 | /********************************************************************/ |
578 | 578 | /* Module management */ |
579 | 579 | /********************************************************************/ |
580 | - case 106: |
|
581 | - // get module management |
|
582 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
583 | - include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
584 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
585 | - break; |
|
586 | - case 107: |
|
587 | - // get the new module action |
|
588 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
589 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
590 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
591 | - break; |
|
592 | - case 108: |
|
593 | - // get the edit module action |
|
594 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
595 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
596 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
597 | - break; |
|
598 | - case 109: |
|
599 | - // get the save processor |
|
600 | - include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
601 | - break; |
|
602 | - case 110: |
|
603 | - // get the delete processor |
|
604 | - include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
605 | - break; |
|
606 | - case 111: |
|
607 | - // get the duplicate processor |
|
608 | - include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
609 | - break; |
|
610 | - case 112: |
|
611 | - // execute/run the module |
|
612 | - //include_once "header.inc.php"; |
|
613 | - include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
614 | - //include_once "footer.inc.php"; |
|
615 | - break; |
|
616 | - case 113: |
|
617 | - // get the module resources (dependencies) action |
|
618 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
619 | - include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
620 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
621 | - break; |
|
580 | + case 106: |
|
581 | + // get module management |
|
582 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
583 | + include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
584 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
585 | + break; |
|
586 | + case 107: |
|
587 | + // get the new module action |
|
588 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
589 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
590 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
591 | + break; |
|
592 | + case 108: |
|
593 | + // get the edit module action |
|
594 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
595 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
596 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
597 | + break; |
|
598 | + case 109: |
|
599 | + // get the save processor |
|
600 | + include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
601 | + break; |
|
602 | + case 110: |
|
603 | + // get the delete processor |
|
604 | + include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
605 | + break; |
|
606 | + case 111: |
|
607 | + // get the duplicate processor |
|
608 | + include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
609 | + break; |
|
610 | + case 112: |
|
611 | + // execute/run the module |
|
612 | + //include_once "header.inc.php"; |
|
613 | + include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
614 | + //include_once "footer.inc.php"; |
|
615 | + break; |
|
616 | + case 113: |
|
617 | + // get the module resources (dependencies) action |
|
618 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
619 | + include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
620 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
621 | + break; |
|
622 | 622 | /********************************************************************/ |
623 | 623 | /* plugin management */ |
624 | 624 | /********************************************************************/ |
625 | - case 100: |
|
626 | - // change the plugin priority |
|
627 | - //include_once "header.inc.php"; - in action file |
|
628 | - include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
629 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
630 | - break; |
|
631 | - case 101: |
|
632 | - // get the new plugin action |
|
633 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
634 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
635 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
636 | - break; |
|
637 | - case 102: |
|
638 | - // get the edit plugin action |
|
639 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
640 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
641 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
642 | - break; |
|
643 | - case 103: |
|
644 | - // get the save processor |
|
645 | - include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
646 | - break; |
|
647 | - case 104: |
|
648 | - // get the delete processor |
|
649 | - include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
650 | - break; |
|
651 | - case 105: |
|
652 | - // get the duplicate processor |
|
653 | - include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
654 | - break; |
|
655 | - case 119: |
|
656 | - // get the purge processor |
|
657 | - include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
658 | - break; |
|
625 | + case 100: |
|
626 | + // change the plugin priority |
|
627 | + //include_once "header.inc.php"; - in action file |
|
628 | + include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
629 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
630 | + break; |
|
631 | + case 101: |
|
632 | + // get the new plugin action |
|
633 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
634 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
635 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
636 | + break; |
|
637 | + case 102: |
|
638 | + // get the edit plugin action |
|
639 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
640 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
641 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
642 | + break; |
|
643 | + case 103: |
|
644 | + // get the save processor |
|
645 | + include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
646 | + break; |
|
647 | + case 104: |
|
648 | + // get the delete processor |
|
649 | + include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
650 | + break; |
|
651 | + case 105: |
|
652 | + // get the duplicate processor |
|
653 | + include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
654 | + break; |
|
655 | + case 119: |
|
656 | + // get the purge processor |
|
657 | + include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
658 | + break; |
|
659 | 659 | /********************************************************************/ |
660 | 660 | /* view phpinfo */ |
661 | 661 | /********************************************************************/ |
662 | - case 200: |
|
663 | - // show phpInfo |
|
664 | - if($modx->hasPermission('logs')) { |
|
665 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
666 | - include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
667 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
668 | - } |
|
669 | - break; |
|
662 | + case 200: |
|
663 | + // show phpInfo |
|
664 | + if($modx->hasPermission('logs')) { |
|
665 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
666 | + include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
667 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
668 | + } |
|
669 | + break; |
|
670 | 670 | /********************************************************************/ |
671 | 671 | /* errorpage */ |
672 | 672 | /********************************************************************/ |
673 | - case 29: |
|
674 | - // get the error page |
|
675 | - include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
676 | - break; |
|
673 | + case 29: |
|
674 | + // get the error page |
|
675 | + include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
676 | + break; |
|
677 | 677 | /********************************************************************/ |
678 | 678 | /* file manager */ |
679 | 679 | /********************************************************************/ |
680 | - case 31: |
|
681 | - // get the page to manage files |
|
682 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
683 | - include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
684 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
685 | - break; |
|
680 | + case 31: |
|
681 | + // get the page to manage files |
|
682 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
683 | + include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
684 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
685 | + break; |
|
686 | 686 | /********************************************************************/ |
687 | 687 | /* access permissions */ |
688 | 688 | /********************************************************************/ |
689 | - case 40: |
|
690 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
691 | - include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
692 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
693 | - break; |
|
694 | - case 91: |
|
695 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
696 | - include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
697 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
698 | - break; |
|
689 | + case 40: |
|
690 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
691 | + include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
692 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
693 | + break; |
|
694 | + case 91: |
|
695 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
696 | + include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
697 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
698 | + break; |
|
699 | 699 | /********************************************************************/ |
700 | 700 | /* access groups processor */ |
701 | 701 | /********************************************************************/ |
702 | - case 41: |
|
703 | - include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
704 | - break; |
|
705 | - case 92: |
|
706 | - include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
707 | - break; |
|
702 | + case 41: |
|
703 | + include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
704 | + break; |
|
705 | + case 92: |
|
706 | + include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
707 | + break; |
|
708 | 708 | /********************************************************************/ |
709 | 709 | /* settings editor */ |
710 | 710 | /********************************************************************/ |
711 | - case 17: |
|
712 | - // get the settings editor |
|
713 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
714 | - include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
715 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
716 | - break; |
|
717 | - case 118: |
|
718 | - // call settings ajax include |
|
719 | - ob_clean(); |
|
720 | - include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
721 | - break; |
|
711 | + case 17: |
|
712 | + // get the settings editor |
|
713 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
714 | + include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
715 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
716 | + break; |
|
717 | + case 118: |
|
718 | + // call settings ajax include |
|
719 | + ob_clean(); |
|
720 | + include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
721 | + break; |
|
722 | 722 | /********************************************************************/ |
723 | 723 | /* save settings */ |
724 | 724 | /********************************************************************/ |
725 | - case 30: |
|
726 | - // get the save settings processor |
|
727 | - include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
728 | - break; |
|
725 | + case 30: |
|
726 | + // get the save settings processor |
|
727 | + include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
728 | + break; |
|
729 | 729 | /********************************************************************/ |
730 | 730 | /* system information */ |
731 | 731 | /********************************************************************/ |
732 | - case 53: |
|
733 | - // get the settings editor |
|
734 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
735 | - include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
736 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
737 | - break; |
|
732 | + case 53: |
|
733 | + // get the settings editor |
|
734 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
735 | + include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
736 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
737 | + break; |
|
738 | 738 | /********************************************************************/ |
739 | 739 | /* optimise table */ |
740 | 740 | /********************************************************************/ |
741 | - case 54: |
|
742 | - // get the table optimizer/truncate processor |
|
743 | - include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
744 | - break; |
|
741 | + case 54: |
|
742 | + // get the table optimizer/truncate processor |
|
743 | + include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
744 | + break; |
|
745 | 745 | /********************************************************************/ |
746 | 746 | /* view logging */ |
747 | 747 | /********************************************************************/ |
748 | - case 13: |
|
749 | - // view logging |
|
750 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
751 | - include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
752 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
753 | - break; |
|
748 | + case 13: |
|
749 | + // view logging |
|
750 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
751 | + include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
752 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
753 | + break; |
|
754 | 754 | /********************************************************************/ |
755 | 755 | /* empty logs */ |
756 | 756 | /********************************************************************/ |
757 | - case 55: |
|
758 | - // get the settings editor |
|
759 | - include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
760 | - break; |
|
757 | + case 55: |
|
758 | + // get the settings editor |
|
759 | + include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
760 | + break; |
|
761 | 761 | /********************************************************************/ |
762 | 762 | /* calls test page */ |
763 | 763 | /********************************************************************/ |
764 | - case 999: |
|
765 | - // get the test page |
|
766 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
767 | - include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
768 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
769 | - break; |
|
764 | + case 999: |
|
765 | + // get the test page |
|
766 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
767 | + include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
768 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
769 | + break; |
|
770 | 770 | /********************************************************************/ |
771 | 771 | /* Empty recycle bin */ |
772 | 772 | /********************************************************************/ |
773 | - case 64: |
|
774 | - // get the Recycle bin emptier |
|
775 | - include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
776 | - break; |
|
773 | + case 64: |
|
774 | + // get the Recycle bin emptier |
|
775 | + include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
776 | + break; |
|
777 | 777 | /********************************************************************/ |
778 | 778 | /* Messages */ |
779 | 779 | /********************************************************************/ |
780 | - case 10: |
|
781 | - // get the messages page |
|
782 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
783 | - include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
784 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
785 | - break; |
|
780 | + case 10: |
|
781 | + // get the messages page |
|
782 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
783 | + include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
784 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
785 | + break; |
|
786 | 786 | /********************************************************************/ |
787 | 787 | /* Delete a message */ |
788 | 788 | /********************************************************************/ |
789 | - case 65: |
|
790 | - // get the message deleter |
|
791 | - include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
792 | - break; |
|
789 | + case 65: |
|
790 | + // get the message deleter |
|
791 | + include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
792 | + break; |
|
793 | 793 | /********************************************************************/ |
794 | 794 | /* Send a message */ |
795 | 795 | /********************************************************************/ |
796 | - case 66: |
|
797 | - // get the message deleter |
|
798 | - include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
799 | - break; |
|
796 | + case 66: |
|
797 | + // get the message deleter |
|
798 | + include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
799 | + break; |
|
800 | 800 | /********************************************************************/ |
801 | 801 | /* Remove locks */ |
802 | 802 | /********************************************************************/ |
803 | - case 67: |
|
804 | - // get the lock remover |
|
805 | - include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
806 | - break; |
|
803 | + case 67: |
|
804 | + // get the lock remover |
|
805 | + include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
806 | + break; |
|
807 | 807 | /********************************************************************/ |
808 | 808 | /* Site schedule */ |
809 | 809 | /********************************************************************/ |
810 | - case 70: |
|
811 | - // get the schedule page |
|
812 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
813 | - include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
814 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
815 | - break; |
|
810 | + case 70: |
|
811 | + // get the schedule page |
|
812 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
813 | + include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
814 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
815 | + break; |
|
816 | 816 | /********************************************************************/ |
817 | 817 | /* Search */ |
818 | 818 | /********************************************************************/ |
819 | - case 71: |
|
820 | - // get the search page |
|
821 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
822 | - include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
823 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
824 | - break; |
|
819 | + case 71: |
|
820 | + // get the search page |
|
821 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
822 | + include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
823 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
824 | + break; |
|
825 | 825 | /********************************************************************/ |
826 | 826 | /* About */ |
827 | 827 | /********************************************************************/ |
828 | - case 59: |
|
829 | - // get the about page |
|
830 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
831 | - include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
832 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
833 | - break; |
|
828 | + case 59: |
|
829 | + // get the about page |
|
830 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
831 | + include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
832 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
833 | + break; |
|
834 | 834 | /********************************************************************/ |
835 | 835 | /* Add weblink */ |
836 | 836 | /********************************************************************/ |
837 | - case 72: |
|
838 | - // get the weblink page |
|
839 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
840 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
841 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
842 | - break; |
|
837 | + case 72: |
|
838 | + // get the weblink page |
|
839 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
840 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
841 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
842 | + break; |
|
843 | 843 | /********************************************************************/ |
844 | 844 | /* User management */ |
845 | 845 | /********************************************************************/ |
846 | - case 75: |
|
847 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
848 | - include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
849 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
850 | - break; |
|
851 | - case 99: |
|
852 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
853 | - include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
854 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
855 | - break; |
|
856 | - case 86: |
|
857 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
858 | - include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
859 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
860 | - break; |
|
846 | + case 75: |
|
847 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
848 | + include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
849 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
850 | + break; |
|
851 | + case 99: |
|
852 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
853 | + include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
854 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
855 | + break; |
|
856 | + case 86: |
|
857 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
858 | + include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
859 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
860 | + break; |
|
861 | 861 | /********************************************************************/ |
862 | 862 | /* template/ snippet management */ |
863 | 863 | /********************************************************************/ |
864 | - case 76: |
|
865 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
866 | - include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
867 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
868 | - break; |
|
864 | + case 76: |
|
865 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
866 | + include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
867 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
868 | + break; |
|
869 | 869 | /********************************************************************/ |
870 | 870 | /* Export to file */ |
871 | 871 | /********************************************************************/ |
872 | - case 83: |
|
873 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
874 | - include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
875 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
876 | - break; |
|
872 | + case 83: |
|
873 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
874 | + include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
875 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
876 | + break; |
|
877 | 877 | /********************************************************************/ |
878 | 878 | /* Resource Selector */ |
879 | 879 | /********************************************************************/ |
880 | - case 84: |
|
881 | - include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
882 | - break; |
|
880 | + case 84: |
|
881 | + include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
882 | + break; |
|
883 | 883 | /********************************************************************/ |
884 | 884 | /* Backup Manager */ |
885 | 885 | /********************************************************************/ |
886 | - case 93: |
|
887 | - # header and footer will be handled interally |
|
888 | - include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
889 | - break; |
|
886 | + case 93: |
|
887 | + # header and footer will be handled interally |
|
888 | + include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
889 | + break; |
|
890 | 890 | /********************************************************************/ |
891 | 891 | /* Duplicate Document */ |
892 | 892 | /********************************************************************/ |
893 | - case 94: |
|
894 | - // get the duplicate processor |
|
895 | - include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
896 | - break; |
|
893 | + case 94: |
|
894 | + // get the duplicate processor |
|
895 | + include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
896 | + break; |
|
897 | 897 | /********************************************************************/ |
898 | 898 | /* Import Document from file */ |
899 | 899 | /********************************************************************/ |
900 | - case 95: |
|
901 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
902 | - include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
903 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
904 | - break; |
|
900 | + case 95: |
|
901 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
902 | + include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
903 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
904 | + break; |
|
905 | 905 | /********************************************************************/ |
906 | 906 | /* Help */ |
907 | 907 | /********************************************************************/ |
908 | - case 9: |
|
909 | - // get the help page |
|
910 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
911 | - include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
912 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
913 | - break; |
|
908 | + case 9: |
|
909 | + // get the help page |
|
910 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
911 | + include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
912 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
913 | + break; |
|
914 | 914 | /********************************************************************/ |
915 | 915 | /* Template Variables - Based on Apodigm's Docvars */ |
916 | 916 | /********************************************************************/ |
917 | - case 300: |
|
918 | - // get the new document variable action |
|
919 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
920 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
921 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
922 | - break; |
|
923 | - case 301: |
|
924 | - // get the edit document variable action |
|
925 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
926 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
927 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
928 | - break; |
|
929 | - case 302: |
|
930 | - // get the save processor |
|
931 | - include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
932 | - break; |
|
933 | - case 303: |
|
934 | - // get the delete processor |
|
935 | - include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
936 | - break; |
|
937 | - case 304: |
|
938 | - // get the duplicate processor |
|
939 | - include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
940 | - break; |
|
941 | - case 305: |
|
942 | - // get the tv-rank action |
|
943 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
944 | - include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
945 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
946 | - break; |
|
917 | + case 300: |
|
918 | + // get the new document variable action |
|
919 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
920 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
921 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
922 | + break; |
|
923 | + case 301: |
|
924 | + // get the edit document variable action |
|
925 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
926 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
927 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
928 | + break; |
|
929 | + case 302: |
|
930 | + // get the save processor |
|
931 | + include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
932 | + break; |
|
933 | + case 303: |
|
934 | + // get the delete processor |
|
935 | + include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
936 | + break; |
|
937 | + case 304: |
|
938 | + // get the duplicate processor |
|
939 | + include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
940 | + break; |
|
941 | + case 305: |
|
942 | + // get the tv-rank action |
|
943 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
944 | + include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
945 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
946 | + break; |
|
947 | 947 | /********************************************************************/ |
948 | 948 | /* Event viewer: show event message log */ |
949 | 949 | /********************************************************************/ |
950 | - case 114: |
|
951 | - // get event logs |
|
952 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
953 | - include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
954 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
955 | - break; |
|
956 | - case 115: |
|
957 | - // get event log details viewer |
|
958 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
959 | - include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
960 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
961 | - break; |
|
962 | - case 116: |
|
963 | - // get the event log delete processor |
|
964 | - include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
965 | - break; |
|
966 | - |
|
967 | - case 501: |
|
968 | - //delete category |
|
969 | - include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
970 | - break; |
|
950 | + case 114: |
|
951 | + // get event logs |
|
952 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
953 | + include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
954 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
955 | + break; |
|
956 | + case 115: |
|
957 | + // get event log details viewer |
|
958 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
959 | + include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
960 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
961 | + break; |
|
962 | + case 116: |
|
963 | + // get the event log delete processor |
|
964 | + include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
965 | + break; |
|
966 | + |
|
967 | + case 501: |
|
968 | + //delete category |
|
969 | + include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
970 | + break; |
|
971 | 971 | /********************************************************************/ |
972 | 972 | /* default action: show not implemented message */ |
973 | 973 | /********************************************************************/ |
974 | - default : |
|
975 | - // say that what was requested doesn't do anything yet |
|
976 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
977 | - echo " |
|
974 | + default : |
|
975 | + // say that what was requested doesn't do anything yet |
|
976 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
977 | + echo " |
|
978 | 978 | <div class='sectionHeader'>".$_lang['functionnotimpl']."</div> |
979 | 979 | <div class='sectionBody'> |
980 | 980 | <p>".$_lang['functionnotimpl_message']."</p> |
981 | 981 | </div> |
982 | 982 | "; |
983 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
983 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
984 | 984 | } |
985 | 985 | |
986 | 986 | /********************************************************************/ |
987 | 987 | // log action, unless it's a frame request |
988 | 988 | if($action!=1 && $action!=7 && $action!=2) { |
989 | - $log = new EvolutionCMS\Legacy\LogHandler; |
|
990 | - $log->initAndWriteLog(); |
|
989 | + $log = new EvolutionCMS\Legacy\LogHandler; |
|
990 | + $log->initAndWriteLog(); |
|
991 | 991 | } |
992 | 992 | /********************************************************************/ |
993 | 993 | // show debug |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
3 | - die('<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.'); |
|
3 | + die('<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.'); |
|
4 | 4 | } |
5 | 5 | |
6 | 6 | unset($_SESSION['itemname']); // clear this, because it's only set for logging purposes |
7 | 7 | |
8 | 8 | if($modx->hasPermission('settings') && (!isset($settings_version) || $settings_version != $modx->getVersionData('version'))) { |
9 | - // seems to be a new install - send the user to the configuration page |
|
10 | - exit('<script type="text/javascript">document.location.href="index.php?a=17";</script>'); |
|
9 | + // seems to be a new install - send the user to the configuration page |
|
10 | + exit('<script type="text/javascript">document.location.href="index.php?a=17";</script>'); |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | // set placeholders |
@@ -17,93 +17,93 @@ discard block |
||
17 | 17 | |
18 | 18 | // setup message info |
19 | 19 | if($modx->hasPermission('messages')) { |
20 | - include_once(MODX_MANAGER_PATH . 'includes/messageCount.inc.php'); |
|
21 | - $_SESSION['nrtotalmessages'] = $nrtotalmessages; |
|
22 | - $_SESSION['nrnewmessages'] = $nrnewmessages; |
|
23 | - |
|
24 | - $msg = array(); |
|
25 | - $msg[] = sprintf('<a href="index.php?a=10" target="main"><img src="%s" /></a>', $_style['icons_mail_large']); |
|
26 | - $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? ' (<span style="color:red">' . $_SESSION['nrnewmessages'] . '</span>)' : ''; |
|
27 | - $msg[] = sprintf('<span style="color:#909090;font-size:15px;font-weight:bold"> <a class="wm_messages_inbox_link" href="index.php?a=10" target="main">[%%inbox%%]</a>%s</span><br />', $nrnewmessages); |
|
28 | - $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? '<span style="color:red;">' . $_SESSION['nrnewmessages'] . '</span>' : '0'; |
|
29 | - $welcome_messages = sprintf($_lang['welcome_messages'], $_SESSION['nrtotalmessages'], $nrnewmessages); |
|
30 | - $msg[] = sprintf('<span class="comment">%s</span>', $welcome_messages); |
|
31 | - $ph['MessageInfo'] = implode("\n", $msg); |
|
20 | + include_once(MODX_MANAGER_PATH . 'includes/messageCount.inc.php'); |
|
21 | + $_SESSION['nrtotalmessages'] = $nrtotalmessages; |
|
22 | + $_SESSION['nrnewmessages'] = $nrnewmessages; |
|
23 | + |
|
24 | + $msg = array(); |
|
25 | + $msg[] = sprintf('<a href="index.php?a=10" target="main"><img src="%s" /></a>', $_style['icons_mail_large']); |
|
26 | + $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? ' (<span style="color:red">' . $_SESSION['nrnewmessages'] . '</span>)' : ''; |
|
27 | + $msg[] = sprintf('<span style="color:#909090;font-size:15px;font-weight:bold"> <a class="wm_messages_inbox_link" href="index.php?a=10" target="main">[%%inbox%%]</a>%s</span><br />', $nrnewmessages); |
|
28 | + $nrnewmessages = $_SESSION['nrnewmessages'] > 0 ? '<span style="color:red;">' . $_SESSION['nrnewmessages'] . '</span>' : '0'; |
|
29 | + $welcome_messages = sprintf($_lang['welcome_messages'], $_SESSION['nrtotalmessages'], $nrnewmessages); |
|
30 | + $msg[] = sprintf('<span class="comment">%s</span>', $welcome_messages); |
|
31 | + $ph['MessageInfo'] = implode("\n", $msg); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | $iconTpl = $modx->getChunk('manager#welcome/WrapIcon'); |
35 | 35 | // setup icons |
36 | 36 | if($modx->hasPermission('new_user') || $modx->hasPermission('edit_user')) { |
37 | - $icon = '<i class="[&icons_security_large&]" alt="[%user_management_title%]"> </i>[%user_management_title%]'; |
|
38 | - $ph['SecurityIcon'] = sprintf($iconTpl,$icon, 75); |
|
37 | + $icon = '<i class="[&icons_security_large&]" alt="[%user_management_title%]"> </i>[%user_management_title%]'; |
|
38 | + $ph['SecurityIcon'] = sprintf($iconTpl,$icon, 75); |
|
39 | 39 | } |
40 | 40 | if($modx->hasPermission('new_web_user') || $modx->hasPermission('edit_web_user')) { |
41 | - $icon = '<i class="[&icons_webusers_large&]" alt="[%web_user_management_title%]"> </i>[%web_user_management_title%]'; |
|
42 | - $ph['WebUserIcon'] = sprintf($iconTpl,$icon, 99); |
|
41 | + $icon = '<i class="[&icons_webusers_large&]" alt="[%web_user_management_title%]"> </i>[%web_user_management_title%]'; |
|
42 | + $ph['WebUserIcon'] = sprintf($iconTpl,$icon, 99); |
|
43 | 43 | } |
44 | 44 | if($modx->hasPermission('new_module') || $modx->hasPermission('edit_module')) { |
45 | - $icon = '<i class="[&icons_modules_large&]" alt="[%manage_modules%]"> </i>[%modules%]'; |
|
46 | - $ph['ModulesIcon'] = sprintf($iconTpl,$icon, 106); |
|
45 | + $icon = '<i class="[&icons_modules_large&]" alt="[%manage_modules%]"> </i>[%modules%]'; |
|
46 | + $ph['ModulesIcon'] = sprintf($iconTpl,$icon, 106); |
|
47 | 47 | } |
48 | 48 | if($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags')) { |
49 | - $icon = '<i class="[&icons_resources_large&]" alt="[%element_management%]"> </i>[%elements%]'; |
|
50 | - $ph['ResourcesIcon'] = sprintf($iconTpl,$icon, 76); |
|
49 | + $icon = '<i class="[&icons_resources_large&]" alt="[%element_management%]"> </i>[%elements%]'; |
|
50 | + $ph['ResourcesIcon'] = sprintf($iconTpl,$icon, 76); |
|
51 | 51 | } |
52 | 52 | if($modx->hasPermission('bk_manager')) { |
53 | - $icon = '<i class="[&icons_backup_large&]" alt="[%bk_manager%]"> </i>[%backup%]'; |
|
54 | - $ph['BackupIcon'] = sprintf($iconTpl,$icon, 93); |
|
53 | + $icon = '<i class="[&icons_backup_large&]" alt="[%bk_manager%]"> </i>[%backup%]'; |
|
54 | + $ph['BackupIcon'] = sprintf($iconTpl,$icon, 93); |
|
55 | 55 | } |
56 | 56 | if($modx->hasPermission('help')) { |
57 | - $icon = '<i class="[&icons_help_large&]" alt="[%help%]" /> </i>[%help%]'; |
|
58 | - $ph['HelpIcon'] = sprintf($iconTpl,$icon, 9); |
|
57 | + $icon = '<i class="[&icons_help_large&]" alt="[%help%]" /> </i>[%help%]'; |
|
58 | + $ph['HelpIcon'] = sprintf($iconTpl,$icon, 9); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | if($modx->hasPermission('new_document')) { |
62 | - $icon = '<i class="[&icons_resource_large&]"></i>[%add_resource%]'; |
|
63 | - $ph['ResourceIcon'] = sprintf($iconTpl,$icon, 4); |
|
64 | - $icon = '<i class="[&icons_weblink_large&]"></i>[%add_weblink%]'; |
|
65 | - $ph['WeblinkIcon'] = sprintf($iconTpl,$icon, 72); |
|
62 | + $icon = '<i class="[&icons_resource_large&]"></i>[%add_resource%]'; |
|
63 | + $ph['ResourceIcon'] = sprintf($iconTpl,$icon, 4); |
|
64 | + $icon = '<i class="[&icons_weblink_large&]"></i>[%add_weblink%]'; |
|
65 | + $ph['WeblinkIcon'] = sprintf($iconTpl,$icon, 72); |
|
66 | 66 | } |
67 | 67 | if($modx->hasPermission('assets_images')) { |
68 | - $icon = '<i class="[&icons_images_large&]"></i>[%images_management%]'; |
|
69 | - $ph['ImagesIcon'] = sprintf($iconTpl,$icon, 72); |
|
68 | + $icon = '<i class="[&icons_images_large&]"></i>[%images_management%]'; |
|
69 | + $ph['ImagesIcon'] = sprintf($iconTpl,$icon, 72); |
|
70 | 70 | } |
71 | 71 | if($modx->hasPermission('assets_files')) { |
72 | - $icon = '<i class="[&icons_files_large&]"></i>[%files_management%]'; |
|
73 | - $ph['FilesIcon'] = sprintf($iconTpl,$icon, 72); |
|
72 | + $icon = '<i class="[&icons_files_large&]"></i>[%files_management%]'; |
|
73 | + $ph['FilesIcon'] = sprintf($iconTpl,$icon, 72); |
|
74 | 74 | } |
75 | 75 | if($modx->hasPermission('change_password')) { |
76 | - $icon = '<i class="[&icons_password_large&]"></i>[%change_password%]'; |
|
77 | - $ph['PasswordIcon'] = sprintf($iconTpl,$icon, 28); |
|
76 | + $icon = '<i class="[&icons_password_large&]"></i>[%change_password%]'; |
|
77 | + $ph['PasswordIcon'] = sprintf($iconTpl,$icon, 28); |
|
78 | 78 | } |
79 | 79 | $icon = '<i class="[&icons_logout_large&]"></i>[%logout%]'; |
80 | 80 | $ph['LogoutIcon'] = sprintf($iconTpl,$icon, 8); |
81 | 81 | |
82 | 82 | // do some config checks |
83 | 83 | if(($modx->config['warning_visibility'] == 0 && $_SESSION['mgrRole'] == 1) || $modx->config['warning_visibility'] == 1) { |
84 | - include_once(MODX_MANAGER_PATH . 'includes/config_check.inc.php'); |
|
85 | - if($config_check_results != $_lang['configcheck_ok']) { |
|
86 | - $ph['config_check_results'] = $config_check_results; |
|
87 | - $ph['config_display'] = 'block'; |
|
88 | - } else { |
|
89 | - $ph['config_display'] = 'none'; |
|
90 | - } |
|
84 | + include_once(MODX_MANAGER_PATH . 'includes/config_check.inc.php'); |
|
85 | + if($config_check_results != $_lang['configcheck_ok']) { |
|
86 | + $ph['config_check_results'] = $config_check_results; |
|
87 | + $ph['config_display'] = 'block'; |
|
88 | + } else { |
|
89 | + $ph['config_display'] = 'none'; |
|
90 | + } |
|
91 | 91 | } else { |
92 | - $ph['config_display'] = 'none'; |
|
92 | + $ph['config_display'] = 'none'; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | // Check logout-reminder |
96 | 96 | if(isset($_SESSION['show_logout_reminder'])) { |
97 | - switch($_SESSION['show_logout_reminder']['type']) { |
|
98 | - case 'logout_reminder': |
|
99 | - $date = $modx->toDateFormat($_SESSION['show_logout_reminder']['lastHit'], 'dateOnly'); |
|
100 | - $ph['logout_reminder_msg'] = str_replace('[+date+]', $date, $_lang['logout_reminder_msg']); |
|
101 | - break; |
|
102 | - } |
|
103 | - $ph['show_logout_reminder'] = 'block'; |
|
104 | - unset($_SESSION['show_logout_reminder']); |
|
97 | + switch($_SESSION['show_logout_reminder']['type']) { |
|
98 | + case 'logout_reminder': |
|
99 | + $date = $modx->toDateFormat($_SESSION['show_logout_reminder']['lastHit'], 'dateOnly'); |
|
100 | + $ph['logout_reminder_msg'] = str_replace('[+date+]', $date, $_lang['logout_reminder_msg']); |
|
101 | + break; |
|
102 | + } |
|
103 | + $ph['show_logout_reminder'] = 'block'; |
|
104 | + unset($_SESSION['show_logout_reminder']); |
|
105 | 105 | } else { |
106 | - $ph['show_logout_reminder'] = 'none'; |
|
106 | + $ph['show_logout_reminder'] = 'none'; |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | // Check multiple sessions |
@@ -151,11 +151,11 @@ discard block |
||
151 | 151 | $nrnewmessages = '<span class="text-danger">' . $_SESSION['nrnewmessages'] . '</span>'; |
152 | 152 | |
153 | 153 | $ph['UserInfo'] = $modx->parseText($tpl, array( |
154 | - 'username' => $modx->getLoginUserName(), |
|
155 | - 'role' => $_SESSION['mgrPermissions']['name'], |
|
156 | - 'lastlogin' => $modx->toDateFormat($_SESSION['mgrLastlogin'] + $server_offset_time), |
|
157 | - 'logincount' => $_SESSION['mgrLogincount'] + 1, |
|
158 | - 'msginfo' => sprintf($_lang['welcome_messages'], $_SESSION['nrtotalmessages'], $nrnewmessages) |
|
154 | + 'username' => $modx->getLoginUserName(), |
|
155 | + 'role' => $_SESSION['mgrPermissions']['name'], |
|
156 | + 'lastlogin' => $modx->toDateFormat($_SESSION['mgrLastlogin'] + $server_offset_time), |
|
157 | + 'logincount' => $_SESSION['mgrLogincount'] + 1, |
|
158 | + 'msginfo' => sprintf($_lang['welcome_messages'], $_SESSION['nrtotalmessages'], $nrnewmessages) |
|
159 | 159 | )); |
160 | 160 | |
161 | 161 | $from = array(); |
@@ -164,13 +164,13 @@ discard block |
||
164 | 164 | $rs = $modx->db->select('*', $from, '', 'username ASC, au.sid ASC'); |
165 | 165 | |
166 | 166 | if($modx->db->getRecordCount($rs) < 1) { |
167 | - $html = '<p>[%no_active_users_found%]</p>'; |
|
167 | + $html = '<p>[%no_active_users_found%]</p>'; |
|
168 | 168 | } else { |
169 | - include_once(MODX_MANAGER_PATH . 'includes/actionlist.inc.php'); |
|
170 | - $now = $_SERVER['REQUEST_TIME'] + $server_offset_time; |
|
171 | - $ph['now'] = strftime('%H:%M:%S', $now); |
|
172 | - $timetocheck = ($now - (60 * 20)); //+$server_offset_time; |
|
173 | - $html = ' |
|
169 | + include_once(MODX_MANAGER_PATH . 'includes/actionlist.inc.php'); |
|
170 | + $now = $_SERVER['REQUEST_TIME'] + $server_offset_time; |
|
171 | + $ph['now'] = strftime('%H:%M:%S', $now); |
|
172 | + $timetocheck = ($now - (60 * 20)); //+$server_offset_time; |
|
173 | + $html = ' |
|
174 | 174 | <div class="card-body"> |
175 | 175 | [%onlineusers_message%] |
176 | 176 | <b>[+now+]</b>): |
@@ -188,33 +188,33 @@ discard block |
||
188 | 188 | </thead> |
189 | 189 | <tbody>'; |
190 | 190 | |
191 | - $userList = array(); |
|
192 | - $userCount = array(); |
|
193 | - // Create userlist with session-count first before output |
|
194 | - while($activeusers = $modx->db->getRow($rs)) { |
|
195 | - $userCount[$activeusers['internalKey']] = isset($userCount[$activeusers['internalKey']]) ? $userCount[$activeusers['internalKey']] + 1 : 1; |
|
196 | - |
|
197 | - $idle = $activeusers['lasthit'] < $timetocheck ? ' class="userIdle"' : ''; |
|
198 | - $webicon = $activeusers['internalKey'] < 0 ? '<img src="[&tree_globe&]" alt="Web user" /> ' : ''; |
|
199 | - $ip = $activeusers['ip'] === '::1' ? '127.0.0.1' : $activeusers['ip']; |
|
200 | - $currentaction = getAction($activeusers['action'], $activeusers['id']); |
|
201 | - $userList[] = array( |
|
202 | - $idle, |
|
203 | - '', |
|
204 | - $activeusers['username'], |
|
205 | - $webicon, |
|
206 | - abs($activeusers['internalKey']), |
|
207 | - $ip, |
|
208 | - strftime('%H:%M:%S', $activeusers['lasthit'] + $server_offset_time), |
|
209 | - $currentaction |
|
210 | - ); |
|
211 | - } |
|
212 | - foreach($userList as $params) { |
|
213 | - $params[1] = $userCount[$params[4]] > 1 ? ' class="userMultipleSessions"' : ''; |
|
214 | - $html .= "\n\t\t" . vsprintf('<tr%s><td><strong%s>%s</strong></td><td>%s%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', $params); |
|
215 | - } |
|
216 | - |
|
217 | - $html .= ' |
|
191 | + $userList = array(); |
|
192 | + $userCount = array(); |
|
193 | + // Create userlist with session-count first before output |
|
194 | + while($activeusers = $modx->db->getRow($rs)) { |
|
195 | + $userCount[$activeusers['internalKey']] = isset($userCount[$activeusers['internalKey']]) ? $userCount[$activeusers['internalKey']] + 1 : 1; |
|
196 | + |
|
197 | + $idle = $activeusers['lasthit'] < $timetocheck ? ' class="userIdle"' : ''; |
|
198 | + $webicon = $activeusers['internalKey'] < 0 ? '<img src="[&tree_globe&]" alt="Web user" /> ' : ''; |
|
199 | + $ip = $activeusers['ip'] === '::1' ? '127.0.0.1' : $activeusers['ip']; |
|
200 | + $currentaction = getAction($activeusers['action'], $activeusers['id']); |
|
201 | + $userList[] = array( |
|
202 | + $idle, |
|
203 | + '', |
|
204 | + $activeusers['username'], |
|
205 | + $webicon, |
|
206 | + abs($activeusers['internalKey']), |
|
207 | + $ip, |
|
208 | + strftime('%H:%M:%S', $activeusers['lasthit'] + $server_offset_time), |
|
209 | + $currentaction |
|
210 | + ); |
|
211 | + } |
|
212 | + foreach($userList as $params) { |
|
213 | + $params[1] = $userCount[$params[4]] > 1 ? ' class="userMultipleSessions"' : ''; |
|
214 | + $html .= "\n\t\t" . vsprintf('<tr%s><td><strong%s>%s</strong></td><td>%s%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', $params); |
|
215 | + } |
|
216 | + |
|
217 | + $html .= ' |
|
218 | 218 | </tbody> |
219 | 219 | </table> |
220 | 220 | </div> |
@@ -255,17 +255,17 @@ discard block |
||
255 | 255 | // invoke event OnManagerWelcomePrerender |
256 | 256 | $evtOut = $modx->invokeEvent('OnManagerWelcomePrerender'); |
257 | 257 | if(is_array($evtOut)) { |
258 | - $output = implode('', $evtOut); |
|
259 | - $ph['OnManagerWelcomePrerender'] = $output; |
|
258 | + $output = implode('', $evtOut); |
|
259 | + $ph['OnManagerWelcomePrerender'] = $output; |
|
260 | 260 | } |
261 | 261 | |
262 | 262 | $widgets['welcome'] = array( |
263 | - 'menuindex' => '10', |
|
264 | - 'id' => 'welcome', |
|
265 | - 'cols' => 'col-lg-6', |
|
266 | - 'icon' => 'fa-home', |
|
267 | - 'title' => '[%welcome_title%]', |
|
268 | - 'body' => ' |
|
263 | + 'menuindex' => '10', |
|
264 | + 'id' => 'welcome', |
|
265 | + 'cols' => 'col-lg-6', |
|
266 | + 'icon' => 'fa-home', |
|
267 | + 'title' => '[%welcome_title%]', |
|
268 | + 'body' => ' |
|
269 | 269 | <div class="wm_buttons card-body"> |
270 | 270 | <!--@IF:[[#hasPermission?key=new_document]]--> |
271 | 271 | <span class="wm_button"> |
@@ -339,25 +339,25 @@ discard block |
||
339 | 339 | </table> |
340 | 340 | </div> |
341 | 341 | ', |
342 | - 'hide'=>'0' |
|
342 | + 'hide'=>'0' |
|
343 | 343 | ); |
344 | 344 | $widgets['onlineinfo'] = array( |
345 | - 'menuindex' => '20', |
|
346 | - 'id' => 'onlineinfo', |
|
347 | - 'cols' => 'col-lg-6', |
|
348 | - 'icon' => 'fa-user', |
|
349 | - 'title' => '[%onlineusers_title%]', |
|
350 | - 'body' => '<div class="userstable">[+OnlineInfo+]</div>', |
|
351 | - 'hide'=>'0' |
|
345 | + 'menuindex' => '20', |
|
346 | + 'id' => 'onlineinfo', |
|
347 | + 'cols' => 'col-lg-6', |
|
348 | + 'icon' => 'fa-user', |
|
349 | + 'title' => '[%onlineusers_title%]', |
|
350 | + 'body' => '<div class="userstable">[+OnlineInfo+]</div>', |
|
351 | + 'hide'=>'0' |
|
352 | 352 | ); |
353 | 353 | $widgets['recentinfo'] = array( |
354 | - 'menuindex' => '30', |
|
355 | - 'id' => 'modxrecent_widget', |
|
356 | - 'cols' => 'col-sm-12', |
|
357 | - 'icon' => 'fa-pencil-square-o', |
|
358 | - 'title' => '[%activity_title%]', |
|
359 | - 'body' => '<div class="widget-stage">[+RecentInfo+]</div>', |
|
360 | - 'hide'=>'0' |
|
354 | + 'menuindex' => '30', |
|
355 | + 'id' => 'modxrecent_widget', |
|
356 | + 'cols' => 'col-sm-12', |
|
357 | + 'icon' => 'fa-pencil-square-o', |
|
358 | + 'title' => '[%activity_title%]', |
|
359 | + 'body' => '<div class="widget-stage">[+RecentInfo+]</div>', |
|
360 | + 'hide'=>'0' |
|
361 | 361 | ); |
362 | 362 | if ($modx->config['rss_url_news']) { |
363 | 363 | $widgets['news'] = array( |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | // invoke OnManagerWelcomeHome event |
386 | 386 | $sitewidgets = $modx->invokeEvent("OnManagerWelcomeHome", array('widgets' => $widgets)); |
387 | 387 | if(is_array($sitewidgets)) { |
388 | - $newwidgets = array(); |
|
388 | + $newwidgets = array(); |
|
389 | 389 | foreach($sitewidgets as $widget){ |
390 | 390 | $newwidgets = array_merge($newwidgets, unserialize($widget)); |
391 | 391 | } |
@@ -393,21 +393,21 @@ discard block |
||
393 | 393 | } |
394 | 394 | |
395 | 395 | usort($widgets, function ($a, $b) { |
396 | - return $a['menuindex'] - $b['menuindex']; |
|
396 | + return $a['menuindex'] - $b['menuindex']; |
|
397 | 397 | }); |
398 | 398 | |
399 | 399 | $tpl = $modx->getChunk('manager#welcome/Widget'); |
400 | 400 | $output = ''; |
401 | 401 | foreach($widgets as $widget) { |
402 | - if ($widget['hide'] != '1'){ |
|
403 | - $output .= $modx->parseText($tpl, $widget); |
|
404 | - } |
|
402 | + if ($widget['hide'] != '1'){ |
|
403 | + $output .= $modx->parseText($tpl, $widget); |
|
404 | + } |
|
405 | 405 | } |
406 | 406 | $ph['widgets'] = $output; |
407 | 407 | |
408 | 408 | // load template |
409 | 409 | if(!isset($modx->config['manager_welcome_tpl']) || empty($modx->config['manager_welcome_tpl'])) { |
410 | - $modx->config['manager_welcome_tpl'] = MODX_MANAGER_PATH . 'media/style/common/welcome.tpl'; |
|
410 | + $modx->config['manager_welcome_tpl'] = MODX_MANAGER_PATH . 'media/style/common/welcome.tpl'; |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | $target = $modx->config['manager_welcome_tpl']; |
@@ -415,27 +415,27 @@ discard block |
||
415 | 415 | $target = $modx->mergeSettingsContent($target); |
416 | 416 | |
417 | 417 | if(substr($target, 0, 1) === '@') { |
418 | - if(substr($target, 0, 6) === '@CHUNK') { |
|
419 | - $content = $modx->getChunk(trim(substr($target, 7))); |
|
420 | - } elseif(substr($target, 0, 5) === '@FILE') { |
|
421 | - $content = file_get_contents(trim(substr($target, 6))); |
|
422 | - } else { |
|
423 | - $content = ''; |
|
424 | - } |
|
418 | + if(substr($target, 0, 6) === '@CHUNK') { |
|
419 | + $content = $modx->getChunk(trim(substr($target, 7))); |
|
420 | + } elseif(substr($target, 0, 5) === '@FILE') { |
|
421 | + $content = file_get_contents(trim(substr($target, 6))); |
|
422 | + } else { |
|
423 | + $content = ''; |
|
424 | + } |
|
425 | 425 | } else { |
426 | - $chunk = $modx->getChunk($target); |
|
427 | - if($chunk !== false && !empty($chunk)) { |
|
428 | - $content = $chunk; |
|
429 | - } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
430 | - $content = file_get_contents(MODX_BASE_PATH . $target); |
|
431 | - } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl')) { |
|
432 | - $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl'); |
|
433 | - } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html')) // ClipperCMS compatible |
|
434 | - { |
|
435 | - $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html'); |
|
436 | - } else { |
|
437 | - $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/common/welcome.tpl'); |
|
438 | - } |
|
426 | + $chunk = $modx->getChunk($target); |
|
427 | + if($chunk !== false && !empty($chunk)) { |
|
428 | + $content = $chunk; |
|
429 | + } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
430 | + $content = file_get_contents(MODX_BASE_PATH . $target); |
|
431 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl')) { |
|
432 | + $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/welcome.tpl'); |
|
433 | + } elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html')) // ClipperCMS compatible |
|
434 | + { |
|
435 | + $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/welcome.html'); |
|
436 | + } else { |
|
437 | + $content = file_get_contents(MODX_MANAGER_PATH . 'media/style/common/welcome.tpl'); |
|
438 | + } |
|
439 | 439 | } |
440 | 440 | |
441 | 441 | // merge placeholders |
@@ -443,8 +443,8 @@ discard block |
||
443 | 443 | $content = $modx->mergeSettingsContent($content); |
444 | 444 | $content = $modx->parseText($content, $ph); |
445 | 445 | if(strpos($content, '[+') !== false) { |
446 | - $modx->toPlaceholders($ph); |
|
447 | - $content = $modx->mergePlaceholderContent($content); |
|
446 | + $modx->toPlaceholders($ph); |
|
447 | + $content = $modx->mergePlaceholderContent($content); |
|
448 | 448 | } |
449 | 449 | $content = $modx->parseDocumentSource($content); |
450 | 450 | $content = $modx->parseText($content, $_lang, '[%', '%]'); |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | $content = $modx->cleanUpMODXTags($content); //cleanup |
453 | 453 | |
454 | 454 | if($js = $modx->getRegisteredClientScripts()) { |
455 | - $content .= $js; |
|
455 | + $content .= $js; |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | echo $content; |
@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | $style_path = 'media/style/' . $modx->config['manager_theme'] . '/images/'; |
12 | 12 | $modx->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php'; |
13 | 13 | if(!$modx->config['lang_code']) { |
14 | - global $modx_lang_attribute; |
|
15 | - $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute; |
|
14 | + global $modx_lang_attribute; |
|
15 | + $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if(!empty($_GET['a']) && $_GET['a'] == 2) { |
19 | - include_once('welcome.php'); |
|
19 | + include_once('welcome.php'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | // Favicon |
@@ -274,66 +274,66 @@ discard block |
||
274 | 274 | $addnew = 0; |
275 | 275 | $run = 0; |
276 | 276 | switch($action) { |
277 | - case '3': |
|
278 | - case '4': |
|
279 | - case '27': |
|
280 | - case '72': |
|
281 | - if($modx->hasPermission('new_document')) { |
|
282 | - $addnew = 1; |
|
283 | - } |
|
284 | - break; |
|
285 | - case '16': |
|
286 | - case '19': |
|
287 | - if($modx->hasPermission('new_template')) { |
|
288 | - $addnew = 1; |
|
289 | - } |
|
290 | - break; |
|
291 | - case '300': |
|
292 | - case '301': |
|
293 | - if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
294 | - $addnew = 1; |
|
295 | - } |
|
296 | - break; |
|
297 | - case '77': |
|
298 | - case '78': |
|
299 | - if($modx->hasPermission('new_chunk')) { |
|
300 | - $addnew = 1; |
|
301 | - } |
|
302 | - break; |
|
303 | - case '22': |
|
304 | - case '23': |
|
305 | - if($modx->hasPermission('new_snippet')) { |
|
306 | - $addnew = 1; |
|
307 | - } |
|
308 | - break; |
|
309 | - case '101': |
|
310 | - case '102': |
|
311 | - if($modx->hasPermission('new_plugin')) { |
|
312 | - $addnew = 1; |
|
313 | - } |
|
314 | - break; |
|
315 | - case '106': |
|
316 | - case '107': |
|
317 | - case '108': |
|
318 | - if($modx->hasPermission('new_module')) { |
|
319 | - $addnew = 1; |
|
320 | - } |
|
321 | - if($modx->hasPermission('exec_module')) { |
|
322 | - $run = 1; |
|
323 | - } |
|
324 | - break; |
|
325 | - case '88': |
|
326 | - if($modx->hasPermission('new_web_user')) { |
|
327 | - $addnew = 1; |
|
328 | - } |
|
329 | - break; |
|
277 | + case '3': |
|
278 | + case '4': |
|
279 | + case '27': |
|
280 | + case '72': |
|
281 | + if($modx->hasPermission('new_document')) { |
|
282 | + $addnew = 1; |
|
283 | + } |
|
284 | + break; |
|
285 | + case '16': |
|
286 | + case '19': |
|
287 | + if($modx->hasPermission('new_template')) { |
|
288 | + $addnew = 1; |
|
289 | + } |
|
290 | + break; |
|
291 | + case '300': |
|
292 | + case '301': |
|
293 | + if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
294 | + $addnew = 1; |
|
295 | + } |
|
296 | + break; |
|
297 | + case '77': |
|
298 | + case '78': |
|
299 | + if($modx->hasPermission('new_chunk')) { |
|
300 | + $addnew = 1; |
|
301 | + } |
|
302 | + break; |
|
303 | + case '22': |
|
304 | + case '23': |
|
305 | + if($modx->hasPermission('new_snippet')) { |
|
306 | + $addnew = 1; |
|
307 | + } |
|
308 | + break; |
|
309 | + case '101': |
|
310 | + case '102': |
|
311 | + if($modx->hasPermission('new_plugin')) { |
|
312 | + $addnew = 1; |
|
313 | + } |
|
314 | + break; |
|
315 | + case '106': |
|
316 | + case '107': |
|
317 | + case '108': |
|
318 | + if($modx->hasPermission('new_module')) { |
|
319 | + $addnew = 1; |
|
320 | + } |
|
321 | + if($modx->hasPermission('exec_module')) { |
|
322 | + $run = 1; |
|
323 | + } |
|
324 | + break; |
|
325 | + case '88': |
|
326 | + if($modx->hasPermission('new_web_user')) { |
|
327 | + $addnew = 1; |
|
328 | + } |
|
329 | + break; |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | $disabled = ($action == '19' || $action == '300' || $action == '77' || $action == '23' || $action == '101' || $action == '4' || $action == '72' || $action == '87' || $action == '11' || $action == '107' || $action == '38') ? ' disabled' : ''; |
333 | 333 | |
334 | 334 | $_style['actionbuttons'] = array( |
335 | - 'dynamic' => array( |
|
336 | - 'document' => '<div id="actions"> |
|
335 | + 'dynamic' => array( |
|
336 | + 'document' => '<div id="actions"> |
|
337 | 337 | <div class="btn-group"> |
338 | 338 | <div class="btn-group"> |
339 | 339 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
349 | 349 | </select> |
350 | 350 | </div>' . |
351 | - ($addnew ? ' |
|
351 | + ($addnew ? ' |
|
352 | 352 | <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
353 | 353 | <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
354 | 354 | </a> |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | </a> |
365 | 365 | </div> |
366 | 366 | </div>', |
367 | - 'user' => '<div id="actions"> |
|
367 | + 'user' => '<div id="actions"> |
|
368 | 368 | <div class="btn-group"> |
369 | 369 | <div class="btn-group"> |
370 | 370 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | </a> |
388 | 388 | </div> |
389 | 389 | </div>', |
390 | - 'element' => '<div id="actions"> |
|
390 | + 'element' => '<div id="actions"> |
|
391 | 391 | <div class="btn-group"> |
392 | 392 | <div class="btn-group"> |
393 | 393 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
@@ -420,21 +420,21 @@ discard block |
||
420 | 420 | ' : '') . ' |
421 | 421 | </div> |
422 | 422 | </div>', |
423 | - 'newmodule' => ($addnew ? '<div id="actions"> |
|
423 | + 'newmodule' => ($addnew ? '<div id="actions"> |
|
424 | 424 | <div class="btn-group"> |
425 | 425 | <a id="newModule" class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
426 | 426 | <i class="' . $_style["actions_new"] . '"></i><span>' . $_lang['new_module'] . '</span> |
427 | 427 | </a> |
428 | 428 | </div> |
429 | 429 | </div>' : ''), |
430 | - 'close' => '<div id="actions"> |
|
430 | + 'close' => '<div id="actions"> |
|
431 | 431 | <div class="btn-group"> |
432 | 432 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.close();"> |
433 | 433 | <i class="' . $_style["actions_close"] . '"></i><span>' . $_lang['close'] . '</span> |
434 | 434 | </a> |
435 | 435 | </div> |
436 | 436 | </div>', |
437 | - 'save' => '<div id="actions"> |
|
437 | + 'save' => '<div id="actions"> |
|
438 | 438 | <div class="btn-group"> |
439 | 439 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
440 | 440 | <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | </a> |
445 | 445 | </div> |
446 | 446 | </div>', |
447 | - 'savedelete' => '<div id="actions"> |
|
447 | + 'savedelete' => '<div id="actions"> |
|
448 | 448 | <div class="btn-group"> |
449 | 449 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
450 | 450 | <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
@@ -457,14 +457,14 @@ discard block |
||
457 | 457 | </a> |
458 | 458 | </div> |
459 | 459 | </div>', |
460 | - 'cancel' => '<div id="actions"> |
|
460 | + 'cancel' => '<div id="actions"> |
|
461 | 461 | <div class="btn-group"> |
462 | 462 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
463 | 463 | <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
464 | 464 | </a> |
465 | 465 | </div> |
466 | 466 | </div>', |
467 | - 'canceldelete' => '<div id="actions"> |
|
467 | + 'canceldelete' => '<div id="actions"> |
|
468 | 468 | <div class="btn-group"> |
469 | 469 | <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
470 | 470 | <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
@@ -474,11 +474,11 @@ discard block |
||
474 | 474 | </a> |
475 | 475 | </div> |
476 | 476 | </div>', |
477 | - ), |
|
478 | - 'static' => array( |
|
479 | - 'document' => '<div id="actions"> |
|
477 | + ), |
|
478 | + 'static' => array( |
|
479 | + 'document' => '<div id="actions"> |
|
480 | 480 | <div class="btn-group">' . |
481 | - ($addnew ? ' |
|
481 | + ($addnew ? ' |
|
482 | 482 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
483 | 483 | <i class="' . $_style["icons_new_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span> |
484 | 484 | </a> |
@@ -503,12 +503,12 @@ discard block |
||
503 | 503 | </a> |
504 | 504 | </div> |
505 | 505 | </div>', |
506 | - 'cancel' => '<div id="actions"> |
|
506 | + 'cancel' => '<div id="actions"> |
|
507 | 507 | <div class="btn-group"> |
508 | 508 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
509 | 509 | <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
510 | 510 | </a> |
511 | 511 | </div> |
512 | 512 | </div>', |
513 | - ) |
|
513 | + ) |
|
514 | 514 | ); |