@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | $modx->config['enable_filter'] = 1; |
3 | 3 | |
4 | -$modx->addSnippet('hasPermission','return $modx->hasPermission($key);'); |
|
4 | +$modx->addSnippet('hasPermission', 'return $modx->hasPermission($key);'); |
|
5 | 5 | |
6 | -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')) |
|
6 | +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')) |
|
7 | 7 | $hasAnyPermission = 1; |
8 | 8 | else $hasAnyPermission = 0; |
9 | -$modx->addSnippet('hasAnyPermission','global $hasAnyPermission; return $hasAnyPermission;'); |
|
10 | -$modx->addSnippet('getLoginUserName','return $modx->getLoginUserName();'); |
|
9 | +$modx->addSnippet('hasAnyPermission', 'global $hasAnyPermission; return $hasAnyPermission;'); |
|
10 | +$modx->addSnippet('getLoginUserName', 'return $modx->getLoginUserName();'); |
|
11 | 11 | $code = 'global $_lang;return $_SESSION["nrtotalmessages"] ? sprintf($_lang["welcome_messages"], $_SESSION["nrtotalmessages"], \'<span style="color:red;">\' . $_SESSION["nrnewmessages"] . "</span>") : $_lang["messages_no_messages"];'; |
12 | -$modx->addSnippet('getMessageCount',$code); |
|
12 | +$modx->addSnippet('getMessageCount', $code); |
|
13 | 13 | |
14 | 14 | // Large Icons |
15 | 15 | $_style['icons_backup_large'] = 'fa fa-database fa-fw fa-2x'; |
@@ -3,9 +3,11 @@ |
||
3 | 3 | |
4 | 4 | $modx->addSnippet('hasPermission','return $modx->hasPermission($key);'); |
5 | 5 | |
6 | -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')) |
|
7 | - $hasAnyPermission = 1; |
|
8 | -else $hasAnyPermission = 0; |
|
6 | +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')) { |
|
7 | + $hasAnyPermission = 1; |
|
8 | +} else { |
|
9 | + $hasAnyPermission = 0; |
|
10 | +} |
|
9 | 11 | $modx->addSnippet('hasAnyPermission','global $hasAnyPermission; return $hasAnyPermission;'); |
10 | 12 | $modx->addSnippet('getLoginUserName','return $modx->getLoginUserName();'); |
11 | 13 | $code = 'global $_lang;return $_SESSION["nrtotalmessages"] ? sprintf($_lang["welcome_messages"], $_SESSION["nrtotalmessages"], \'<span style="color:red;">\' . $_SESSION["nrnewmessages"] . "</span>") : $_lang["messages_no_messages"];'; |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | $modx->loadExtension("ManagerAPI"); |
20 | 20 | |
21 | 21 | $_lang = array(); |
22 | -include_once MODX_MANAGER_PATH . '/includes/lang/english.inc.php'; |
|
22 | +include_once MODX_MANAGER_PATH.'/includes/lang/english.inc.php'; |
|
23 | 23 | if ($modx->config['manager_language'] != 'english') { |
24 | - include_once MODX_MANAGER_PATH . '/includes/lang/' . $modx->config['manager_language'] . '.inc.php'; |
|
24 | + include_once MODX_MANAGER_PATH.'/includes/lang/'.$modx->config['manager_language'].'.inc.php'; |
|
25 | 25 | } |
26 | -include_once MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/style.php'; |
|
26 | +include_once MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/style.php'; |
|
27 | 27 | |
28 | 28 | $action = isset($_REQUEST['a']) ? $_REQUEST['a'] : ''; |
29 | 29 | $frame = isset($_REQUEST['f']) ? $_REQUEST['f'] : ''; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | switch ($frame) { |
42 | 42 | case 'nodes': |
43 | - include_once MODX_MANAGER_PATH . '/frames/nodes.php'; |
|
43 | + include_once MODX_MANAGER_PATH.'/frames/nodes.php'; |
|
44 | 44 | |
45 | 45 | break; |
46 | 46 | } |
@@ -58,21 +58,21 @@ discard block |
||
58 | 58 | $sql = ''; |
59 | 59 | $a = ''; |
60 | 60 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '%*_') : ''; |
61 | - $sqlLike = $filter ? 'WHERE t1.name LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
62 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
61 | + $sqlLike = $filter ? 'WHERE t1.name LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
62 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
63 | 63 | |
64 | 64 | switch ($elements) { |
65 | 65 | case 'element_templates': |
66 | 66 | $a = 16; |
67 | - $sqlLike = $filter ? 'WHERE t1.templatename LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
67 | + $sqlLike = $filter ? 'WHERE t1.templatename LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
68 | 68 | $sql = $modx->db->query('SELECT t1.*, t1.templatename AS name |
69 | - FROM ' . $modx->getFullTableName('site_templates') . ' AS t1 |
|
70 | - ' . $sqlLike . ' |
|
69 | + FROM ' . $modx->getFullTableName('site_templates').' AS t1 |
|
70 | + ' . $sqlLike.' |
|
71 | 71 | ORDER BY t1.templatename ASC |
72 | 72 | ' . $sqlLimit); |
73 | 73 | |
74 | 74 | if ($modx->hasPermission('new_template')) { |
75 | - $output .= '<li><a id="a_19" href="index.php?a=19" target="main"><i class="fa fa-plus"></i>' . $_lang['new_template'] . '</a></li>'; |
|
75 | + $output .= '<li><a id="a_19" href="index.php?a=19" target="main"><i class="fa fa-plus"></i>'.$_lang['new_template'].'</a></li>'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | break; |
@@ -80,15 +80,15 @@ discard block |
||
80 | 80 | case 'element_tplvars': |
81 | 81 | $a = 301; |
82 | 82 | $sql = $modx->db->query('SELECT t1.*, IF(t2.templateid,0,1) AS disabled |
83 | - FROM ' . $modx->getFullTableName('site_tmplvars') . ' AS t1 |
|
84 | - LEFT JOIN ' . $modx->getFullTableName('site_tmplvar_templates') . ' AS t2 ON t1.id=t2.tmplvarid |
|
85 | - ' . $sqlLike . ' |
|
83 | + FROM ' . $modx->getFullTableName('site_tmplvars').' AS t1 |
|
84 | + LEFT JOIN ' . $modx->getFullTableName('site_tmplvar_templates').' AS t2 ON t1.id=t2.tmplvarid |
|
85 | + ' . $sqlLike.' |
|
86 | 86 | GROUP BY t1.id |
87 | 87 | ORDER BY t1.name ASC |
88 | 88 | ' . $sqlLimit); |
89 | 89 | |
90 | 90 | if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) { |
91 | - $output .= '<li><a id="a_300" href="index.php?a=300" target="main"><i class="fa fa-plus"></i>' . $_lang['new_tmplvars'] . '</a></li>'; |
|
91 | + $output .= '<li><a id="a_300" href="index.php?a=300" target="main"><i class="fa fa-plus"></i>'.$_lang['new_tmplvars'].'</a></li>'; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | break; |
@@ -96,13 +96,13 @@ discard block |
||
96 | 96 | case 'element_htmlsnippets': |
97 | 97 | $a = 78; |
98 | 98 | $sql = $modx->db->query('SELECT t1.* |
99 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' AS t1 |
|
100 | - ' . $sqlLike . ' |
|
99 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' AS t1 |
|
100 | + ' . $sqlLike.' |
|
101 | 101 | ORDER BY t1.name ASC |
102 | 102 | ' . $sqlLimit); |
103 | 103 | |
104 | 104 | if ($modx->hasPermission('new_chunk')) { |
105 | - $output .= '<li><a id="a_77" href="index.php?a=77" target="main"><i class="fa fa-plus"></i>' . $_lang['new_htmlsnippet'] . '</a></li>'; |
|
105 | + $output .= '<li><a id="a_77" href="index.php?a=77" target="main"><i class="fa fa-plus"></i>'.$_lang['new_htmlsnippet'].'</a></li>'; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | break; |
@@ -110,13 +110,13 @@ discard block |
||
110 | 110 | case 'element_snippets': |
111 | 111 | $a = 22; |
112 | 112 | $sql = $modx->db->query('SELECT t1.* |
113 | - FROM ' . $modx->getFullTableName('site_snippets') . ' AS t1 |
|
114 | - ' . $sqlLike . ' |
|
113 | + FROM ' . $modx->getFullTableName('site_snippets').' AS t1 |
|
114 | + ' . $sqlLike.' |
|
115 | 115 | ORDER BY t1.name ASC |
116 | 116 | ' . $sqlLimit); |
117 | 117 | |
118 | 118 | if ($modx->hasPermission('new_snippet')) { |
119 | - $output .= '<li><a id="a_23" href="index.php?a=23" target="main"><i class="fa fa-plus"></i>' . $_lang['new_snippet'] . '</a></li>'; |
|
119 | + $output .= '<li><a id="a_23" href="index.php?a=23" target="main"><i class="fa fa-plus"></i>'.$_lang['new_snippet'].'</a></li>'; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | break; |
@@ -124,13 +124,13 @@ discard block |
||
124 | 124 | case 'element_plugins': |
125 | 125 | $a = 102; |
126 | 126 | $sql = $modx->db->query('SELECT t1.* |
127 | - FROM ' . $modx->getFullTableName('site_plugins') . ' AS t1 |
|
128 | - ' . $sqlLike . ' |
|
127 | + FROM ' . $modx->getFullTableName('site_plugins').' AS t1 |
|
128 | + ' . $sqlLike.' |
|
129 | 129 | ORDER BY t1.name ASC |
130 | 130 | ' . $sqlLimit); |
131 | 131 | |
132 | 132 | if ($modx->hasPermission('new_plugin')) { |
133 | - $output .= '<li><a id="a_101" href="index.php?a=101" target="main"><i class="fa fa-plus"></i>' . $_lang['new_plugin'] . '</a></li>'; |
|
133 | + $output .= '<li><a id="a_101" href="index.php?a=101" target="main"><i class="fa fa-plus"></i>'.$_lang['new_plugin'].'</a></li>'; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | break; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | continue; |
146 | 146 | } |
147 | 147 | |
148 | - $items .= '<li class="item ' . ($row['disabled'] ? 'disabled' : '') . ($row['locked'] ? ' locked' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main" data-parent-id="a_76__elements_' . $elements . '">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>' . "\n"; |
|
148 | + $items .= '<li class="item '.($row['disabled'] ? 'disabled' : '').($row['locked'] ? ' locked' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main" data-parent-id="a_76__elements_'.$elements.'">'.$row['name'].' <small>('.$row['id'].')</small></a></li>'."\n"; |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
@@ -166,18 +166,18 @@ discard block |
||
166 | 166 | $output = ''; |
167 | 167 | $items = ''; |
168 | 168 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '\%*_') : ''; |
169 | - $sqlLike = $filter ? 'WHERE t1.username LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
170 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
169 | + $sqlLike = $filter ? 'WHERE t1.username LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
170 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
171 | 171 | |
172 | 172 | $sql = $modx->db->query('SELECT t1.*, t1.username AS name, t2.blocked |
173 | - FROM ' . $modx->getFullTableName('manager_users') . ' AS t1 |
|
174 | - LEFT JOIN ' . $modx->getFullTableName('user_attributes') . ' AS t2 ON t1.id=t2.internalKey |
|
175 | - ' . $sqlLike . ' |
|
173 | + FROM ' . $modx->getFullTableName('manager_users').' AS t1 |
|
174 | + LEFT JOIN ' . $modx->getFullTableName('user_attributes').' AS t2 ON t1.id=t2.internalKey |
|
175 | + ' . $sqlLike.' |
|
176 | 176 | ORDER BY t1.username ASC |
177 | 177 | ' . $sqlLimit); |
178 | 178 | |
179 | 179 | if ($modx->hasPermission('new_user')) { |
180 | - $output .= '<li><a id="a_11" href="index.php?a=11" target="main"><i class="fa fa-plus"></i>' . $_lang['new_user'] . '</a></li>'; |
|
180 | + $output .= '<li><a id="a_11" href="index.php?a=11" target="main"><i class="fa fa-plus"></i>'.$_lang['new_user'].'</a></li>'; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | if ($count = $modx->db->getRecordCount($sql)) { |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
186 | 186 | } |
187 | 187 | while ($row = $modx->db->getRow($sql)) { |
188 | - $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>'; |
|
188 | + $items .= '<li class="item '.($row['blocked'] ? 'disabled' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main">'.$row['name'].' <small>('.$row['id'].')</small></a></li>'; |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
@@ -205,18 +205,18 @@ discard block |
||
205 | 205 | $output = ''; |
206 | 206 | $items = ''; |
207 | 207 | $filter = !empty($_REQUEST['filter']) && is_scalar($_REQUEST['filter']) ? addcslashes(trim($_REQUEST['filter']), '\%*_') : ''; |
208 | - $sqlLike = $filter ? 'WHERE t1.username LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
|
209 | - $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
|
208 | + $sqlLike = $filter ? 'WHERE t1.username LIKE "'.$modx->db->escape($filter).'%"' : ''; |
|
209 | + $sqlLimit = $sqlLike ? '' : 'LIMIT '.$limit; |
|
210 | 210 | |
211 | 211 | $sql = $modx->db->query('SELECT t1.*, t1.username AS name, t2.blocked |
212 | - FROM ' . $modx->getFullTableName('web_users') . ' AS t1 |
|
213 | - LEFT JOIN ' . $modx->getFullTableName('web_user_attributes') . ' AS t2 ON t1.id=t2.internalKey |
|
214 | - ' . $sqlLike . ' |
|
212 | + FROM ' . $modx->getFullTableName('web_users').' AS t1 |
|
213 | + LEFT JOIN ' . $modx->getFullTableName('web_user_attributes').' AS t2 ON t1.id=t2.internalKey |
|
214 | + ' . $sqlLike.' |
|
215 | 215 | ORDER BY t1.username ASC |
216 | 216 | ' . $sqlLimit); |
217 | 217 | |
218 | 218 | if ($modx->hasPermission('new_web_user')) { |
219 | - $output .= '<li><a id="a_87" href="index.php?a=87" target="main"><i class="fa fa-plus"></i>' . $_lang['new_web_user'] . '</a></li>'; |
|
219 | + $output .= '<li><a id="a_87" href="index.php?a=87" target="main"><i class="fa fa-plus"></i>'.$_lang['new_web_user'].'</a></li>'; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | if ($count = $modx->db->getRecordCount($sql)) { |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
225 | 225 | } |
226 | 226 | while ($row = $modx->db->getRow($sql)) { |
227 | - $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>'; |
|
227 | + $items .= '<li class="item '.($row['blocked'] ? 'disabled' : '').'"><a id="a_'.$a.'__id_'.$row['id'].'" href="index.php?a='.$a.'&id='.$row['id'].'" target="main">'.$row['name'].' <small>('.$row['id'].')</small></a></li>'; |
|
228 | 228 | } |
229 | 229 | } |
230 | 230 | |
@@ -250,35 +250,35 @@ discard block |
||
250 | 250 | case 'SnippetNoCache': { |
251 | 251 | |
252 | 252 | $sql = $modx->db->query('SELECT * |
253 | - FROM ' . $modx->getFullTableName('site_snippets') . ' |
|
254 | - WHERE name="' . $name . '" |
|
253 | + FROM ' . $modx->getFullTableName('site_snippets').' |
|
254 | + WHERE name="' . $name.'" |
|
255 | 255 | LIMIT 1'); |
256 | 256 | |
257 | 257 | if ($modx->db->getRecordCount($sql)) { |
258 | 258 | $row = $modx->db->getRow($sql); |
259 | 259 | $contextmenu = array( |
260 | 260 | 'header' => array( |
261 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $row['name'] |
|
261 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$row['name'] |
|
262 | 262 | ), |
263 | 263 | 'item' => array( |
264 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
265 | - 'url' => "index.php?a=22&id=" . $row['id'] |
|
264 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
265 | + 'url' => "index.php?a=22&id=".$row['id'] |
|
266 | 266 | ) |
267 | 267 | ); |
268 | 268 | if (!empty($row['description'])) { |
269 | 269 | $contextmenu['seperator'] = ''; |
270 | 270 | $contextmenu['description'] = array( |
271 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
271 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
272 | 272 | ); |
273 | 273 | } |
274 | 274 | } else { |
275 | 275 | $contextmenu = array( |
276 | 276 | 'header' => array( |
277 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $name |
|
277 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$name |
|
278 | 278 | ), |
279 | 279 | 'item' => array( |
280 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_snippet'], |
|
281 | - 'url' => "index.php?a=23&itemname=" . $name |
|
280 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_snippet'], |
|
281 | + 'url' => "index.php?a=23&itemname=".$name |
|
282 | 282 | ) |
283 | 283 | ); |
284 | 284 | } |
@@ -288,35 +288,35 @@ discard block |
||
288 | 288 | case 'Chunk' : { |
289 | 289 | |
290 | 290 | $sql = $modx->db->query('SELECT * |
291 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' |
|
292 | - WHERE name="' . $name . '" |
|
291 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' |
|
292 | + WHERE name="' . $name.'" |
|
293 | 293 | LIMIT 1'); |
294 | 294 | |
295 | 295 | if ($modx->db->getRecordCount($sql)) { |
296 | 296 | $row = $modx->db->getRow($sql); |
297 | 297 | $contextmenu = array( |
298 | 298 | 'header' => array( |
299 | - 'innerHTML' => '<i class="fa fa-th-large"></i> ' . $row['name'] |
|
299 | + 'innerHTML' => '<i class="fa fa-th-large"></i> '.$row['name'] |
|
300 | 300 | ), |
301 | 301 | 'item' => array( |
302 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
303 | - 'url' => "index.php?a=78&id=" . $row['id'] |
|
302 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
303 | + 'url' => "index.php?a=78&id=".$row['id'] |
|
304 | 304 | ) |
305 | 305 | ); |
306 | 306 | if (!empty($row['description'])) { |
307 | 307 | $contextmenu['seperator'] = ''; |
308 | 308 | $contextmenu['description'] = array( |
309 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
309 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
310 | 310 | ); |
311 | 311 | } |
312 | 312 | } else { |
313 | 313 | $contextmenu = array( |
314 | 314 | 'header' => array( |
315 | - 'innerHTML' => '<i class="fa fa-th-large"></i> ' . $name |
|
315 | + 'innerHTML' => '<i class="fa fa-th-large"></i> '.$name |
|
316 | 316 | ), |
317 | 317 | 'item' => array( |
318 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_htmlsnippet'], |
|
319 | - 'url' => "index.php?a=77&itemname=" . $name |
|
318 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_htmlsnippet'], |
|
319 | + 'url' => "index.php?a=77&itemname=".$name |
|
320 | 320 | ) |
321 | 321 | ); |
322 | 322 | } |
@@ -325,8 +325,8 @@ discard block |
||
325 | 325 | } |
326 | 326 | case 'AttributeValue': { |
327 | 327 | $sql = $modx->db->query('SELECT * |
328 | - FROM ' . $modx->getFullTableName('site_htmlsnippets') . ' |
|
329 | - WHERE name="' . $name . '" |
|
328 | + FROM ' . $modx->getFullTableName('site_htmlsnippets').' |
|
329 | + WHERE name="' . $name.'" |
|
330 | 330 | LIMIT 1'); |
331 | 331 | |
332 | 332 | if ($modx->db->getRecordCount($sql)) { |
@@ -336,52 +336,52 @@ discard block |
||
336 | 336 | 'innerText' => $row['name'] |
337 | 337 | ), |
338 | 338 | 'item' => array( |
339 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
340 | - 'url' => "index.php?a=78&id=" . $row['id'] |
|
339 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
340 | + 'url' => "index.php?a=78&id=".$row['id'] |
|
341 | 341 | ) |
342 | 342 | ); |
343 | 343 | if (!empty($row['description'])) { |
344 | 344 | $contextmenu['seperator'] = ''; |
345 | 345 | $contextmenu['description'] = array( |
346 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
346 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
347 | 347 | ); |
348 | 348 | } |
349 | 349 | } else { |
350 | 350 | |
351 | 351 | $sql = $modx->db->query('SELECT * |
352 | - FROM ' . $modx->getFullTableName('site_snippets') . ' |
|
353 | - WHERE name="' . $name . '" |
|
352 | + FROM ' . $modx->getFullTableName('site_snippets').' |
|
353 | + WHERE name="' . $name.'" |
|
354 | 354 | LIMIT 1'); |
355 | 355 | |
356 | 356 | if ($modx->db->getRecordCount($sql)) { |
357 | 357 | $row = $modx->db->getRow($sql); |
358 | 358 | $contextmenu = array( |
359 | 359 | 'header' => array( |
360 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $row['name'] |
|
360 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$row['name'] |
|
361 | 361 | ), |
362 | 362 | 'item' => array( |
363 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
364 | - 'url' => "index.php?a=22&id=" . $row['id'] |
|
363 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
364 | + 'url' => "index.php?a=22&id=".$row['id'] |
|
365 | 365 | ) |
366 | 366 | ); |
367 | 367 | if (!empty($row['description'])) { |
368 | 368 | $contextmenu['seperator'] = ''; |
369 | 369 | $contextmenu['description'] = array( |
370 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
370 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
371 | 371 | ); |
372 | 372 | } |
373 | 373 | } else { |
374 | 374 | $contextmenu = array( |
375 | 375 | 'header' => array( |
376 | - 'innerHTML' => '<i class="fa fa-code"></i> ' . $name |
|
376 | + 'innerHTML' => '<i class="fa fa-code"></i> '.$name |
|
377 | 377 | ), |
378 | 378 | 'item' => array( |
379 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_htmlsnippet'], |
|
380 | - 'url' => "index.php?a=77&itemname=" . $name |
|
379 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_htmlsnippet'], |
|
380 | + 'url' => "index.php?a=77&itemname=".$name |
|
381 | 381 | ), |
382 | 382 | 'item2' => array( |
383 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_snippet'], |
|
384 | - 'url' => "index.php?a=23&itemname=" . $name |
|
383 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_snippet'], |
|
384 | + 'url' => "index.php?a=23&itemname=".$name |
|
385 | 385 | ) |
386 | 386 | ); |
387 | 387 | } |
@@ -437,35 +437,35 @@ discard block |
||
437 | 437 | } |
438 | 438 | |
439 | 439 | $sql = $modx->db->query('SELECT * |
440 | - FROM ' . $modx->getFullTableName('site_tmplvars') . ' |
|
441 | - WHERE name="' . $name . '" |
|
440 | + FROM ' . $modx->getFullTableName('site_tmplvars').' |
|
441 | + WHERE name="' . $name.'" |
|
442 | 442 | LIMIT 1'); |
443 | 443 | |
444 | 444 | if ($modx->db->getRecordCount($sql)) { |
445 | 445 | $row = $modx->db->getRow($sql); |
446 | 446 | $contextmenu = array( |
447 | 447 | 'header' => array( |
448 | - 'innerHTML' => '<i class="fa fa-list-alt"></i> ' . $row['name'] |
|
448 | + 'innerHTML' => '<i class="fa fa-list-alt"></i> '.$row['name'] |
|
449 | 449 | ), |
450 | 450 | 'item' => array( |
451 | - 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> ' . $_lang['edit'], |
|
452 | - 'url' => "index.php?a=301&id=" . $row['id'] |
|
451 | + 'innerHTML' => '<i class="fa fa-pencil-square-o"></i> '.$_lang['edit'], |
|
452 | + 'url' => "index.php?a=301&id=".$row['id'] |
|
453 | 453 | ) |
454 | 454 | ); |
455 | 455 | if (!empty($row['description'])) { |
456 | 456 | $contextmenu['seperator'] = ''; |
457 | 457 | $contextmenu['description'] = array( |
458 | - 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
|
458 | + 'innerHTML' => '<i class="fa fa-info"></i> '.$row['description'] |
|
459 | 459 | ); |
460 | 460 | } |
461 | 461 | } else { |
462 | 462 | $contextmenu = array( |
463 | 463 | 'header' => array( |
464 | - 'innerHTML' => '<i class="fa fa-list-alt"></i> ' . $name |
|
464 | + 'innerHTML' => '<i class="fa fa-list-alt"></i> '.$name |
|
465 | 465 | ), |
466 | 466 | 'item' => array( |
467 | - 'innerHTML' => '<i class="fa fa-plus"></i> ' . $_lang['new_tmplvars'], |
|
468 | - 'url' => "index.php?a=300&itemname=" . $name |
|
467 | + 'innerHTML' => '<i class="fa fa-plus"></i> '.$_lang['new_tmplvars'], |
|
468 | + 'url' => "index.php?a=300&itemname=".$name |
|
469 | 469 | ) |
470 | 470 | ); |
471 | 471 | } |
@@ -484,15 +484,15 @@ discard block |
||
484 | 484 | $json = array(); |
485 | 485 | |
486 | 486 | if ($modx->hasPermission('new_document') && $modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { |
487 | - $id = !empty($_REQUEST['id']) ? (int)$_REQUEST['id'] : ''; |
|
488 | - $parent = isset($_REQUEST['parent']) ? (int)$_REQUEST['parent'] : 0; |
|
487 | + $id = !empty($_REQUEST['id']) ? (int) $_REQUEST['id'] : ''; |
|
488 | + $parent = isset($_REQUEST['parent']) ? (int) $_REQUEST['parent'] : 0; |
|
489 | 489 | $menuindex = isset($_REQUEST['menuindex']) && is_scalar($_REQUEST['menuindex']) ? $_REQUEST['menuindex'] : 0; |
490 | 490 | |
491 | 491 | // set parent |
492 | 492 | if ($id && $parent >= 0) { |
493 | 493 | |
494 | 494 | // find older parent |
495 | - $parentOld = $modx->db->getValue($modx->db->select('parent', $modx->getFullTableName('site_content'), 'id=' . $id)); |
|
495 | + $parentOld = $modx->db->getValue($modx->db->select('parent', $modx->getFullTableName('site_content'), 'id='.$id)); |
|
496 | 496 | |
497 | 497 | $eventOut = $modx->invokeEvent('onBeforeMoveDocument', [ |
498 | 498 | 'id_document' => $id, |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | if (empty($json['errors'])) { |
514 | 514 | // check privileges user for move docs |
515 | 515 | if (!empty($modx->config['tree_show_protected']) && $role != 1) { |
516 | - $sql = $modx->db->select('*', $modx->getFullTableName('document_groups'), 'document IN(' . $id . ',' . $parent . ',' . $parentOld . ')'); |
|
516 | + $sql = $modx->db->select('*', $modx->getFullTableName('document_groups'), 'document IN('.$id.','.$parent.','.$parentOld.')'); |
|
517 | 517 | if ($modx->db->getRecordCount($sql)) { |
518 | 518 | $document_groups = array(); |
519 | 519 | while ($row = $modx->db->getRow($sql)) { |
@@ -538,22 +538,22 @@ discard block |
||
538 | 538 | // set new parent |
539 | 539 | $modx->db->update(array( |
540 | 540 | 'parent' => $parent |
541 | - ), $modx->getFullTableName('site_content'), 'id=' . $id); |
|
541 | + ), $modx->getFullTableName('site_content'), 'id='.$id); |
|
542 | 542 | // set parent isfolder = 1 |
543 | 543 | $modx->db->update(array( |
544 | 544 | 'isfolder' => 1 |
545 | - ), $modx->getFullTableName('site_content'), 'id=' . $parent); |
|
545 | + ), $modx->getFullTableName('site_content'), 'id='.$parent); |
|
546 | 546 | |
547 | 547 | if ($parent != $parentOld) { |
548 | 548 | // check children docs and set parent isfolder |
549 | - if ($modx->db->getRecordCount($modx->db->select('id', $modx->getFullTableName('site_content'), 'parent=' . $parentOld))) { |
|
549 | + if ($modx->db->getRecordCount($modx->db->select('id', $modx->getFullTableName('site_content'), 'parent='.$parentOld))) { |
|
550 | 550 | $modx->db->update(array( |
551 | 551 | 'isfolder' => 1 |
552 | - ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
|
552 | + ), $modx->getFullTableName('site_content'), 'id='.$parentOld); |
|
553 | 553 | } else { |
554 | 554 | $modx->db->update(array( |
555 | 555 | 'isfolder' => 0 |
556 | - ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
|
556 | + ), $modx->getFullTableName('site_content'), 'id='.$parentOld); |
|
557 | 557 | } |
558 | 558 | } |
559 | 559 | |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | if (!empty($menuindex)) { |
562 | 562 | $menuindex = explode(',', $menuindex); |
563 | 563 | foreach ($menuindex as $key => $value) { |
564 | - $modx->db->query('UPDATE ' . $modx->getFullTableName('site_content') . ' SET menuindex=' . $key . ' WHERE id=' . $value); |
|
564 | + $modx->db->query('UPDATE '.$modx->getFullTableName('site_content').' SET menuindex='.$key.' WHERE id='.$value); |
|
565 | 565 | } |
566 | 566 | } else { |
567 | 567 | // TODO: max(*) menuindex |
@@ -590,19 +590,19 @@ discard block |
||
590 | 590 | } |
591 | 591 | |
592 | 592 | case 'getLockedElements': { |
593 | - $type = isset($_REQUEST['type']) ? (int)$_REQUEST['type'] : 0; |
|
594 | - $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0; |
|
593 | + $type = isset($_REQUEST['type']) ? (int) $_REQUEST['type'] : 0; |
|
594 | + $id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; |
|
595 | 595 | |
596 | 596 | $output = !!$modx->elementIsLocked($type, $id, true); |
597 | 597 | |
598 | 598 | if (!$output) { |
599 | 599 | $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : ''; |
600 | - $docgrp_cond = $docgrp ? ' OR dg.document_group IN (' . $docgrp . ')' : ''; |
|
600 | + $docgrp_cond = $docgrp ? ' OR dg.document_group IN ('.$docgrp.')' : ''; |
|
601 | 601 | $sql = ' |
602 | - SELECT MAX(IF(1=' . $role . ' OR sc.privatemgr=0' . $docgrp_cond . ', 0, 1)) AS locked |
|
603 | - FROM ' . $modx->getFullTableName('site_content') . ' AS sc |
|
604 | - LEFT JOIN ' . $modx->getFullTableName('document_groups') . ' dg ON dg.document=sc.id |
|
605 | - WHERE sc.id=' . $id . ' GROUP BY sc.id'; |
|
602 | + SELECT MAX(IF(1=' . $role.' OR sc.privatemgr=0'.$docgrp_cond.', 0, 1)) AS locked |
|
603 | + FROM ' . $modx->getFullTableName('site_content').' AS sc |
|
604 | + LEFT JOIN ' . $modx->getFullTableName('document_groups').' dg ON dg.document=sc.id |
|
605 | + WHERE sc.id=' . $id.' GROUP BY sc.id'; |
|
606 | 606 | $sql = $modx->db->query($sql); |
607 | 607 | if ($modx->db->getRecordCount($sql)) { |
608 | 608 | $row = $modx->db->getRow($sql); |
@@ -7,11 +7,11 @@ discard block |
||
7 | 7 | |
8 | 8 | $modx->db->connect(); |
9 | 9 | |
10 | -if (empty ($modx->config)) { |
|
10 | +if (empty ($modx->config)) { |
|
11 | 11 | $modx->getSettings(); |
12 | 12 | } |
13 | 13 | |
14 | -if (!isset($_SESSION['mgrValidated']) || !isset($_SERVER['HTTP_X_REQUESTED_WITH']) || (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') || ($_SERVER['REQUEST_METHOD'] != 'POST')) { |
|
14 | +if (!isset($_SESSION['mgrValidated']) || !isset($_SERVER['HTTP_X_REQUESTED_WITH']) || (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != 'xmlhttprequest') || ($_SERVER['REQUEST_METHOD'] != 'POST')) { |
|
15 | 15 | $modx->sendErrorPage(); |
16 | 16 | } |
17 | 17 | |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | $_lang = array(); |
22 | 22 | include_once MODX_MANAGER_PATH . '/includes/lang/english.inc.php'; |
23 | -if ($modx->config['manager_language'] != 'english') { |
|
23 | +if ($modx->config['manager_language'] != 'english') { |
|
24 | 24 | include_once MODX_MANAGER_PATH . '/includes/lang/' . $modx->config['manager_language'] . '.inc.php'; |
25 | 25 | } |
26 | 26 | include_once MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/style.php'; |
@@ -33,12 +33,12 @@ discard block |
||
33 | 33 | // set limit sql query |
34 | 34 | $limit = !empty($modx->config['number_of_results']) ? (int) $modx->config['number_of_results'] : 100; |
35 | 35 | |
36 | -if (isset($action)) { |
|
37 | - switch ($action) { |
|
36 | +if (isset($action)) { |
|
37 | + switch ($action) { |
|
38 | 38 | |
39 | 39 | case '1': { |
40 | 40 | |
41 | - switch ($frame) { |
|
41 | + switch ($frame) { |
|
42 | 42 | case 'nodes': |
43 | 43 | include_once MODX_MANAGER_PATH . '/frames/nodes.php'; |
44 | 44 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | $elements = isset($_REQUEST['elements']) && is_scalar($_REQUEST['elements']) ? htmlentities($_REQUEST['elements']) : ''; |
54 | 54 | |
55 | - if ($elements) { |
|
55 | + if ($elements) { |
|
56 | 56 | $output = ''; |
57 | 57 | $items = ''; |
58 | 58 | $sql = ''; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $sqlLike = $filter ? 'WHERE t1.name LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
62 | 62 | $sqlLimit = $sqlLike ? '' : 'LIMIT ' . $limit; |
63 | 63 | |
64 | - switch ($elements) { |
|
64 | + switch ($elements) { |
|
65 | 65 | case 'element_templates': |
66 | 66 | $a = 16; |
67 | 67 | $sqlLike = $filter ? 'WHERE t1.templatename LIKE "' . $modx->db->escape($filter) . '%"' : ''; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | ORDER BY t1.templatename ASC |
72 | 72 | ' . $sqlLimit); |
73 | 73 | |
74 | - if ($modx->hasPermission('new_template')) { |
|
74 | + if ($modx->hasPermission('new_template')) { |
|
75 | 75 | $output .= '<li><a id="a_19" href="index.php?a=19" target="main"><i class="fa fa-plus"></i>' . $_lang['new_template'] . '</a></li>'; |
76 | 76 | } |
77 | 77 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | ORDER BY t1.name ASC |
88 | 88 | ' . $sqlLimit); |
89 | 89 | |
90 | - if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) { |
|
90 | + if ($modx->hasPermission('edit_template') && $modx->hasPermission('edit_snippet') && $modx->hasPermission('edit_chunk') && $modx->hasPermission('edit_plugin')) { |
|
91 | 91 | $output .= '<li><a id="a_300" href="index.php?a=300" target="main"><i class="fa fa-plus"></i>' . $_lang['new_tmplvars'] . '</a></li>'; |
92 | 92 | } |
93 | 93 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | ORDER BY t1.name ASC |
102 | 102 | ' . $sqlLimit); |
103 | 103 | |
104 | - if ($modx->hasPermission('new_chunk')) { |
|
104 | + if ($modx->hasPermission('new_chunk')) { |
|
105 | 105 | $output .= '<li><a id="a_77" href="index.php?a=77" target="main"><i class="fa fa-plus"></i>' . $_lang['new_htmlsnippet'] . '</a></li>'; |
106 | 106 | } |
107 | 107 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | ORDER BY t1.name ASC |
116 | 116 | ' . $sqlLimit); |
117 | 117 | |
118 | - if ($modx->hasPermission('new_snippet')) { |
|
118 | + if ($modx->hasPermission('new_snippet')) { |
|
119 | 119 | $output .= '<li><a id="a_23" href="index.php?a=23" target="main"><i class="fa fa-plus"></i>' . $_lang['new_snippet'] . '</a></li>'; |
120 | 120 | } |
121 | 121 | |
@@ -129,19 +129,19 @@ discard block |
||
129 | 129 | ORDER BY t1.name ASC |
130 | 130 | ' . $sqlLimit); |
131 | 131 | |
132 | - if ($modx->hasPermission('new_plugin')) { |
|
132 | + if ($modx->hasPermission('new_plugin')) { |
|
133 | 133 | $output .= '<li><a id="a_101" href="index.php?a=101" target="main"><i class="fa fa-plus"></i>' . $_lang['new_plugin'] . '</a></li>'; |
134 | 134 | } |
135 | 135 | |
136 | 136 | break; |
137 | 137 | } |
138 | 138 | |
139 | - if ($count = $modx->db->getRecordCount($sql)) { |
|
140 | - if ($count == $limit) { |
|
139 | + if ($count = $modx->db->getRecordCount($sql)) { |
|
140 | + if ($count == $limit) { |
|
141 | 141 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
142 | 142 | } |
143 | - while ($row = $modx->db->getRow($sql)) { |
|
144 | - if (($row['disabled'] || $row['locked']) && $role != 1) { |
|
143 | + while ($row = $modx->db->getRow($sql)) { |
|
144 | + if (($row['disabled'] || $row['locked']) && $role != 1) { |
|
145 | 145 | continue; |
146 | 146 | } |
147 | 147 | |
@@ -149,9 +149,9 @@ discard block |
||
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
152 | - if (isset($_REQUEST['filter'])) { |
|
152 | + if (isset($_REQUEST['filter'])) { |
|
153 | 153 | $output = $items; |
154 | - } else { |
|
154 | + } else { |
|
155 | 155 | $output .= $items; |
156 | 156 | } |
157 | 157 | |
@@ -176,22 +176,22 @@ discard block |
||
176 | 176 | ORDER BY t1.username ASC |
177 | 177 | ' . $sqlLimit); |
178 | 178 | |
179 | - if ($modx->hasPermission('new_user')) { |
|
179 | + if ($modx->hasPermission('new_user')) { |
|
180 | 180 | $output .= '<li><a id="a_11" href="index.php?a=11" target="main"><i class="fa fa-plus"></i>' . $_lang['new_user'] . '</a></li>'; |
181 | 181 | } |
182 | 182 | |
183 | - if ($count = $modx->db->getRecordCount($sql)) { |
|
184 | - if ($count == $limit) { |
|
183 | + if ($count = $modx->db->getRecordCount($sql)) { |
|
184 | + if ($count == $limit) { |
|
185 | 185 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
186 | 186 | } |
187 | - while ($row = $modx->db->getRow($sql)) { |
|
187 | + while ($row = $modx->db->getRow($sql)) { |
|
188 | 188 | $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>'; |
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
192 | - if (isset($_REQUEST['filter'])) { |
|
192 | + if (isset($_REQUEST['filter'])) { |
|
193 | 193 | $output = $items; |
194 | - } else { |
|
194 | + } else { |
|
195 | 195 | $output .= $items; |
196 | 196 | } |
197 | 197 | |
@@ -215,22 +215,22 @@ discard block |
||
215 | 215 | ORDER BY t1.username ASC |
216 | 216 | ' . $sqlLimit); |
217 | 217 | |
218 | - if ($modx->hasPermission('new_web_user')) { |
|
218 | + if ($modx->hasPermission('new_web_user')) { |
|
219 | 219 | $output .= '<li><a id="a_87" href="index.php?a=87" target="main"><i class="fa fa-plus"></i>' . $_lang['new_web_user'] . '</a></li>'; |
220 | 220 | } |
221 | 221 | |
222 | - if ($count = $modx->db->getRecordCount($sql)) { |
|
223 | - if ($count == $limit) { |
|
222 | + if ($count = $modx->db->getRecordCount($sql)) { |
|
223 | + if ($count == $limit) { |
|
224 | 224 | $output .= '<li class="item-input"><input type="text" name="filter" class="dropdown-item form-control form-control-sm" autocomplete="off" /></li>'; |
225 | 225 | } |
226 | - while ($row = $modx->db->getRow($sql)) { |
|
226 | + while ($row = $modx->db->getRow($sql)) { |
|
227 | 227 | $items .= '<li class="item ' . ($row['blocked'] ? 'disabled' : '') . '"><a id="a_' . $a . '__id_' . $row['id'] . '" href="index.php?a=' . $a . '&id=' . $row['id'] . '" target="main">' . $row['name'] . ' <small>(' . $row['id'] . ')</small></a></li>'; |
228 | 228 | } |
229 | 229 | } |
230 | 230 | |
231 | - if (isset($_REQUEST['filter'])) { |
|
231 | + if (isset($_REQUEST['filter'])) { |
|
232 | 232 | $output = $items; |
233 | - } else { |
|
233 | + } else { |
|
234 | 234 | $output .= $items; |
235 | 235 | } |
236 | 236 | |
@@ -244,8 +244,8 @@ discard block |
||
244 | 244 | $type = isset($_REQUEST['type']) && is_scalar($_REQUEST['type']) ? $modx->db->escape($_REQUEST['type']) : false; |
245 | 245 | $contextmenu = ''; |
246 | 246 | |
247 | - if ($role && $name && $type) { |
|
248 | - switch ($type) { |
|
247 | + if ($role && $name && $type) { |
|
248 | + switch ($type) { |
|
249 | 249 | case 'Snippet': |
250 | 250 | case 'SnippetNoCache': { |
251 | 251 | |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | WHERE name="' . $name . '" |
255 | 255 | LIMIT 1'); |
256 | 256 | |
257 | - if ($modx->db->getRecordCount($sql)) { |
|
257 | + if ($modx->db->getRecordCount($sql)) { |
|
258 | 258 | $row = $modx->db->getRow($sql); |
259 | 259 | $contextmenu = array( |
260 | 260 | 'header' => array( |
@@ -265,13 +265,13 @@ discard block |
||
265 | 265 | 'url' => "index.php?a=22&id=" . $row['id'] |
266 | 266 | ) |
267 | 267 | ); |
268 | - if (!empty($row['description'])) { |
|
268 | + if (!empty($row['description'])) { |
|
269 | 269 | $contextmenu['seperator'] = ''; |
270 | 270 | $contextmenu['description'] = array( |
271 | 271 | 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
272 | 272 | ); |
273 | 273 | } |
274 | - } else { |
|
274 | + } else { |
|
275 | 275 | $contextmenu = array( |
276 | 276 | 'header' => array( |
277 | 277 | 'innerHTML' => '<i class="fa fa-code"></i> ' . $name |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | WHERE name="' . $name . '" |
293 | 293 | LIMIT 1'); |
294 | 294 | |
295 | - if ($modx->db->getRecordCount($sql)) { |
|
295 | + if ($modx->db->getRecordCount($sql)) { |
|
296 | 296 | $row = $modx->db->getRow($sql); |
297 | 297 | $contextmenu = array( |
298 | 298 | 'header' => array( |
@@ -303,13 +303,13 @@ discard block |
||
303 | 303 | 'url' => "index.php?a=78&id=" . $row['id'] |
304 | 304 | ) |
305 | 305 | ); |
306 | - if (!empty($row['description'])) { |
|
306 | + if (!empty($row['description'])) { |
|
307 | 307 | $contextmenu['seperator'] = ''; |
308 | 308 | $contextmenu['description'] = array( |
309 | 309 | 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
310 | 310 | ); |
311 | 311 | } |
312 | - } else { |
|
312 | + } else { |
|
313 | 313 | $contextmenu = array( |
314 | 314 | 'header' => array( |
315 | 315 | 'innerHTML' => '<i class="fa fa-th-large"></i> ' . $name |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | WHERE name="' . $name . '" |
330 | 330 | LIMIT 1'); |
331 | 331 | |
332 | - if ($modx->db->getRecordCount($sql)) { |
|
332 | + if ($modx->db->getRecordCount($sql)) { |
|
333 | 333 | $row = $modx->db->getRow($sql); |
334 | 334 | $contextmenu = array( |
335 | 335 | 'header' => array( |
@@ -340,20 +340,20 @@ discard block |
||
340 | 340 | 'url' => "index.php?a=78&id=" . $row['id'] |
341 | 341 | ) |
342 | 342 | ); |
343 | - if (!empty($row['description'])) { |
|
343 | + if (!empty($row['description'])) { |
|
344 | 344 | $contextmenu['seperator'] = ''; |
345 | 345 | $contextmenu['description'] = array( |
346 | 346 | 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
347 | 347 | ); |
348 | 348 | } |
349 | - } else { |
|
349 | + } else { |
|
350 | 350 | |
351 | 351 | $sql = $modx->db->query('SELECT * |
352 | 352 | FROM ' . $modx->getFullTableName('site_snippets') . ' |
353 | 353 | WHERE name="' . $name . '" |
354 | 354 | LIMIT 1'); |
355 | 355 | |
356 | - if ($modx->db->getRecordCount($sql)) { |
|
356 | + if ($modx->db->getRecordCount($sql)) { |
|
357 | 357 | $row = $modx->db->getRow($sql); |
358 | 358 | $contextmenu = array( |
359 | 359 | 'header' => array( |
@@ -364,13 +364,13 @@ discard block |
||
364 | 364 | 'url' => "index.php?a=22&id=" . $row['id'] |
365 | 365 | ) |
366 | 366 | ); |
367 | - if (!empty($row['description'])) { |
|
367 | + if (!empty($row['description'])) { |
|
368 | 368 | $contextmenu['seperator'] = ''; |
369 | 369 | $contextmenu['description'] = array( |
370 | 370 | 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
371 | 371 | ); |
372 | 372 | } |
373 | - } else { |
|
373 | + } else { |
|
374 | 374 | $contextmenu = array( |
375 | 375 | 'header' => array( |
376 | 376 | 'innerHTML' => '<i class="fa fa-code"></i> ' . $name |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | 'alias_visible' |
433 | 433 | ); |
434 | 434 | |
435 | - if (in_array($name, $default_field)) { |
|
435 | + if (in_array($name, $default_field)) { |
|
436 | 436 | return; |
437 | 437 | } |
438 | 438 | |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | WHERE name="' . $name . '" |
442 | 442 | LIMIT 1'); |
443 | 443 | |
444 | - if ($modx->db->getRecordCount($sql)) { |
|
444 | + if ($modx->db->getRecordCount($sql)) { |
|
445 | 445 | $row = $modx->db->getRow($sql); |
446 | 446 | $contextmenu = array( |
447 | 447 | 'header' => array( |
@@ -452,13 +452,13 @@ discard block |
||
452 | 452 | 'url' => "index.php?a=301&id=" . $row['id'] |
453 | 453 | ) |
454 | 454 | ); |
455 | - if (!empty($row['description'])) { |
|
455 | + if (!empty($row['description'])) { |
|
456 | 456 | $contextmenu['seperator'] = ''; |
457 | 457 | $contextmenu['description'] = array( |
458 | 458 | 'innerHTML' => '<i class="fa fa-info"></i> ' . $row['description'] |
459 | 459 | ); |
460 | 460 | } |
461 | - } else { |
|
461 | + } else { |
|
462 | 462 | $contextmenu = array( |
463 | 463 | 'header' => array( |
464 | 464 | 'innerHTML' => '<i class="fa fa-list-alt"></i> ' . $name |
@@ -483,13 +483,13 @@ discard block |
||
483 | 483 | case 'movedocument' : { |
484 | 484 | $json = array(); |
485 | 485 | |
486 | - if ($modx->hasPermission('new_document') && $modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { |
|
486 | + if ($modx->hasPermission('new_document') && $modx->hasPermission('edit_document') && $modx->hasPermission('save_document')) { |
|
487 | 487 | $id = !empty($_REQUEST['id']) ? (int)$_REQUEST['id'] : ''; |
488 | 488 | $parent = isset($_REQUEST['parent']) ? (int)$_REQUEST['parent'] : 0; |
489 | 489 | $menuindex = isset($_REQUEST['menuindex']) && is_scalar($_REQUEST['menuindex']) ? $_REQUEST['menuindex'] : 0; |
490 | 490 | |
491 | 491 | // set parent |
492 | - if ($id && $parent >= 0) { |
|
492 | + if ($id && $parent >= 0) { |
|
493 | 493 | |
494 | 494 | // find older parent |
495 | 495 | $parentOld = $modx->db->getValue($modx->db->select('parent', $modx->getFullTableName('site_content'), 'id=' . $id)); |
@@ -500,31 +500,31 @@ discard block |
||
500 | 500 | 'new_parent' => $parent, |
501 | 501 | ]); |
502 | 502 | |
503 | - if (is_array($eventOut) && count($eventOut) > 0) { |
|
503 | + if (is_array($eventOut) && count($eventOut) > 0) { |
|
504 | 504 | $eventParent = array_pop($eventOut); |
505 | 505 | |
506 | - if ($eventParent == $parentOld) { |
|
506 | + if ($eventParent == $parentOld) { |
|
507 | 507 | $json['errors'] = $_lang['error_movedocument2']; |
508 | - } else { |
|
508 | + } else { |
|
509 | 509 | $parent = $eventParent; |
510 | 510 | } |
511 | 511 | } |
512 | 512 | |
513 | - if (empty($json['errors'])) { |
|
513 | + if (empty($json['errors'])) { |
|
514 | 514 | // check privileges user for move docs |
515 | - if (!empty($modx->config['tree_show_protected']) && $role != 1) { |
|
515 | + if (!empty($modx->config['tree_show_protected']) && $role != 1) { |
|
516 | 516 | $sql = $modx->db->select('*', $modx->getFullTableName('document_groups'), 'document IN(' . $id . ',' . $parent . ',' . $parentOld . ')'); |
517 | - if ($modx->db->getRecordCount($sql)) { |
|
517 | + if ($modx->db->getRecordCount($sql)) { |
|
518 | 518 | $document_groups = array(); |
519 | - while ($row = $modx->db->getRow($sql)) { |
|
519 | + while ($row = $modx->db->getRow($sql)) { |
|
520 | 520 | $document_groups[$row['document']]['groups'][] = $row['document_group']; |
521 | 521 | } |
522 | - foreach ($document_groups as $key => $value) { |
|
523 | - if (($key == $parent || $key == $parentOld || $key == $id) && !in_array($role, $value['groups'])) { |
|
522 | + foreach ($document_groups as $key => $value) { |
|
523 | + if (($key == $parent || $key == $parentOld || $key == $id) && !in_array($role, $value['groups'])) { |
|
524 | 524 | $json['errors'] = $_lang["error_no_privileges"]; |
525 | 525 | } |
526 | 526 | } |
527 | - if ($json['errors']) { |
|
527 | + if ($json['errors']) { |
|
528 | 528 | header('content-type: application/json'); |
529 | 529 | echo json_encode($json, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE); |
530 | 530 | break; |
@@ -532,9 +532,9 @@ discard block |
||
532 | 532 | } |
533 | 533 | } |
534 | 534 | |
535 | - if ($parent == 0 && $parent != $parentOld && !$modx->config['udperms_allowroot'] && $role != 1) { |
|
535 | + if ($parent == 0 && $parent != $parentOld && !$modx->config['udperms_allowroot'] && $role != 1) { |
|
536 | 536 | $json['errors'] = $_lang["error_no_privileges"]; |
537 | - } else { |
|
537 | + } else { |
|
538 | 538 | // set new parent |
539 | 539 | $modx->db->update(array( |
540 | 540 | 'parent' => $parent |
@@ -544,13 +544,13 @@ discard block |
||
544 | 544 | 'isfolder' => 1 |
545 | 545 | ), $modx->getFullTableName('site_content'), 'id=' . $parent); |
546 | 546 | |
547 | - if ($parent != $parentOld) { |
|
547 | + if ($parent != $parentOld) { |
|
548 | 548 | // check children docs and set parent isfolder |
549 | - if ($modx->db->getRecordCount($modx->db->select('id', $modx->getFullTableName('site_content'), 'parent=' . $parentOld))) { |
|
549 | + if ($modx->db->getRecordCount($modx->db->select('id', $modx->getFullTableName('site_content'), 'parent=' . $parentOld))) { |
|
550 | 550 | $modx->db->update(array( |
551 | 551 | 'isfolder' => 1 |
552 | 552 | ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
553 | - } else { |
|
553 | + } else { |
|
554 | 554 | $modx->db->update(array( |
555 | 555 | 'isfolder' => 0 |
556 | 556 | ), $modx->getFullTableName('site_content'), 'id=' . $parentOld); |
@@ -558,16 +558,16 @@ discard block |
||
558 | 558 | } |
559 | 559 | |
560 | 560 | // set menuindex |
561 | - if (!empty($menuindex)) { |
|
561 | + if (!empty($menuindex)) { |
|
562 | 562 | $menuindex = explode(',', $menuindex); |
563 | - foreach ($menuindex as $key => $value) { |
|
563 | + foreach ($menuindex as $key => $value) { |
|
564 | 564 | $modx->db->query('UPDATE ' . $modx->getFullTableName('site_content') . ' SET menuindex=' . $key . ' WHERE id=' . $value); |
565 | 565 | } |
566 | - } else { |
|
566 | + } else { |
|
567 | 567 | // TODO: max(*) menuindex |
568 | 568 | } |
569 | 569 | |
570 | - if (!$json['errors']) { |
|
570 | + if (!$json['errors']) { |
|
571 | 571 | $json['success'] = $_lang["actioncomplete"]; |
572 | 572 | |
573 | 573 | $modx->invokeEvent('onAfterMoveDocument', [ |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | } |
580 | 580 | } |
581 | 581 | } |
582 | - } else { |
|
582 | + } else { |
|
583 | 583 | $json['errors'] = $_lang["error_no_privileges"]; |
584 | 584 | } |
585 | 585 | |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | |
596 | 596 | $output = !!$modx->elementIsLocked($type, $id, true); |
597 | 597 | |
598 | - if (!$output) { |
|
598 | + if (!$output) { |
|
599 | 599 | $docgrp = (isset($_SESSION['mgrDocgroups']) && is_array($_SESSION['mgrDocgroups'])) ? implode(',', $_SESSION['mgrDocgroups']) : ''; |
600 | 600 | $docgrp_cond = $docgrp ? ' OR dg.document_group IN (' . $docgrp . ')' : ''; |
601 | 601 | $sql = ' |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | LEFT JOIN ' . $modx->getFullTableName('document_groups') . ' dg ON dg.document=sc.id |
605 | 605 | WHERE sc.id=' . $id . ' GROUP BY sc.id'; |
606 | 606 | $sql = $modx->db->query($sql); |
607 | - if ($modx->db->getRecordCount($sql)) { |
|
607 | + if ($modx->db->getRecordCount($sql)) { |
|
608 | 608 | $row = $modx->db->getRow($sql); |
609 | 609 | $output = !!$row['locked']; |
610 | 610 | } |
@@ -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($_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 | ); |
@@ -8,19 +8,19 @@ discard block |
||
8 | 8 | * Version: 1.1 |
9 | 9 | * MODX version: 1.0.3 |
10 | 10 | */ |
11 | -$style_path = 'media/style/' . $modx->config['manager_theme'] . '/images/'; |
|
11 | +$style_path = 'media/style/'.$modx->config['manager_theme'].'/images/'; |
|
12 | 12 | $modx->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php'; |
13 | -if(!$modx->config['lang_code']) { |
|
13 | +if (!$modx->config['lang_code']) { |
|
14 | 14 | global $modx_lang_attribute; |
15 | 15 | $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute; |
16 | 16 | } |
17 | 17 | |
18 | -if($_GET['a'] == 2) { |
|
18 | +if ($_GET['a'] == 2) { |
|
19 | 19 | include_once('welcome.php'); |
20 | 20 | } |
21 | 21 | |
22 | 22 | // Favicon |
23 | -$_style['favicon'] = (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico'); |
|
23 | +$_style['favicon'] = (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.$modx->config['manager_theme'].'/images/favicon.ico'); |
|
24 | 24 | |
25 | 25 | //Main Menu |
26 | 26 | $_style['menu_search'] = '<i class="fa fa-search"></i>'; |
@@ -99,10 +99,10 @@ discard block |
||
99 | 99 | $_style['tree_page_word'] = "<i class='fa fa-file-word-o'></i>"; |
100 | 100 | $_style['tree_page_excel'] = "<i class='fa fa-file-excel-o'></i>"; |
101 | 101 | |
102 | -$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>";//$style_path.'tree/angle-down.png'; |
|
103 | -$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>";//$style_path.'tree/angle-right.png'; |
|
102 | +$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>"; //$style_path.'tree/angle-down.png'; |
|
103 | +$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>"; //$style_path.'tree/angle-right.png'; |
|
104 | 104 | $_style['tree_weblink'] = $style_path.'tree/link.png'; |
105 | -$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>";//$style_path.'icons/eye.png'; |
|
105 | +$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>"; //$style_path.'icons/eye.png'; |
|
106 | 106 | |
107 | 107 | $_style['tree_showtree'] = '<i class="fa fa-sitemap"></i>'; |
108 | 108 | $_style['tree_working'] = '<i class="fa fa-warning"></i>'; |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | $_style['icons_edit_document'] = $style_path.'icons/save.png'; |
138 | 138 | $_style['icons_delete_document'] = $style_path.'icons/trash.png'; |
139 | 139 | //locks |
140 | -$_style['icons_preview_resource'] = $style_path.'icons/eye.png';//$style_path.'icons/eye.png'; |
|
141 | -$_style['icons_secured'] = "<i class='fa fa-lock'></i>";//$style_path.'icons/lock.png'; |
|
140 | +$_style['icons_preview_resource'] = $style_path.'icons/eye.png'; //$style_path.'icons/eye.png'; |
|
141 | +$_style['icons_secured'] = "<i class='fa fa-lock'></i>"; //$style_path.'icons/lock.png'; |
|
142 | 142 | |
143 | 143 | //file manager icons |
144 | 144 | $_style['files_save'] = 'fa fa-floppy-o'; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $_style['icons_set_parent'] = $style_path.'icons/folder-open.png'; |
214 | 214 | |
215 | 215 | //modules |
216 | -$_style['icons_module'] = 'fa fa-cube'; |
|
216 | +$_style['icons_module'] = 'fa fa-cube'; |
|
217 | 217 | $_style['icons_modules'] = 'fa fa-cubes'; //$style_path.'icons/modules.png'; |
218 | 218 | $_style['icons_run'] = $style_path.'icons/play.png'; |
219 | 219 | |
@@ -273,57 +273,57 @@ discard block |
||
273 | 273 | $stay = isset($_REQUEST['stay']) ? $_REQUEST['stay'] : ''; |
274 | 274 | $addnew = 0; |
275 | 275 | $run = 0; |
276 | -switch($action) { |
|
276 | +switch ($action) { |
|
277 | 277 | case '3': |
278 | 278 | case '4': |
279 | 279 | case '27': |
280 | 280 | case '72': |
281 | - if($modx->hasPermission('new_document')) { |
|
281 | + if ($modx->hasPermission('new_document')) { |
|
282 | 282 | $addnew = 1; |
283 | 283 | } |
284 | 284 | break; |
285 | 285 | case '16': |
286 | 286 | case '19': |
287 | - if($modx->hasPermission('new_template')) { |
|
287 | + if ($modx->hasPermission('new_template')) { |
|
288 | 288 | $addnew = 1; |
289 | 289 | } |
290 | 290 | break; |
291 | 291 | case '300': |
292 | 292 | case '301': |
293 | - if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
293 | + if ($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
294 | 294 | $addnew = 1; |
295 | 295 | } |
296 | 296 | break; |
297 | 297 | case '77': |
298 | 298 | case '78': |
299 | - if($modx->hasPermission('new_chunk')) { |
|
299 | + if ($modx->hasPermission('new_chunk')) { |
|
300 | 300 | $addnew = 1; |
301 | 301 | } |
302 | 302 | break; |
303 | 303 | case '22': |
304 | 304 | case '23': |
305 | - if($modx->hasPermission('new_snippet')) { |
|
305 | + if ($modx->hasPermission('new_snippet')) { |
|
306 | 306 | $addnew = 1; |
307 | 307 | } |
308 | 308 | break; |
309 | 309 | case '101': |
310 | 310 | case '102': |
311 | - if($modx->hasPermission('new_plugin')) { |
|
311 | + if ($modx->hasPermission('new_plugin')) { |
|
312 | 312 | $addnew = 1; |
313 | 313 | } |
314 | 314 | break; |
315 | 315 | case '106': |
316 | 316 | case '107': |
317 | 317 | case '108': |
318 | - if($modx->hasPermission('new_module')) { |
|
318 | + if ($modx->hasPermission('new_module')) { |
|
319 | 319 | $addnew = 1; |
320 | 320 | } |
321 | - if($modx->hasPermission('exec_module')) { |
|
321 | + if ($modx->hasPermission('exec_module')) { |
|
322 | 322 | $run = 1; |
323 | 323 | } |
324 | 324 | break; |
325 | 325 | case '88': |
326 | - if($modx->hasPermission('new_web_user')) { |
|
326 | + if ($modx->hasPermission('new_web_user')) { |
|
327 | 327 | $addnew = 1; |
328 | 328 | } |
329 | 329 | break; |
@@ -337,30 +337,30 @@ discard block |
||
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();"> |
340 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
340 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
341 | 341 | </a> |
342 | 342 | <span class="btn btn-success plus dropdown-toggle"></span> |
343 | 343 | <select id="stay" name="stay"> |
344 | 344 | ' . ($addnew ? ' |
345 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
346 | - ' : '') . ' |
|
347 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
348 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
345 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
346 | + ' : '').' |
|
347 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
348 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
349 | 349 | </select> |
350 | 350 | </div>' . |
351 | 351 | ($addnew ? ' |
352 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
352 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
354 | 354 | </a> |
355 | - ' : '') . ' |
|
356 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
357 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
355 | + ' : '').' |
|
356 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
357 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
358 | 358 | </a> |
359 | 359 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
360 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
360 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
361 | 361 | </a> |
362 | 362 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
363 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
363 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
364 | 364 | </a> |
365 | 365 | </div> |
366 | 366 | </div>', |
@@ -368,22 +368,22 @@ discard block |
||
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();"> |
371 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
371 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
372 | 372 | </a> |
373 | 373 | <span class="btn btn-success plus dropdown-toggle"></span> |
374 | 374 | <select id="stay" name="stay"> |
375 | 375 | ' . ($addnew ? ' |
376 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
377 | - ' : '') . ' |
|
378 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
379 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
376 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
377 | + ' : '').' |
|
378 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
379 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
380 | 380 | </select> |
381 | 381 | </div> |
382 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
383 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
382 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
383 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
384 | 384 | </a> |
385 | 385 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
386 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
386 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
387 | 387 | </a> |
388 | 388 | </div> |
389 | 389 | </div>', |
@@ -391,86 +391,86 @@ discard block |
||
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();"> |
394 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
394 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
395 | 395 | </a> |
396 | 396 | <span class="btn btn-success plus dropdown-toggle"></span> |
397 | 397 | <select id="stay" name="stay"> |
398 | 398 | ' . ($addnew ? ' |
399 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
400 | - ' : '') . ' |
|
401 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
402 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
399 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
400 | + ' : '').' |
|
401 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
402 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
403 | 403 | </select> |
404 | 404 | </div> |
405 | 405 | ' . ($addnew ? ' |
406 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
406 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
408 | 408 | </a> |
409 | - ' : '') . ' |
|
410 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
411 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
409 | + ' : '').' |
|
410 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
411 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
412 | 412 | </a> |
413 | 413 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
414 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
414 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
415 | 415 | </a> |
416 | 416 | ' . ($run ? ' |
417 | - <a id="Button4" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.run();"> |
|
418 | - <i class="' . $_style["actions_run"] . '"></i><span>' . $_lang['run_module'] . '</span> |
|
417 | + <a id="Button4" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.run();"> |
|
418 | + <i class="' . $_style["actions_run"].'"></i><span>'.$_lang['run_module'].'</span> |
|
419 | 419 | </a> |
420 | - ' : '') . ' |
|
420 | + ' : '').' |
|
421 | 421 | </div> |
422 | 422 | </div>', |
423 | 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 | - <i class="' . $_style["actions_new"] . '"></i><span>' . $_lang['new_module'] . '</span> |
|
426 | + <i class="' . $_style["actions_new"].'"></i><span>'.$_lang['new_module'].'</span> |
|
427 | 427 | </a> |
428 | 428 | </div> |
429 | 429 | </div>' : ''), |
430 | 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 | - <i class="' . $_style["actions_close"] . '"></i><span>' . $_lang['close'] . '</span> |
|
433 | + <i class="' . $_style["actions_close"].'"></i><span>'.$_lang['close'].'</span> |
|
434 | 434 | </a> |
435 | 435 | </div> |
436 | 436 | </div>', |
437 | 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 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
440 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
441 | 441 | </a> |
442 | 442 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
443 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
443 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
444 | 444 | </a> |
445 | 445 | </div> |
446 | 446 | </div>', |
447 | 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 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
450 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
451 | 451 | </a> |
452 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
453 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
452 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
453 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
454 | 454 | </a> |
455 | 455 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
456 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
456 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
457 | 457 | </a> |
458 | 458 | </div> |
459 | 459 | </div>', |
460 | 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 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
463 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
464 | 464 | </a> |
465 | 465 | </div> |
466 | 466 | </div>', |
467 | 467 | 'canceldelete' => '<div id="actions"> |
468 | 468 | <div class="btn-group"> |
469 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
470 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
469 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
470 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
471 | 471 | </a> |
472 | 472 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
473 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
473 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
474 | 474 | </a> |
475 | 475 | </div> |
476 | 476 | </div>', |
@@ -480,33 +480,33 @@ discard block |
||
480 | 480 | <div class="btn-group">' . |
481 | 481 | ($addnew ? ' |
482 | 482 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
483 | - <i class="' . $_style["icons_new_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span> |
|
483 | + <i class="' . $_style["icons_new_document"].'"></i><span>'.$_lang['create_resource_here'].'</span> |
|
484 | 484 | </a> |
485 | 485 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.newlink();"> |
486 | - <i class="' . $_style["icons_new_weblink"] . '"></i><span>' . $_lang['create_weblink_here'] . '</span> |
|
486 | + <i class="' . $_style["icons_new_weblink"].'"></i><span>'.$_lang['create_weblink_here'].'</span> |
|
487 | 487 | </a> |
488 | - ' : '') . ' |
|
488 | + ' : '').' |
|
489 | 489 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.edit();"> |
490 | - <i class="' . $_style["actions_edit"] . '"></i><span>' . $_lang['edit'] . '</span> |
|
490 | + <i class="' . $_style["actions_edit"].'"></i><span>'.$_lang['edit'].'</span> |
|
491 | 491 | </a> |
492 | 492 | <a id="Button2" class="btn btn-secondary" href="javascript:;" onclick="actions.move();"> |
493 | - <i class="' . $_style["actions_move"] . '"></i><span>' . $_lang['move'] . '</span> |
|
493 | + <i class="' . $_style["actions_move"].'"></i><span>'.$_lang['move'].'</span> |
|
494 | 494 | </a> |
495 | 495 | <a id="Button6" class="btn btn-secondary" href="javascript:;" onclick="actions.duplicate();"> |
496 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
496 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
497 | 497 | </a> |
498 | 498 | <a id="Button3" class="btn btn-secondary" href="javascript:;" onclick="actions.delete();"> |
499 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
499 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
500 | 500 | </a> |
501 | 501 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
502 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
502 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
503 | 503 | </a> |
504 | 504 | </div> |
505 | 505 | </div>', |
506 | 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 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
509 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
510 | 510 | </a> |
511 | 511 | </div> |
512 | 512 | </div>', |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | */ |
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 | -if(!$modx->config['lang_code']) { |
|
13 | +if(!$modx->config['lang_code']) { |
|
14 | 14 | global $modx_lang_attribute; |
15 | 15 | $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute; |
16 | 16 | } |
17 | 17 | |
18 | -if($_GET['a'] == 2) { |
|
18 | +if($_GET['a'] == 2) { |
|
19 | 19 | include_once('welcome.php'); |
20 | 20 | } |
21 | 21 | |
@@ -262,68 +262,68 @@ discard block |
||
262 | 262 | |
263 | 263 | // actions buttons templates |
264 | 264 | $action = isset($_REQUEST['a']) ? $_REQUEST['a'] : ''; |
265 | -if (!empty($modx->config['global_tabs']) && !isset($_SESSION['stay'])) { |
|
265 | +if (!empty($modx->config['global_tabs']) && !isset($_SESSION['stay'])) { |
|
266 | 266 | $_REQUEST['stay'] = 2; |
267 | 267 | } |
268 | -if (isset($_REQUEST['stay'])) { |
|
268 | +if (isset($_REQUEST['stay'])) { |
|
269 | 269 | $_SESSION['stay'] = $_REQUEST['stay']; |
270 | -} else if (isset($_SESSION['stay'])) { |
|
270 | +} else if (isset($_SESSION['stay'])) { |
|
271 | 271 | $_REQUEST['stay'] = $_SESSION['stay']; |
272 | 272 | } |
273 | 273 | $stay = isset($_REQUEST['stay']) ? $_REQUEST['stay'] : ''; |
274 | 274 | $addnew = 0; |
275 | 275 | $run = 0; |
276 | -switch($action) { |
|
276 | +switch($action) { |
|
277 | 277 | case '3': |
278 | 278 | case '4': |
279 | 279 | case '27': |
280 | 280 | case '72': |
281 | - if($modx->hasPermission('new_document')) { |
|
281 | + if($modx->hasPermission('new_document')) { |
|
282 | 282 | $addnew = 1; |
283 | 283 | } |
284 | 284 | break; |
285 | 285 | case '16': |
286 | 286 | case '19': |
287 | - if($modx->hasPermission('new_template')) { |
|
287 | + if($modx->hasPermission('new_template')) { |
|
288 | 288 | $addnew = 1; |
289 | 289 | } |
290 | 290 | break; |
291 | 291 | case '300': |
292 | 292 | case '301': |
293 | - if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
293 | + if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
294 | 294 | $addnew = 1; |
295 | 295 | } |
296 | 296 | break; |
297 | 297 | case '77': |
298 | 298 | case '78': |
299 | - if($modx->hasPermission('new_chunk')) { |
|
299 | + if($modx->hasPermission('new_chunk')) { |
|
300 | 300 | $addnew = 1; |
301 | 301 | } |
302 | 302 | break; |
303 | 303 | case '22': |
304 | 304 | case '23': |
305 | - if($modx->hasPermission('new_snippet')) { |
|
305 | + if($modx->hasPermission('new_snippet')) { |
|
306 | 306 | $addnew = 1; |
307 | 307 | } |
308 | 308 | break; |
309 | 309 | case '101': |
310 | 310 | case '102': |
311 | - if($modx->hasPermission('new_plugin')) { |
|
311 | + if($modx->hasPermission('new_plugin')) { |
|
312 | 312 | $addnew = 1; |
313 | 313 | } |
314 | 314 | break; |
315 | 315 | case '106': |
316 | 316 | case '107': |
317 | 317 | case '108': |
318 | - if($modx->hasPermission('new_module')) { |
|
318 | + if($modx->hasPermission('new_module')) { |
|
319 | 319 | $addnew = 1; |
320 | 320 | } |
321 | - if($modx->hasPermission('exec_module')) { |
|
321 | + if($modx->hasPermission('exec_module')) { |
|
322 | 322 | $run = 1; |
323 | 323 | } |
324 | 324 | break; |
325 | 325 | case '88': |
326 | - if($modx->hasPermission('new_web_user')) { |
|
326 | + if($modx->hasPermission('new_web_user')) { |
|
327 | 327 | $addnew = 1; |
328 | 328 | } |
329 | 329 | break; |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | -class DATEPICKER { |
|
3 | - function __construct() { |
|
2 | +class DATEPICKER{ |
|
3 | + function __construct(){ |
|
4 | 4 | } |
5 | - function getDP() { |
|
6 | - global $modx,$_lang; |
|
5 | + function getDP(){ |
|
6 | + global $modx, $_lang; |
|
7 | 7 | |
8 | 8 | $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
9 | - return $modx->parseText($tpl,$_lang,'[%','%]'); |
|
9 | + return $modx->parseText($tpl, $_lang, '[%', '%]'); |
|
10 | 10 | } |
11 | 11 | } |
@@ -1,8 +1,11 @@ |
||
1 | 1 | <?php |
2 | -class DATEPICKER { |
|
3 | - function __construct() { |
|
2 | +class DATEPICKER |
|
3 | +{ |
|
4 | + function __construct() |
|
5 | + { |
|
4 | 6 | } |
5 | - function getDP() { |
|
7 | + function getDP() |
|
8 | + { |
|
6 | 9 | global $modx,$_lang; |
7 | 10 | |
8 | 11 | $tpl = file_get_contents(dirname(__FILE__).'/datepicker.tpl'); |
@@ -22,7 +22,8 @@ discard block |
||
22 | 22 | NOTE: http://www.w3.org/TR/NOTE-datetime |
23 | 23 | \*======================================================================*/ |
24 | 24 | |
25 | -function parse_w3cdtf ( $date_str ) { |
|
25 | +function parse_w3cdtf ( $date_str ) |
|
26 | +{ |
|
26 | 27 | |
27 | 28 | # regex to match wc3dtf |
28 | 29 | $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/"; |
@@ -37,8 +38,7 @@ discard block |
||
37 | 38 | $offset = 0; |
38 | 39 | if ( $match[10] == 'Z' ) { |
39 | 40 | # zulu time, aka GMT |
40 | - } |
|
41 | - else { |
|
41 | + } else { |
|
42 | 42 | list( $tz_mod, $tz_hour, $tz_min ) = |
43 | 43 | array( $match[8], $match[9], $match[10]); |
44 | 44 | |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | $epoch = $epoch + $offset; |
60 | 60 | return $epoch; |
61 | - } |
|
62 | - else { |
|
61 | + } else { |
|
63 | 62 | return -1; |
64 | 63 | } |
65 | 64 | } |
@@ -22,35 +22,35 @@ |
||
22 | 22 | NOTE: http://www.w3.org/TR/NOTE-datetime |
23 | 23 | \*======================================================================*/ |
24 | 24 | |
25 | -function parse_w3cdtf ( $date_str ) { |
|
25 | +function parse_w3cdtf($date_str){ |
|
26 | 26 | |
27 | 27 | # regex to match wc3dtf |
28 | 28 | $pat = "/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(:(\d{2}))?(?:([-+])(\d{2}):?(\d{2})|(Z))?/"; |
29 | 29 | |
30 | - if ( preg_match( $pat, $date_str, $match ) ) { |
|
31 | - list( $year, $month, $day, $hours, $minutes, $seconds) = |
|
32 | - array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6]); |
|
30 | + if (preg_match($pat, $date_str, $match)) { |
|
31 | + list($year, $month, $day, $hours, $minutes, $seconds) = |
|
32 | + array($match[1], $match[2], $match[3], $match[4], $match[5], $match[6]); |
|
33 | 33 | |
34 | 34 | # calc epoch for current date assuming GMT |
35 | - $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year); |
|
35 | + $epoch = gmmktime($hours, $minutes, $seconds, $month, $day, $year); |
|
36 | 36 | |
37 | 37 | $offset = 0; |
38 | - if ( $match[10] == 'Z' ) { |
|
38 | + if ($match[10] == 'Z') { |
|
39 | 39 | # zulu time, aka GMT |
40 | 40 | } |
41 | 41 | else { |
42 | - list( $tz_mod, $tz_hour, $tz_min ) = |
|
43 | - array( $match[8], $match[9], $match[10]); |
|
42 | + list($tz_mod, $tz_hour, $tz_min) = |
|
43 | + array($match[8], $match[9], $match[10]); |
|
44 | 44 | |
45 | 45 | # zero out the variables |
46 | - if ( ! $tz_hour ) { $tz_hour = 0; } |
|
47 | - if ( ! $tz_min ) { $tz_min = 0; } |
|
46 | + if (!$tz_hour) { $tz_hour = 0; } |
|
47 | + if (!$tz_min) { $tz_min = 0; } |
|
48 | 48 | |
49 | - $offset_secs = (($tz_hour*60)+$tz_min)*60; |
|
49 | + $offset_secs = (($tz_hour * 60) + $tz_min) * 60; |
|
50 | 50 | |
51 | 51 | # is timezone ahead of GMT? then subtract offset |
52 | 52 | # |
53 | - if ( $tz_mod == '+' ) { |
|
53 | + if ($tz_mod == '+') { |
|
54 | 54 | $offset_secs = $offset_secs * -1; |
55 | 55 | } |
56 | 56 |
@@ -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 = new \DocumentParser; |
|
145 | + include_once(MODX_MANAGER_PATH.'includes/document.parser.class.inc.php'); |
|
146 | + $modx = new \DocumentParser; |
|
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']) && intval($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 | // Now we decide what to do according to the action request. This is a BIG list :) |
@@ -279,714 +279,714 @@ discard block |
||
279 | 279 | /********************************************************************/ |
280 | 280 | /* frame management - show the requested frame */ |
281 | 281 | /********************************************************************/ |
282 | - case 1 : |
|
283 | - // get the requested frame |
|
284 | - $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
285 | - if($frame>9) { |
|
286 | - $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
287 | - } |
|
288 | - include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
289 | - break; |
|
282 | + case 1 : |
|
283 | + // get the requested frame |
|
284 | + $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
285 | + if($frame>9) { |
|
286 | + $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
287 | + } |
|
288 | + include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
289 | + break; |
|
290 | 290 | /********************************************************************/ |
291 | 291 | /* show the homepage */ |
292 | 292 | /********************************************************************/ |
293 | - case 2: |
|
294 | - // get the home page |
|
295 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
296 | - include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
297 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
298 | - break; |
|
293 | + case 2: |
|
294 | + // get the home page |
|
295 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
296 | + include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
297 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
298 | + break; |
|
299 | 299 | /********************************************************************/ |
300 | 300 | /* document data */ |
301 | 301 | /********************************************************************/ |
302 | - case 3: |
|
303 | - // get the page to show document's data |
|
304 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
305 | - include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
306 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
307 | - break; |
|
302 | + case 3: |
|
303 | + // get the page to show document's data |
|
304 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
305 | + include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
306 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
307 | + break; |
|
308 | 308 | /********************************************************************/ |
309 | 309 | /* content management */ |
310 | 310 | /********************************************************************/ |
311 | - case 85: |
|
312 | - // get the mutate page for adding a folder |
|
313 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
314 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
315 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
316 | - break; |
|
317 | - case 27: |
|
318 | - // get the mutate page for changing content |
|
319 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
320 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
321 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
322 | - break; |
|
323 | - case 4: |
|
324 | - // get the mutate page for adding content |
|
325 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
326 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
327 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
328 | - break; |
|
329 | - case 5: |
|
330 | - // get the save processor |
|
331 | - include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
332 | - break; |
|
333 | - case 6: |
|
334 | - // get the delete processor |
|
335 | - include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
336 | - break; |
|
337 | - case 63: |
|
338 | - // get the undelete processor |
|
339 | - include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
340 | - break; |
|
341 | - case 51: |
|
342 | - // get the move action |
|
343 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
344 | - include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
345 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
346 | - break; |
|
347 | - case 52: |
|
348 | - // get the move document processor |
|
349 | - include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
350 | - break; |
|
351 | - case 61: |
|
352 | - // get the processor for publishing content |
|
353 | - include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
354 | - break; |
|
355 | - case 62: |
|
356 | - // get the processor for publishing content |
|
357 | - include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
358 | - break; |
|
359 | - case 56: |
|
360 | - // get the sort menuindex action |
|
361 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
362 | - include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
363 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
364 | - break; |
|
311 | + case 85: |
|
312 | + // get the mutate page for adding a folder |
|
313 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
314 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
315 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
316 | + break; |
|
317 | + case 27: |
|
318 | + // get the mutate page for changing content |
|
319 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
320 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
321 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
322 | + break; |
|
323 | + case 4: |
|
324 | + // get the mutate page for adding content |
|
325 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
326 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
327 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
328 | + break; |
|
329 | + case 5: |
|
330 | + // get the save processor |
|
331 | + include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
332 | + break; |
|
333 | + case 6: |
|
334 | + // get the delete processor |
|
335 | + include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
336 | + break; |
|
337 | + case 63: |
|
338 | + // get the undelete processor |
|
339 | + include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
340 | + break; |
|
341 | + case 51: |
|
342 | + // get the move action |
|
343 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
344 | + include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
345 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
346 | + break; |
|
347 | + case 52: |
|
348 | + // get the move document processor |
|
349 | + include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
350 | + break; |
|
351 | + case 61: |
|
352 | + // get the processor for publishing content |
|
353 | + include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
354 | + break; |
|
355 | + case 62: |
|
356 | + // get the processor for publishing content |
|
357 | + include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
358 | + break; |
|
359 | + case 56: |
|
360 | + // get the sort menuindex action |
|
361 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
362 | + include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
363 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
364 | + break; |
|
365 | 365 | /********************************************************************/ |
366 | 366 | /* show the wait page - gives the tree time to refresh (hopefully) */ |
367 | 367 | /********************************************************************/ |
368 | - case 7: |
|
369 | - // get the wait page (so the tree can reload) |
|
370 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
371 | - include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
372 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
373 | - break; |
|
368 | + case 7: |
|
369 | + // get the wait page (so the tree can reload) |
|
370 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
371 | + include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
372 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
373 | + break; |
|
374 | 374 | /********************************************************************/ |
375 | 375 | /* let the user log out */ |
376 | 376 | /********************************************************************/ |
377 | - case 8: |
|
378 | - // get the logout processor |
|
379 | - include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
380 | - break; |
|
377 | + case 8: |
|
378 | + // get the logout processor |
|
379 | + include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
380 | + break; |
|
381 | 381 | /********************************************************************/ |
382 | 382 | /* user management */ |
383 | 383 | /********************************************************************/ |
384 | - case 87: |
|
385 | - // get the new web user page |
|
386 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
387 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
388 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
389 | - break; |
|
390 | - case 88: |
|
391 | - // get the edit web user page |
|
392 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
393 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
394 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
395 | - break; |
|
396 | - case 89: |
|
397 | - // get the save web user processor |
|
398 | - include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
399 | - break; |
|
400 | - case 90: |
|
401 | - // get the delete web user page |
|
402 | - include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
403 | - break; |
|
404 | - case 11: |
|
405 | - // get the new user page |
|
406 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
407 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
408 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
409 | - break; |
|
410 | - case 12: |
|
411 | - // get the edit user page |
|
412 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
413 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
414 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
415 | - break; |
|
416 | - case 32: |
|
417 | - // get the save user processor |
|
418 | - include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
419 | - break; |
|
420 | - case 28: |
|
421 | - // get the change password page |
|
422 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
423 | - include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
424 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
425 | - break; |
|
426 | - case 34: |
|
427 | - // get the save new password page |
|
428 | - include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
429 | - break; |
|
430 | - case 33: |
|
431 | - // get the delete user page |
|
432 | - include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
433 | - break; |
|
384 | + case 87: |
|
385 | + // get the new web user page |
|
386 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
387 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
388 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
389 | + break; |
|
390 | + case 88: |
|
391 | + // get the edit web user page |
|
392 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
393 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
394 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
395 | + break; |
|
396 | + case 89: |
|
397 | + // get the save web user processor |
|
398 | + include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
399 | + break; |
|
400 | + case 90: |
|
401 | + // get the delete web user page |
|
402 | + include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
403 | + break; |
|
404 | + case 11: |
|
405 | + // get the new user page |
|
406 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
407 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
408 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
409 | + break; |
|
410 | + case 12: |
|
411 | + // get the edit user page |
|
412 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
413 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
414 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
415 | + break; |
|
416 | + case 32: |
|
417 | + // get the save user processor |
|
418 | + include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
419 | + break; |
|
420 | + case 28: |
|
421 | + // get the change password page |
|
422 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
423 | + include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
424 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
425 | + break; |
|
426 | + case 34: |
|
427 | + // get the save new password page |
|
428 | + include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
429 | + break; |
|
430 | + case 33: |
|
431 | + // get the delete user page |
|
432 | + include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
433 | + break; |
|
434 | 434 | /********************************************************************/ |
435 | 435 | /* role management */ |
436 | 436 | /********************************************************************/ |
437 | - case 38: |
|
438 | - // get the new role page |
|
439 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
440 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
441 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
442 | - break; |
|
443 | - case 35: |
|
444 | - // get the edit role page |
|
445 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
446 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
447 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
448 | - break; |
|
449 | - case 36: |
|
450 | - // get the save role page |
|
451 | - include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
452 | - break; |
|
453 | - case 37: |
|
454 | - // get the delete role page |
|
455 | - include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
456 | - break; |
|
437 | + case 38: |
|
438 | + // get the new role page |
|
439 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
440 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
441 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
442 | + break; |
|
443 | + case 35: |
|
444 | + // get the edit role page |
|
445 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
446 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
447 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
448 | + break; |
|
449 | + case 36: |
|
450 | + // get the save role page |
|
451 | + include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
452 | + break; |
|
453 | + case 37: |
|
454 | + // get the delete role page |
|
455 | + include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
456 | + break; |
|
457 | 457 | /********************************************************************/ |
458 | 458 | /* category management */ |
459 | 459 | /********************************************************************/ |
460 | - case 120: |
|
461 | - // get the edit category page |
|
462 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
463 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
464 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
465 | - break; |
|
466 | - case 121: |
|
467 | - // for ajax-requests |
|
468 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
469 | - break; |
|
460 | + case 120: |
|
461 | + // get the edit category page |
|
462 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
463 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
464 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
465 | + break; |
|
466 | + case 121: |
|
467 | + // for ajax-requests |
|
468 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
469 | + break; |
|
470 | 470 | /********************************************************************/ |
471 | 471 | /* template management */ |
472 | 472 | /********************************************************************/ |
473 | - case 16: |
|
474 | - // get the edit template action |
|
475 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
476 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
477 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
478 | - break; |
|
479 | - case 19: |
|
480 | - // get the new template action |
|
481 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
482 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
483 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
484 | - break; |
|
485 | - case 20: |
|
486 | - // get the save processor |
|
487 | - include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
488 | - break; |
|
489 | - case 21: |
|
490 | - // get the delete processor |
|
491 | - include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
492 | - break; |
|
493 | - case 96: |
|
494 | - // get the duplicate template processor |
|
495 | - include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
496 | - break; |
|
497 | - case 117: |
|
498 | - // change the tv rank for selected template |
|
499 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
500 | - include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
501 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
502 | - break; |
|
473 | + case 16: |
|
474 | + // get the edit template action |
|
475 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
476 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
477 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
478 | + break; |
|
479 | + case 19: |
|
480 | + // get the new template action |
|
481 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
482 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
483 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
484 | + break; |
|
485 | + case 20: |
|
486 | + // get the save processor |
|
487 | + include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
488 | + break; |
|
489 | + case 21: |
|
490 | + // get the delete processor |
|
491 | + include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
492 | + break; |
|
493 | + case 96: |
|
494 | + // get the duplicate template processor |
|
495 | + include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
496 | + break; |
|
497 | + case 117: |
|
498 | + // change the tv rank for selected template |
|
499 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
500 | + include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
501 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
502 | + break; |
|
503 | 503 | /********************************************************************/ |
504 | 504 | /* snippet management */ |
505 | 505 | /********************************************************************/ |
506 | - case 22: |
|
507 | - // get the edit snippet action |
|
508 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
509 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
510 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
511 | - break; |
|
512 | - case 23: |
|
513 | - // get the new snippet action |
|
514 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
515 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
516 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
517 | - break; |
|
518 | - case 24: |
|
519 | - // get the save processor |
|
520 | - include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
521 | - break; |
|
522 | - case 25: |
|
523 | - // get the delete processor |
|
524 | - include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
525 | - break; |
|
526 | - case 98: |
|
527 | - // get the duplicate processor |
|
528 | - include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
529 | - break; |
|
506 | + case 22: |
|
507 | + // get the edit snippet action |
|
508 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
509 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
510 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
511 | + break; |
|
512 | + case 23: |
|
513 | + // get the new snippet action |
|
514 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
515 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
516 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
517 | + break; |
|
518 | + case 24: |
|
519 | + // get the save processor |
|
520 | + include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
521 | + break; |
|
522 | + case 25: |
|
523 | + // get the delete processor |
|
524 | + include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
525 | + break; |
|
526 | + case 98: |
|
527 | + // get the duplicate processor |
|
528 | + include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
529 | + break; |
|
530 | 530 | /********************************************************************/ |
531 | 531 | /* htmlsnippet management */ |
532 | 532 | /********************************************************************/ |
533 | - case 78: |
|
534 | - // get the edit snippet action |
|
535 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
536 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
537 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
538 | - break; |
|
539 | - case 77: |
|
540 | - // get the new snippet action |
|
541 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
542 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
543 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
544 | - break; |
|
545 | - case 79: |
|
546 | - // get the save processor |
|
547 | - include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
548 | - break; |
|
549 | - case 80: |
|
550 | - // get the delete processor |
|
551 | - include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
552 | - break; |
|
553 | - case 97: |
|
554 | - // get the duplicate processor |
|
555 | - include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
556 | - break; |
|
533 | + case 78: |
|
534 | + // get the edit snippet action |
|
535 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
536 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
537 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
538 | + break; |
|
539 | + case 77: |
|
540 | + // get the new snippet action |
|
541 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
542 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
543 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
544 | + break; |
|
545 | + case 79: |
|
546 | + // get the save processor |
|
547 | + include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
548 | + break; |
|
549 | + case 80: |
|
550 | + // get the delete processor |
|
551 | + include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
552 | + break; |
|
553 | + case 97: |
|
554 | + // get the duplicate processor |
|
555 | + include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
556 | + break; |
|
557 | 557 | /********************************************************************/ |
558 | 558 | /* show the credits page */ |
559 | 559 | /********************************************************************/ |
560 | - case 18: |
|
561 | - // get the credits page |
|
562 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
563 | - include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
564 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
565 | - break; |
|
560 | + case 18: |
|
561 | + // get the credits page |
|
562 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
563 | + include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
564 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
565 | + break; |
|
566 | 566 | /********************************************************************/ |
567 | 567 | /* empty cache & synchronisation */ |
568 | 568 | /********************************************************************/ |
569 | - case 26: |
|
570 | - // get the cache emptying processor |
|
571 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
572 | - include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
573 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
574 | - break; |
|
569 | + case 26: |
|
570 | + // get the cache emptying processor |
|
571 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
572 | + include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
573 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
574 | + break; |
|
575 | 575 | /********************************************************************/ |
576 | 576 | /* Module management */ |
577 | 577 | /********************************************************************/ |
578 | - case 106: |
|
579 | - // get module management |
|
580 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
581 | - include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
582 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
583 | - break; |
|
584 | - case 107: |
|
585 | - // get the new module action |
|
586 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
587 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
588 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
589 | - break; |
|
590 | - case 108: |
|
591 | - // get the edit module action |
|
592 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
593 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
594 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
595 | - break; |
|
596 | - case 109: |
|
597 | - // get the save processor |
|
598 | - include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
599 | - break; |
|
600 | - case 110: |
|
601 | - // get the delete processor |
|
602 | - include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
603 | - break; |
|
604 | - case 111: |
|
605 | - // get the duplicate processor |
|
606 | - include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
607 | - break; |
|
608 | - case 112: |
|
609 | - // execute/run the module |
|
610 | - //include_once "header.inc.php"; |
|
611 | - include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
612 | - //include_once "footer.inc.php"; |
|
613 | - break; |
|
614 | - case 113: |
|
615 | - // get the module resources (dependencies) action |
|
616 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
617 | - include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
618 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
619 | - break; |
|
578 | + case 106: |
|
579 | + // get module management |
|
580 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
581 | + include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
582 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
583 | + break; |
|
584 | + case 107: |
|
585 | + // get the new module action |
|
586 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
587 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
588 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
589 | + break; |
|
590 | + case 108: |
|
591 | + // get the edit module action |
|
592 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
593 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
594 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
595 | + break; |
|
596 | + case 109: |
|
597 | + // get the save processor |
|
598 | + include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
599 | + break; |
|
600 | + case 110: |
|
601 | + // get the delete processor |
|
602 | + include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
603 | + break; |
|
604 | + case 111: |
|
605 | + // get the duplicate processor |
|
606 | + include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
607 | + break; |
|
608 | + case 112: |
|
609 | + // execute/run the module |
|
610 | + //include_once "header.inc.php"; |
|
611 | + include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
612 | + //include_once "footer.inc.php"; |
|
613 | + break; |
|
614 | + case 113: |
|
615 | + // get the module resources (dependencies) action |
|
616 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
617 | + include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
618 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
619 | + break; |
|
620 | 620 | /********************************************************************/ |
621 | 621 | /* plugin management */ |
622 | 622 | /********************************************************************/ |
623 | - case 100: |
|
624 | - // change the plugin priority |
|
625 | - //include_once "header.inc.php"; - in action file |
|
626 | - include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
627 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
628 | - break; |
|
629 | - case 101: |
|
630 | - // get the new plugin action |
|
631 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
632 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
633 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
634 | - break; |
|
635 | - case 102: |
|
636 | - // get the edit plugin action |
|
637 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
638 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
639 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
640 | - break; |
|
641 | - case 103: |
|
642 | - // get the save processor |
|
643 | - include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
644 | - break; |
|
645 | - case 104: |
|
646 | - // get the delete processor |
|
647 | - include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
648 | - break; |
|
649 | - case 105: |
|
650 | - // get the duplicate processor |
|
651 | - include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
652 | - break; |
|
653 | - case 119: |
|
654 | - // get the purge processor |
|
655 | - include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
656 | - break; |
|
623 | + case 100: |
|
624 | + // change the plugin priority |
|
625 | + //include_once "header.inc.php"; - in action file |
|
626 | + include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
627 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
628 | + break; |
|
629 | + case 101: |
|
630 | + // get the new plugin action |
|
631 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
632 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
633 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
634 | + break; |
|
635 | + case 102: |
|
636 | + // get the edit plugin action |
|
637 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
638 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
639 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
640 | + break; |
|
641 | + case 103: |
|
642 | + // get the save processor |
|
643 | + include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
644 | + break; |
|
645 | + case 104: |
|
646 | + // get the delete processor |
|
647 | + include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
648 | + break; |
|
649 | + case 105: |
|
650 | + // get the duplicate processor |
|
651 | + include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
652 | + break; |
|
653 | + case 119: |
|
654 | + // get the purge processor |
|
655 | + include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
656 | + break; |
|
657 | 657 | /********************************************************************/ |
658 | 658 | /* view phpinfo */ |
659 | 659 | /********************************************************************/ |
660 | - case 200: |
|
661 | - // show phpInfo |
|
662 | - if($modx->hasPermission('logs')) { |
|
663 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
664 | - include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
665 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
666 | - } |
|
667 | - break; |
|
660 | + case 200: |
|
661 | + // show phpInfo |
|
662 | + if($modx->hasPermission('logs')) { |
|
663 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
664 | + include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
665 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
666 | + } |
|
667 | + break; |
|
668 | 668 | /********************************************************************/ |
669 | 669 | /* errorpage */ |
670 | 670 | /********************************************************************/ |
671 | - case 29: |
|
672 | - // get the error page |
|
673 | - include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
674 | - break; |
|
671 | + case 29: |
|
672 | + // get the error page |
|
673 | + include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
674 | + break; |
|
675 | 675 | /********************************************************************/ |
676 | 676 | /* file manager */ |
677 | 677 | /********************************************************************/ |
678 | - case 31: |
|
679 | - // get the page to manage files |
|
680 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
681 | - include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
682 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
683 | - break; |
|
678 | + case 31: |
|
679 | + // get the page to manage files |
|
680 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
681 | + include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
682 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
683 | + break; |
|
684 | 684 | /********************************************************************/ |
685 | 685 | /* access permissions */ |
686 | 686 | /********************************************************************/ |
687 | - case 40: |
|
688 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
689 | - include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
690 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
691 | - break; |
|
692 | - case 91: |
|
693 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
694 | - include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
695 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
696 | - break; |
|
687 | + case 40: |
|
688 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
689 | + include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
690 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
691 | + break; |
|
692 | + case 91: |
|
693 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
694 | + include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
695 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
696 | + break; |
|
697 | 697 | /********************************************************************/ |
698 | 698 | /* access groups processor */ |
699 | 699 | /********************************************************************/ |
700 | - case 41: |
|
701 | - include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
702 | - break; |
|
703 | - case 92: |
|
704 | - include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
705 | - break; |
|
700 | + case 41: |
|
701 | + include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
702 | + break; |
|
703 | + case 92: |
|
704 | + include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
705 | + break; |
|
706 | 706 | /********************************************************************/ |
707 | 707 | /* settings editor */ |
708 | 708 | /********************************************************************/ |
709 | - case 17: |
|
710 | - // get the settings editor |
|
711 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
712 | - include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
713 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
714 | - break; |
|
715 | - case 118: |
|
716 | - // call settings ajax include |
|
717 | - ob_clean(); |
|
718 | - include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
719 | - break; |
|
709 | + case 17: |
|
710 | + // get the settings editor |
|
711 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
712 | + include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
713 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
714 | + break; |
|
715 | + case 118: |
|
716 | + // call settings ajax include |
|
717 | + ob_clean(); |
|
718 | + include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
719 | + break; |
|
720 | 720 | /********************************************************************/ |
721 | 721 | /* save settings */ |
722 | 722 | /********************************************************************/ |
723 | - case 30: |
|
724 | - // get the save settings processor |
|
725 | - include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
726 | - break; |
|
723 | + case 30: |
|
724 | + // get the save settings processor |
|
725 | + include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
726 | + break; |
|
727 | 727 | /********************************************************************/ |
728 | 728 | /* system information */ |
729 | 729 | /********************************************************************/ |
730 | - case 53: |
|
731 | - // get the settings editor |
|
732 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
733 | - include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
734 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
735 | - break; |
|
730 | + case 53: |
|
731 | + // get the settings editor |
|
732 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
733 | + include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
734 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
735 | + break; |
|
736 | 736 | /********************************************************************/ |
737 | 737 | /* optimise table */ |
738 | 738 | /********************************************************************/ |
739 | - case 54: |
|
740 | - // get the table optimizer/truncate processor |
|
741 | - include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
742 | - break; |
|
739 | + case 54: |
|
740 | + // get the table optimizer/truncate processor |
|
741 | + include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
742 | + break; |
|
743 | 743 | /********************************************************************/ |
744 | 744 | /* view logging */ |
745 | 745 | /********************************************************************/ |
746 | - case 13: |
|
747 | - // view logging |
|
748 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
749 | - include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
750 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
751 | - break; |
|
746 | + case 13: |
|
747 | + // view logging |
|
748 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
749 | + include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
750 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
751 | + break; |
|
752 | 752 | /********************************************************************/ |
753 | 753 | /* empty logs */ |
754 | 754 | /********************************************************************/ |
755 | - case 55: |
|
756 | - // get the settings editor |
|
757 | - include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
758 | - break; |
|
755 | + case 55: |
|
756 | + // get the settings editor |
|
757 | + include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
758 | + break; |
|
759 | 759 | /********************************************************************/ |
760 | 760 | /* calls test page */ |
761 | 761 | /********************************************************************/ |
762 | - case 999: |
|
763 | - // get the test page |
|
764 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
765 | - include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
766 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
767 | - break; |
|
762 | + case 999: |
|
763 | + // get the test page |
|
764 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
765 | + include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
766 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
767 | + break; |
|
768 | 768 | /********************************************************************/ |
769 | 769 | /* Empty recycle bin */ |
770 | 770 | /********************************************************************/ |
771 | - case 64: |
|
772 | - // get the Recycle bin emptier |
|
773 | - include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
774 | - break; |
|
771 | + case 64: |
|
772 | + // get the Recycle bin emptier |
|
773 | + include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
774 | + break; |
|
775 | 775 | /********************************************************************/ |
776 | 776 | /* Messages */ |
777 | 777 | /********************************************************************/ |
778 | - case 10: |
|
779 | - // get the messages page |
|
780 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
781 | - include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
782 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
783 | - break; |
|
778 | + case 10: |
|
779 | + // get the messages page |
|
780 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
781 | + include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
782 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
783 | + break; |
|
784 | 784 | /********************************************************************/ |
785 | 785 | /* Delete a message */ |
786 | 786 | /********************************************************************/ |
787 | - case 65: |
|
788 | - // get the message deleter |
|
789 | - include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
790 | - break; |
|
787 | + case 65: |
|
788 | + // get the message deleter |
|
789 | + include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
790 | + break; |
|
791 | 791 | /********************************************************************/ |
792 | 792 | /* Send a message */ |
793 | 793 | /********************************************************************/ |
794 | - case 66: |
|
795 | - // get the message deleter |
|
796 | - include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
797 | - break; |
|
794 | + case 66: |
|
795 | + // get the message deleter |
|
796 | + include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
797 | + break; |
|
798 | 798 | /********************************************************************/ |
799 | 799 | /* Remove locks */ |
800 | 800 | /********************************************************************/ |
801 | - case 67: |
|
802 | - // get the lock remover |
|
803 | - include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
804 | - break; |
|
801 | + case 67: |
|
802 | + // get the lock remover |
|
803 | + include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
804 | + break; |
|
805 | 805 | /********************************************************************/ |
806 | 806 | /* Site schedule */ |
807 | 807 | /********************************************************************/ |
808 | - case 70: |
|
809 | - // get the schedule page |
|
810 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
811 | - include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
812 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
813 | - break; |
|
808 | + case 70: |
|
809 | + // get the schedule page |
|
810 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
811 | + include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
812 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
813 | + break; |
|
814 | 814 | /********************************************************************/ |
815 | 815 | /* Search */ |
816 | 816 | /********************************************************************/ |
817 | - case 71: |
|
818 | - // get the search page |
|
819 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
820 | - include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
821 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
822 | - break; |
|
817 | + case 71: |
|
818 | + // get the search page |
|
819 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
820 | + include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
821 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
822 | + break; |
|
823 | 823 | /********************************************************************/ |
824 | 824 | /* About */ |
825 | 825 | /********************************************************************/ |
826 | - case 59: |
|
827 | - // get the about page |
|
828 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
829 | - include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
830 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
831 | - break; |
|
826 | + case 59: |
|
827 | + // get the about page |
|
828 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
829 | + include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
830 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
831 | + break; |
|
832 | 832 | /********************************************************************/ |
833 | 833 | /* Add weblink */ |
834 | 834 | /********************************************************************/ |
835 | - case 72: |
|
836 | - // get the weblink page |
|
837 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
838 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
839 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
840 | - break; |
|
835 | + case 72: |
|
836 | + // get the weblink page |
|
837 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
838 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
839 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
840 | + break; |
|
841 | 841 | /********************************************************************/ |
842 | 842 | /* User management */ |
843 | 843 | /********************************************************************/ |
844 | - case 75: |
|
845 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
846 | - include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
847 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
848 | - break; |
|
849 | - case 99: |
|
850 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
851 | - include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
852 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
853 | - break; |
|
854 | - case 86: |
|
855 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
856 | - include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
857 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
858 | - break; |
|
844 | + case 75: |
|
845 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
846 | + include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
847 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
848 | + break; |
|
849 | + case 99: |
|
850 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
851 | + include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
852 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
853 | + break; |
|
854 | + case 86: |
|
855 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
856 | + include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
857 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
858 | + break; |
|
859 | 859 | /********************************************************************/ |
860 | 860 | /* template/ snippet management */ |
861 | 861 | /********************************************************************/ |
862 | - case 76: |
|
863 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
864 | - include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
865 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
866 | - break; |
|
862 | + case 76: |
|
863 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
864 | + include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
865 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
866 | + break; |
|
867 | 867 | /********************************************************************/ |
868 | 868 | /* Export to file */ |
869 | 869 | /********************************************************************/ |
870 | - case 83: |
|
871 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
872 | - include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
873 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
874 | - break; |
|
870 | + case 83: |
|
871 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
872 | + include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
873 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
874 | + break; |
|
875 | 875 | /********************************************************************/ |
876 | 876 | /* Resource Selector */ |
877 | 877 | /********************************************************************/ |
878 | - case 84: |
|
879 | - include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
880 | - break; |
|
878 | + case 84: |
|
879 | + include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
880 | + break; |
|
881 | 881 | /********************************************************************/ |
882 | 882 | /* Backup Manager */ |
883 | 883 | /********************************************************************/ |
884 | - case 93: |
|
885 | - # header and footer will be handled interally |
|
886 | - include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
887 | - break; |
|
884 | + case 93: |
|
885 | + # header and footer will be handled interally |
|
886 | + include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
887 | + break; |
|
888 | 888 | /********************************************************************/ |
889 | 889 | /* Duplicate Document */ |
890 | 890 | /********************************************************************/ |
891 | - case 94: |
|
892 | - // get the duplicate processor |
|
893 | - include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
894 | - break; |
|
891 | + case 94: |
|
892 | + // get the duplicate processor |
|
893 | + include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
894 | + break; |
|
895 | 895 | /********************************************************************/ |
896 | 896 | /* Import Document from file */ |
897 | 897 | /********************************************************************/ |
898 | - case 95: |
|
899 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
900 | - include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
901 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
902 | - break; |
|
898 | + case 95: |
|
899 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
900 | + include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
901 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
902 | + break; |
|
903 | 903 | /********************************************************************/ |
904 | 904 | /* Help */ |
905 | 905 | /********************************************************************/ |
906 | - case 9: |
|
907 | - // get the help page |
|
908 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
909 | - include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
910 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
911 | - break; |
|
906 | + case 9: |
|
907 | + // get the help page |
|
908 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
909 | + include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
910 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
911 | + break; |
|
912 | 912 | /********************************************************************/ |
913 | 913 | /* Template Variables - Based on Apodigm's Docvars */ |
914 | 914 | /********************************************************************/ |
915 | - case 300: |
|
916 | - // get the new document variable action |
|
917 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
918 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
919 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
920 | - break; |
|
921 | - case 301: |
|
922 | - // get the edit document variable action |
|
923 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
924 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
925 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
926 | - break; |
|
927 | - case 302: |
|
928 | - // get the save processor |
|
929 | - include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
930 | - break; |
|
931 | - case 303: |
|
932 | - // get the delete processor |
|
933 | - include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
934 | - break; |
|
935 | - case 304: |
|
936 | - // get the duplicate processor |
|
937 | - include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
938 | - break; |
|
939 | - case 305: |
|
940 | - // get the tv-rank action |
|
941 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
942 | - include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
943 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
944 | - break; |
|
915 | + case 300: |
|
916 | + // get the new document variable action |
|
917 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
918 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
919 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
920 | + break; |
|
921 | + case 301: |
|
922 | + // get the edit document variable action |
|
923 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
924 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
925 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
926 | + break; |
|
927 | + case 302: |
|
928 | + // get the save processor |
|
929 | + include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
930 | + break; |
|
931 | + case 303: |
|
932 | + // get the delete processor |
|
933 | + include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
934 | + break; |
|
935 | + case 304: |
|
936 | + // get the duplicate processor |
|
937 | + include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
938 | + break; |
|
939 | + case 305: |
|
940 | + // get the tv-rank action |
|
941 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
942 | + include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
943 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
944 | + break; |
|
945 | 945 | /********************************************************************/ |
946 | 946 | /* Event viewer: show event message log */ |
947 | 947 | /********************************************************************/ |
948 | - case 114: |
|
949 | - // get event logs |
|
950 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
951 | - include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
952 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
953 | - break; |
|
954 | - case 115: |
|
955 | - // get event log details viewer |
|
956 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
957 | - include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
958 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
959 | - break; |
|
960 | - case 116: |
|
961 | - // get the event log delete processor |
|
962 | - include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
963 | - break; |
|
964 | - |
|
965 | - case 501: |
|
966 | - //delete category |
|
967 | - include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
968 | - break; |
|
948 | + case 114: |
|
949 | + // get event logs |
|
950 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
951 | + include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
952 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
953 | + break; |
|
954 | + case 115: |
|
955 | + // get event log details viewer |
|
956 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
957 | + include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
958 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
959 | + break; |
|
960 | + case 116: |
|
961 | + // get the event log delete processor |
|
962 | + include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
963 | + break; |
|
964 | + |
|
965 | + case 501: |
|
966 | + //delete category |
|
967 | + include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
968 | + break; |
|
969 | 969 | /********************************************************************/ |
970 | 970 | /* default action: show not implemented message */ |
971 | 971 | /********************************************************************/ |
972 | - default : |
|
973 | - // say that what was requested doesn't do anything yet |
|
974 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
975 | - echo " |
|
972 | + default : |
|
973 | + // say that what was requested doesn't do anything yet |
|
974 | + include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
975 | + echo " |
|
976 | 976 | <div class='sectionHeader'>".$_lang['functionnotimpl']."</div> |
977 | 977 | <div class='sectionBody'> |
978 | 978 | <p>".$_lang['functionnotimpl_message']."</p> |
979 | 979 | </div> |
980 | 980 | "; |
981 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
981 | + include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
982 | 982 | } |
983 | 983 | |
984 | 984 | /********************************************************************/ |
985 | 985 | // log action, unless it's a frame request |
986 | 986 | if($action!=1 && $action!=7 && $action!=2) { |
987 | - include_once "log.class.inc.php"; |
|
988 | - $log = new logHandler; |
|
989 | - $log->initAndWriteLog(); |
|
987 | + include_once "log.class.inc.php"; |
|
988 | + $log = new logHandler; |
|
989 | + $log->initAndWriteLog(); |
|
990 | 990 | } |
991 | 991 | /********************************************************************/ |
992 | 992 | // show debug |
@@ -54,26 +54,26 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | // get start time |
57 | -$mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime; |
|
57 | +$mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $tstart = $mtime; |
|
58 | 58 | $mstart = memory_get_usage(); |
59 | -$self = str_replace('\\','/',__FILE__); |
|
60 | -$self_dir = str_replace('/index.php','',$self); |
|
61 | -$mgr_dir = substr($self_dir,strrpos($self_dir,'/')+1); |
|
62 | -$base_path = str_replace($mgr_dir . '/index.php','',$self); |
|
63 | -$site_mgr_path = $base_path . 'assets/cache/siteManager.php'; |
|
64 | -if(is_file($site_mgr_path)) include_once($site_mgr_path); |
|
65 | -$site_hostnames_path = $base_path . 'assets/cache/siteHostnames.php'; |
|
66 | -if(is_file($site_hostnames_path)) include_once($site_hostnames_path); |
|
67 | -if(!defined('MGR_DIR') || MGR_DIR!==$mgr_dir) { |
|
59 | +$self = str_replace('\\', '/', __FILE__); |
|
60 | +$self_dir = str_replace('/index.php', '', $self); |
|
61 | +$mgr_dir = substr($self_dir, strrpos($self_dir, '/') + 1); |
|
62 | +$base_path = str_replace($mgr_dir.'/index.php', '', $self); |
|
63 | +$site_mgr_path = $base_path.'assets/cache/siteManager.php'; |
|
64 | +if (is_file($site_mgr_path)) include_once($site_mgr_path); |
|
65 | +$site_hostnames_path = $base_path.'assets/cache/siteHostnames.php'; |
|
66 | +if (is_file($site_hostnames_path)) include_once($site_hostnames_path); |
|
67 | +if (!defined('MGR_DIR') || MGR_DIR !== $mgr_dir) { |
|
68 | 68 | $src = "<?php\n"; |
69 | 69 | $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
70 | - $rs = file_put_contents($site_mgr_path,$src); |
|
71 | - if(!$rs) { |
|
70 | + $rs = file_put_contents($site_mgr_path, $src); |
|
71 | + if (!$rs) { |
|
72 | 72 | echo 'siteManager.php write error'; |
73 | 73 | exit; |
74 | 74 | } |
75 | 75 | sleep(1); |
76 | - header('Location:' . $_SERVER['REQUEST_URI']); |
|
76 | + header('Location:'.$_SERVER['REQUEST_URI']); |
|
77 | 77 | exit; |
78 | 78 | } |
79 | 79 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | // send anti caching headers |
90 | 90 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
91 | -header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); |
|
91 | +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); |
|
92 | 92 | header("Cache-Control: no-store, no-cache, must-revalidate"); |
93 | 93 | header("Cache-Control: post-check=0, pre-check=0", false); |
94 | 94 | header("Pragma: no-cache"); |
@@ -100,29 +100,29 @@ discard block |
||
100 | 100 | include_once "includes/lang/english.inc.php"; |
101 | 101 | |
102 | 102 | // check PHP version. EVO is compatible with php 5 (5.0.0+) |
103 | -$php_ver_comp = version_compare(phpversion(), "5.0.0"); |
|
103 | +$php_ver_comp = version_compare(phpversion(), "5.0.0"); |
|
104 | 104 | // -1 if left is less, 0 if equal, +1 if left is higher |
105 | -if($php_ver_comp < 0) { |
|
105 | +if ($php_ver_comp < 0) { |
|
106 | 106 | echo sprintf($_lang['php_version_check'], phpversion()); |
107 | 107 | exit; |
108 | 108 | } |
109 | 109 | |
110 | 110 | // check if iconv is installed |
111 | -if(!function_exists('iconv')) { |
|
111 | +if (!function_exists('iconv')) { |
|
112 | 112 | echo $_lang['iconv_not_available']; |
113 | 113 | exit; |
114 | 114 | } |
115 | 115 | |
116 | 116 | // set some runtime options |
117 | -$incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond |
|
118 | -set_include_path(get_include_path() . PATH_SEPARATOR . $incPath); |
|
117 | +$incPath = str_replace("\\", "/", dirname(__FILE__)."/includes/"); // Mod by Raymond |
|
118 | +set_include_path(get_include_path().PATH_SEPARATOR.$incPath); |
|
119 | 119 | |
120 | 120 | if (!defined("ENT_COMPAT")) define("ENT_COMPAT", 2); |
121 | 121 | if (!defined("ENT_NOQUOTES")) define("ENT_NOQUOTES", 0); |
122 | 122 | if (!defined("ENT_QUOTES")) define("ENT_QUOTES", 3); |
123 | 123 | |
124 | 124 | // set the document_root :| |
125 | -if(!isset($_SERVER["DOCUMENT_ROOT"]) || empty($_SERVER["DOCUMENT_ROOT"])) { |
|
125 | +if (!isset($_SERVER["DOCUMENT_ROOT"]) || empty($_SERVER["DOCUMENT_ROOT"])) { |
|
126 | 126 | $_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PATH_INFO"], "", preg_replace("/\\\\/", "/", $_SERVER["PATH_TRANSLATED"]))."/"; |
127 | 127 | } |
128 | 128 | |
@@ -161,30 +161,30 @@ discard block |
||
161 | 161 | // Now that session is given get user settings and merge into $modx->config |
162 | 162 | $usersettings = $modx->getUserSettings(); |
163 | 163 | |
164 | -$settings =& $modx->config; |
|
164 | +$settings = & $modx->config; |
|
165 | 165 | extract($modx->config, EXTR_OVERWRITE); |
166 | 166 | |
167 | 167 | // now include_once different language file as english |
168 | -if(!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
168 | +if (!isset($manager_language) || !file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
169 | 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 | -if($manager_language!="english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
174 | +if ($manager_language != "english" && file_exists(MODX_MANAGER_PATH."includes/lang/".$manager_language.".inc.php")) { |
|
175 | 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 | -if(file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) { |
|
179 | +if (file_exists(MODX_MANAGER_PATH."includes/lang/override/".$manager_language.".inc.php")) { |
|
180 | 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 | -foreach($_lang as $k=>$v) |
|
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 |
@@ -198,19 +198,19 @@ discard block |
||
198 | 198 | include_once "accesscontrol.inc.php"; |
199 | 199 | |
200 | 200 | // double check the session |
201 | -if(!isset($_SESSION['mgrValidated'])){ |
|
201 | +if (!isset($_SESSION['mgrValidated'])) { |
|
202 | 202 | echo "Not Logged In!"; |
203 | 203 | exit; |
204 | 204 | } |
205 | 205 | |
206 | 206 | // include_once the style variables file |
207 | -if(isset($manager_theme) && !isset($_style)) { |
|
207 | +if (isset($manager_theme) && !isset($_style)) { |
|
208 | 208 | $_style = array(); |
209 | 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 | -if(isset($allow_manager_access) && $allow_manager_access==0) { |
|
213 | +if (isset($allow_manager_access) && $allow_manager_access == 0) { |
|
214 | 214 | include_once "manager.lockout.inc.php"; |
215 | 215 | } |
216 | 216 | |
@@ -219,21 +219,21 @@ discard block |
||
219 | 219 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
220 | 220 | |
221 | 221 | // first we check to see if this is a frameset request |
222 | -if(!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) { |
|
222 | +if (!isset($_POST['a']) && !isset($_GET['a']) && !isset($_POST['updateMsgCount'])) { |
|
223 | 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")) { |
|
224 | + if (is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
|
225 | 225 | include_once "media/style/".$manager_theme."/frames/1.php"; |
226 | - }else{ |
|
226 | + } else { |
|
227 | 227 | include_once "frames/1.php"; |
228 | 228 | } |
229 | 229 | exit; |
230 | 230 | } |
231 | 231 | |
232 | 232 | // OK, let's retrieve the action directive from the request |
233 | -$option = array('min_range'=>1,'max_range'=>2000); |
|
234 | -if(isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']); |
|
235 | -elseif(isset($_GET['a'])) $action = filter_input(INPUT_GET, 'a',FILTER_VALIDATE_INT,$option); |
|
236 | -elseif(isset($_POST['a'])) $action = filter_input(INPUT_POST,'a',FILTER_VALIDATE_INT,$option); |
|
233 | +$option = array('min_range'=>1, 'max_range'=>2000); |
|
234 | +if (isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']); |
|
235 | +elseif (isset($_GET['a'])) $action = filter_input(INPUT_GET, 'a', FILTER_VALIDATE_INT, $option); |
|
236 | +elseif (isset($_POST['a'])) $action = filter_input(INPUT_POST, 'a', FILTER_VALIDATE_INT, $option); |
|
237 | 237 | else $action = null; |
238 | 238 | |
239 | 239 | if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) { |
@@ -264,11 +264,11 @@ discard block |
||
264 | 264 | $modx->invokeEvent("OnManagerPageInit", array("action" => $action)); |
265 | 265 | |
266 | 266 | // return element filepath |
267 | -function includeFileProcessor ($filepath,$manager_theme) { |
|
267 | +function includeFileProcessor($filepath, $manager_theme){ |
|
268 | 268 | $element = ""; |
269 | - if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
269 | + if (is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
|
270 | 270 | $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
271 | - }else{ |
|
271 | + } else { |
|
272 | 272 | $element = $filepath; |
273 | 273 | } |
274 | 274 | return $element; |
@@ -281,341 +281,341 @@ discard block |
||
281 | 281 | /********************************************************************/ |
282 | 282 | case 1 : |
283 | 283 | // get the requested frame |
284 | - $frame = preg_replace('/[^a-z0-9]/i','',$_REQUEST['f']); |
|
285 | - if($frame>9) { |
|
286 | - $enable_debug=false; // this is to stop the debug thingy being attached to the framesets |
|
284 | + $frame = preg_replace('/[^a-z0-9]/i', '', $_REQUEST['f']); |
|
285 | + if ($frame > 9) { |
|
286 | + $enable_debug = false; // this is to stop the debug thingy being attached to the framesets |
|
287 | 287 | } |
288 | - include_once(includeFileProcessor("frames/".$frame.".php",$manager_theme)); |
|
288 | + include_once(includeFileProcessor("frames/".$frame.".php", $manager_theme)); |
|
289 | 289 | break; |
290 | 290 | /********************************************************************/ |
291 | 291 | /* show the homepage */ |
292 | 292 | /********************************************************************/ |
293 | 293 | case 2: |
294 | 294 | // get the home page |
295 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
296 | - include_once(includeFileProcessor("actions/welcome.static.php",$manager_theme)); |
|
297 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
295 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
296 | + include_once(includeFileProcessor("actions/welcome.static.php", $manager_theme)); |
|
297 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
298 | 298 | break; |
299 | 299 | /********************************************************************/ |
300 | 300 | /* document data */ |
301 | 301 | /********************************************************************/ |
302 | 302 | case 3: |
303 | 303 | // get the page to show document's data |
304 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
305 | - include_once(includeFileProcessor("actions/document_data.static.php",$manager_theme)); |
|
306 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
304 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
305 | + include_once(includeFileProcessor("actions/document_data.static.php", $manager_theme)); |
|
306 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
307 | 307 | break; |
308 | 308 | /********************************************************************/ |
309 | 309 | /* content management */ |
310 | 310 | /********************************************************************/ |
311 | 311 | case 85: |
312 | 312 | // get the mutate page for adding a folder |
313 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
314 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
315 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
313 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
314 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
315 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
316 | 316 | break; |
317 | 317 | case 27: |
318 | 318 | // get the mutate page for changing content |
319 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
320 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
321 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
319 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
320 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
321 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
322 | 322 | break; |
323 | 323 | case 4: |
324 | 324 | // get the mutate page for adding content |
325 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
326 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
327 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
325 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
326 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
327 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
328 | 328 | break; |
329 | 329 | case 5: |
330 | 330 | // get the save processor |
331 | - include_once(includeFileProcessor("processors/save_content.processor.php",$manager_theme)); |
|
331 | + include_once(includeFileProcessor("processors/save_content.processor.php", $manager_theme)); |
|
332 | 332 | break; |
333 | 333 | case 6: |
334 | 334 | // get the delete processor |
335 | - include_once(includeFileProcessor("processors/delete_content.processor.php",$manager_theme)); |
|
335 | + include_once(includeFileProcessor("processors/delete_content.processor.php", $manager_theme)); |
|
336 | 336 | break; |
337 | 337 | case 63: |
338 | 338 | // get the undelete processor |
339 | - include_once(includeFileProcessor("processors/undelete_content.processor.php",$manager_theme)); |
|
339 | + include_once(includeFileProcessor("processors/undelete_content.processor.php", $manager_theme)); |
|
340 | 340 | break; |
341 | 341 | case 51: |
342 | 342 | // get the move action |
343 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
344 | - include_once(includeFileProcessor("actions/move_document.dynamic.php",$manager_theme)); |
|
345 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
343 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
344 | + include_once(includeFileProcessor("actions/move_document.dynamic.php", $manager_theme)); |
|
345 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
346 | 346 | break; |
347 | 347 | case 52: |
348 | 348 | // get the move document processor |
349 | - include_once(includeFileProcessor("processors/move_document.processor.php",$manager_theme)); |
|
349 | + include_once(includeFileProcessor("processors/move_document.processor.php", $manager_theme)); |
|
350 | 350 | break; |
351 | 351 | case 61: |
352 | 352 | // get the processor for publishing content |
353 | - include_once(includeFileProcessor("processors/publish_content.processor.php",$manager_theme)); |
|
353 | + include_once(includeFileProcessor("processors/publish_content.processor.php", $manager_theme)); |
|
354 | 354 | break; |
355 | 355 | case 62: |
356 | 356 | // get the processor for publishing content |
357 | - include_once(includeFileProcessor("processors/unpublish_content.processor.php",$manager_theme)); |
|
357 | + include_once(includeFileProcessor("processors/unpublish_content.processor.php", $manager_theme)); |
|
358 | 358 | break; |
359 | 359 | case 56: |
360 | 360 | // get the sort menuindex action |
361 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
362 | - include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php",$manager_theme)); |
|
363 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
361 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
362 | + include_once(includeFileProcessor("actions/mutate_menuindex_sort.dynamic.php", $manager_theme)); |
|
363 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
364 | 364 | break; |
365 | 365 | /********************************************************************/ |
366 | 366 | /* show the wait page - gives the tree time to refresh (hopefully) */ |
367 | 367 | /********************************************************************/ |
368 | 368 | case 7: |
369 | 369 | // get the wait page (so the tree can reload) |
370 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
371 | - include_once(includeFileProcessor("actions/wait.static.php",$manager_theme)); |
|
372 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
370 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
371 | + include_once(includeFileProcessor("actions/wait.static.php", $manager_theme)); |
|
372 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
373 | 373 | break; |
374 | 374 | /********************************************************************/ |
375 | 375 | /* let the user log out */ |
376 | 376 | /********************************************************************/ |
377 | 377 | case 8: |
378 | 378 | // get the logout processor |
379 | - include_once(includeFileProcessor("processors/logout.processor.php",$manager_theme)); |
|
379 | + include_once(includeFileProcessor("processors/logout.processor.php", $manager_theme)); |
|
380 | 380 | break; |
381 | 381 | /********************************************************************/ |
382 | 382 | /* user management */ |
383 | 383 | /********************************************************************/ |
384 | 384 | case 87: |
385 | 385 | // get the new web user page |
386 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
387 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
388 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
386 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
387 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php", $manager_theme)); |
|
388 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
389 | 389 | break; |
390 | 390 | case 88: |
391 | 391 | // get the edit web user page |
392 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
393 | - include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php",$manager_theme)); |
|
394 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
392 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
393 | + include_once(includeFileProcessor("actions/mutate_web_user.dynamic.php", $manager_theme)); |
|
394 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
395 | 395 | break; |
396 | 396 | case 89: |
397 | 397 | // get the save web user processor |
398 | - include_once(includeFileProcessor("processors/save_web_user.processor.php",$manager_theme)); |
|
398 | + include_once(includeFileProcessor("processors/save_web_user.processor.php", $manager_theme)); |
|
399 | 399 | break; |
400 | 400 | case 90: |
401 | 401 | // get the delete web user page |
402 | - include_once(includeFileProcessor("processors/delete_web_user.processor.php",$manager_theme)); |
|
402 | + include_once(includeFileProcessor("processors/delete_web_user.processor.php", $manager_theme)); |
|
403 | 403 | break; |
404 | 404 | case 11: |
405 | 405 | // get the new user page |
406 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
407 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
408 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
406 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
407 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php", $manager_theme)); |
|
408 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
409 | 409 | break; |
410 | 410 | case 12: |
411 | 411 | // get the edit user page |
412 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
413 | - include_once(includeFileProcessor("actions/mutate_user.dynamic.php",$manager_theme)); |
|
414 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
412 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
413 | + include_once(includeFileProcessor("actions/mutate_user.dynamic.php", $manager_theme)); |
|
414 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
415 | 415 | break; |
416 | 416 | case 32: |
417 | 417 | // get the save user processor |
418 | - include_once(includeFileProcessor("processors/save_user.processor.php",$manager_theme)); |
|
418 | + include_once(includeFileProcessor("processors/save_user.processor.php", $manager_theme)); |
|
419 | 419 | break; |
420 | 420 | case 28: |
421 | 421 | // get the change password page |
422 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
423 | - include_once(includeFileProcessor("actions/mutate_password.dynamic.php",$manager_theme)); |
|
424 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
422 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
423 | + include_once(includeFileProcessor("actions/mutate_password.dynamic.php", $manager_theme)); |
|
424 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
425 | 425 | break; |
426 | 426 | case 34: |
427 | 427 | // get the save new password page |
428 | - include_once(includeFileProcessor("processors/save_password.processor.php",$manager_theme)); |
|
428 | + include_once(includeFileProcessor("processors/save_password.processor.php", $manager_theme)); |
|
429 | 429 | break; |
430 | 430 | case 33: |
431 | 431 | // get the delete user page |
432 | - include_once(includeFileProcessor("processors/delete_user.processor.php",$manager_theme)); |
|
432 | + include_once(includeFileProcessor("processors/delete_user.processor.php", $manager_theme)); |
|
433 | 433 | break; |
434 | 434 | /********************************************************************/ |
435 | 435 | /* role management */ |
436 | 436 | /********************************************************************/ |
437 | 437 | case 38: |
438 | 438 | // get the new role page |
439 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
440 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
441 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
439 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
440 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php", $manager_theme)); |
|
441 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
442 | 442 | break; |
443 | 443 | case 35: |
444 | 444 | // get the edit role page |
445 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
446 | - include_once(includeFileProcessor("actions/mutate_role.dynamic.php",$manager_theme)); |
|
447 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
445 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
446 | + include_once(includeFileProcessor("actions/mutate_role.dynamic.php", $manager_theme)); |
|
447 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
448 | 448 | break; |
449 | 449 | case 36: |
450 | 450 | // get the save role page |
451 | - include_once(includeFileProcessor("processors/save_role.processor.php",$manager_theme)); |
|
451 | + include_once(includeFileProcessor("processors/save_role.processor.php", $manager_theme)); |
|
452 | 452 | break; |
453 | 453 | case 37: |
454 | 454 | // get the delete role page |
455 | - include_once(includeFileProcessor("processors/delete_role.processor.php",$manager_theme)); |
|
455 | + include_once(includeFileProcessor("processors/delete_role.processor.php", $manager_theme)); |
|
456 | 456 | break; |
457 | 457 | /********************************************************************/ |
458 | 458 | /* category management */ |
459 | 459 | /********************************************************************/ |
460 | 460 | case 120: |
461 | 461 | // get the edit category page |
462 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
463 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
464 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
462 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
463 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php", $manager_theme)); |
|
464 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
465 | 465 | break; |
466 | 466 | case 121: |
467 | 467 | // for ajax-requests |
468 | - include_once(includeFileProcessor("actions/mutate_categories.dynamic.php",$manager_theme)); |
|
468 | + include_once(includeFileProcessor("actions/mutate_categories.dynamic.php", $manager_theme)); |
|
469 | 469 | break; |
470 | 470 | /********************************************************************/ |
471 | 471 | /* template management */ |
472 | 472 | /********************************************************************/ |
473 | 473 | case 16: |
474 | 474 | // get the edit template action |
475 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
476 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
477 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
475 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
476 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php", $manager_theme)); |
|
477 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
478 | 478 | break; |
479 | 479 | case 19: |
480 | 480 | // get the new template action |
481 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
482 | - include_once(includeFileProcessor("actions/mutate_templates.dynamic.php",$manager_theme)); |
|
483 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
481 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
482 | + include_once(includeFileProcessor("actions/mutate_templates.dynamic.php", $manager_theme)); |
|
483 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
484 | 484 | break; |
485 | 485 | case 20: |
486 | 486 | // get the save processor |
487 | - include_once(includeFileProcessor("processors/save_template.processor.php",$manager_theme)); |
|
487 | + include_once(includeFileProcessor("processors/save_template.processor.php", $manager_theme)); |
|
488 | 488 | break; |
489 | 489 | case 21: |
490 | 490 | // get the delete processor |
491 | - include_once(includeFileProcessor("processors/delete_template.processor.php",$manager_theme)); |
|
491 | + include_once(includeFileProcessor("processors/delete_template.processor.php", $manager_theme)); |
|
492 | 492 | break; |
493 | 493 | case 96: |
494 | 494 | // get the duplicate template processor |
495 | - include_once(includeFileProcessor("processors/duplicate_template.processor.php",$manager_theme)); |
|
495 | + include_once(includeFileProcessor("processors/duplicate_template.processor.php", $manager_theme)); |
|
496 | 496 | break; |
497 | 497 | case 117: |
498 | 498 | // change the tv rank for selected template |
499 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
500 | - include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php",$manager_theme)); |
|
501 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
499 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
500 | + include_once(includeFileProcessor("actions/mutate_template_tv_rank.dynamic.php", $manager_theme)); |
|
501 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
502 | 502 | break; |
503 | 503 | /********************************************************************/ |
504 | 504 | /* snippet management */ |
505 | 505 | /********************************************************************/ |
506 | 506 | case 22: |
507 | 507 | // get the edit snippet action |
508 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
509 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
510 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
508 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
509 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php", $manager_theme)); |
|
510 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
511 | 511 | break; |
512 | 512 | case 23: |
513 | 513 | // get the new snippet action |
514 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
515 | - include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php",$manager_theme)); |
|
516 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
514 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
515 | + include_once(includeFileProcessor("actions/mutate_snippet.dynamic.php", $manager_theme)); |
|
516 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
517 | 517 | break; |
518 | 518 | case 24: |
519 | 519 | // get the save processor |
520 | - include_once(includeFileProcessor("processors/save_snippet.processor.php",$manager_theme)); |
|
520 | + include_once(includeFileProcessor("processors/save_snippet.processor.php", $manager_theme)); |
|
521 | 521 | break; |
522 | 522 | case 25: |
523 | 523 | // get the delete processor |
524 | - include_once(includeFileProcessor("processors/delete_snippet.processor.php",$manager_theme)); |
|
524 | + include_once(includeFileProcessor("processors/delete_snippet.processor.php", $manager_theme)); |
|
525 | 525 | break; |
526 | 526 | case 98: |
527 | 527 | // get the duplicate processor |
528 | - include_once(includeFileProcessor("processors/duplicate_snippet.processor.php",$manager_theme)); |
|
528 | + include_once(includeFileProcessor("processors/duplicate_snippet.processor.php", $manager_theme)); |
|
529 | 529 | break; |
530 | 530 | /********************************************************************/ |
531 | 531 | /* htmlsnippet management */ |
532 | 532 | /********************************************************************/ |
533 | 533 | case 78: |
534 | 534 | // get the edit snippet action |
535 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
536 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
537 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
535 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
536 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php", $manager_theme)); |
|
537 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
538 | 538 | break; |
539 | 539 | case 77: |
540 | 540 | // get the new snippet action |
541 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
542 | - include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php",$manager_theme)); |
|
543 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
541 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
542 | + include_once(includeFileProcessor("actions/mutate_htmlsnippet.dynamic.php", $manager_theme)); |
|
543 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
544 | 544 | break; |
545 | 545 | case 79: |
546 | 546 | // get the save processor |
547 | - include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php",$manager_theme)); |
|
547 | + include_once(includeFileProcessor("processors/save_htmlsnippet.processor.php", $manager_theme)); |
|
548 | 548 | break; |
549 | 549 | case 80: |
550 | 550 | // get the delete processor |
551 | - include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php",$manager_theme)); |
|
551 | + include_once(includeFileProcessor("processors/delete_htmlsnippet.processor.php", $manager_theme)); |
|
552 | 552 | break; |
553 | 553 | case 97: |
554 | 554 | // get the duplicate processor |
555 | - include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php",$manager_theme)); |
|
555 | + include_once(includeFileProcessor("processors/duplicate_htmlsnippet.processor.php", $manager_theme)); |
|
556 | 556 | break; |
557 | 557 | /********************************************************************/ |
558 | 558 | /* show the credits page */ |
559 | 559 | /********************************************************************/ |
560 | 560 | case 18: |
561 | 561 | // get the credits page |
562 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
563 | - include_once(includeFileProcessor("actions/credits.static.php",$manager_theme)); |
|
564 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
562 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
563 | + include_once(includeFileProcessor("actions/credits.static.php", $manager_theme)); |
|
564 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
565 | 565 | break; |
566 | 566 | /********************************************************************/ |
567 | 567 | /* empty cache & synchronisation */ |
568 | 568 | /********************************************************************/ |
569 | 569 | case 26: |
570 | 570 | // get the cache emptying processor |
571 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
572 | - include_once(includeFileProcessor("actions/refresh_site.dynamic.php",$manager_theme)); |
|
573 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
571 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
572 | + include_once(includeFileProcessor("actions/refresh_site.dynamic.php", $manager_theme)); |
|
573 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
574 | 574 | break; |
575 | 575 | /********************************************************************/ |
576 | 576 | /* Module management */ |
577 | 577 | /********************************************************************/ |
578 | 578 | case 106: |
579 | 579 | // get module management |
580 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
581 | - include_once(includeFileProcessor("actions/modules.static.php",$manager_theme)); |
|
582 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
580 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
581 | + include_once(includeFileProcessor("actions/modules.static.php", $manager_theme)); |
|
582 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
583 | 583 | break; |
584 | 584 | case 107: |
585 | 585 | // get the new module action |
586 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
587 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
588 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
586 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
587 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php", $manager_theme)); |
|
588 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
589 | 589 | break; |
590 | 590 | case 108: |
591 | 591 | // get the edit module action |
592 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
593 | - include_once(includeFileProcessor("actions/mutate_module.dynamic.php",$manager_theme)); |
|
594 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
592 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
593 | + include_once(includeFileProcessor("actions/mutate_module.dynamic.php", $manager_theme)); |
|
594 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
595 | 595 | break; |
596 | 596 | case 109: |
597 | 597 | // get the save processor |
598 | - include_once(includeFileProcessor("processors/save_module.processor.php",$manager_theme)); |
|
598 | + include_once(includeFileProcessor("processors/save_module.processor.php", $manager_theme)); |
|
599 | 599 | break; |
600 | 600 | case 110: |
601 | 601 | // get the delete processor |
602 | - include_once(includeFileProcessor("processors/delete_module.processor.php",$manager_theme)); |
|
602 | + include_once(includeFileProcessor("processors/delete_module.processor.php", $manager_theme)); |
|
603 | 603 | break; |
604 | 604 | case 111: |
605 | 605 | // get the duplicate processor |
606 | - include_once(includeFileProcessor("processors/duplicate_module.processor.php",$manager_theme)); |
|
606 | + include_once(includeFileProcessor("processors/duplicate_module.processor.php", $manager_theme)); |
|
607 | 607 | break; |
608 | 608 | case 112: |
609 | 609 | // execute/run the module |
610 | 610 | //include_once "header.inc.php"; |
611 | - include_once(includeFileProcessor("processors/execute_module.processor.php",$manager_theme)); |
|
611 | + include_once(includeFileProcessor("processors/execute_module.processor.php", $manager_theme)); |
|
612 | 612 | //include_once "footer.inc.php"; |
613 | 613 | break; |
614 | 614 | case 113: |
615 | 615 | // get the module resources (dependencies) action |
616 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
617 | - include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php",$manager_theme)); |
|
618 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
616 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
617 | + include_once(includeFileProcessor("actions/mutate_module_resources.dynamic.php", $manager_theme)); |
|
618 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
619 | 619 | break; |
620 | 620 | /********************************************************************/ |
621 | 621 | /* plugin management */ |
@@ -623,46 +623,46 @@ discard block |
||
623 | 623 | case 100: |
624 | 624 | // change the plugin priority |
625 | 625 | //include_once "header.inc.php"; - in action file |
626 | - include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php",$manager_theme)); |
|
627 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
626 | + include_once(includeFileProcessor("actions/mutate_plugin_priority.dynamic.php", $manager_theme)); |
|
627 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
628 | 628 | break; |
629 | 629 | case 101: |
630 | 630 | // get the new plugin action |
631 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
632 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
633 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
631 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
632 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php", $manager_theme)); |
|
633 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
634 | 634 | break; |
635 | 635 | case 102: |
636 | 636 | // get the edit plugin action |
637 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
638 | - include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php",$manager_theme)); |
|
639 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
637 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
638 | + include_once(includeFileProcessor("actions/mutate_plugin.dynamic.php", $manager_theme)); |
|
639 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
640 | 640 | break; |
641 | 641 | case 103: |
642 | 642 | // get the save processor |
643 | - include_once(includeFileProcessor("processors/save_plugin.processor.php",$manager_theme)); |
|
643 | + include_once(includeFileProcessor("processors/save_plugin.processor.php", $manager_theme)); |
|
644 | 644 | break; |
645 | 645 | case 104: |
646 | 646 | // get the delete processor |
647 | - include_once(includeFileProcessor("processors/delete_plugin.processor.php",$manager_theme)); |
|
647 | + include_once(includeFileProcessor("processors/delete_plugin.processor.php", $manager_theme)); |
|
648 | 648 | break; |
649 | 649 | case 105: |
650 | 650 | // get the duplicate processor |
651 | - include_once(includeFileProcessor("processors/duplicate_plugin.processor.php",$manager_theme)); |
|
651 | + include_once(includeFileProcessor("processors/duplicate_plugin.processor.php", $manager_theme)); |
|
652 | 652 | break; |
653 | 653 | case 119: |
654 | 654 | // get the purge processor |
655 | - include_once(includeFileProcessor("processors/purge_plugin.processor.php",$manager_theme)); |
|
655 | + include_once(includeFileProcessor("processors/purge_plugin.processor.php", $manager_theme)); |
|
656 | 656 | break; |
657 | 657 | /********************************************************************/ |
658 | 658 | /* view phpinfo */ |
659 | 659 | /********************************************************************/ |
660 | 660 | case 200: |
661 | 661 | // show phpInfo |
662 | - if($modx->hasPermission('logs')) { |
|
663 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
664 | - include_once(includeFileProcessor("actions/phpinfo.static.php",$manager_theme)); |
|
665 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
662 | + if ($modx->hasPermission('logs')) { |
|
663 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
664 | + include_once(includeFileProcessor("actions/phpinfo.static.php", $manager_theme)); |
|
665 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
666 | 666 | } |
667 | 667 | break; |
668 | 668 | /********************************************************************/ |
@@ -670,320 +670,320 @@ discard block |
||
670 | 670 | /********************************************************************/ |
671 | 671 | case 29: |
672 | 672 | // get the error page |
673 | - include_once(includeFileProcessor("actions/error_dialog.static.php",$manager_theme)); |
|
673 | + include_once(includeFileProcessor("actions/error_dialog.static.php", $manager_theme)); |
|
674 | 674 | break; |
675 | 675 | /********************************************************************/ |
676 | 676 | /* file manager */ |
677 | 677 | /********************************************************************/ |
678 | 678 | case 31: |
679 | 679 | // get the page to manage files |
680 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
681 | - include_once(includeFileProcessor("actions/files.dynamic.php",$manager_theme)); |
|
682 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
680 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
681 | + include_once(includeFileProcessor("actions/files.dynamic.php", $manager_theme)); |
|
682 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
683 | 683 | break; |
684 | 684 | /********************************************************************/ |
685 | 685 | /* access permissions */ |
686 | 686 | /********************************************************************/ |
687 | 687 | case 40: |
688 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
689 | - include_once(includeFileProcessor("actions/access_permissions.dynamic.php",$manager_theme)); |
|
690 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
688 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
689 | + include_once(includeFileProcessor("actions/access_permissions.dynamic.php", $manager_theme)); |
|
690 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
691 | 691 | break; |
692 | 692 | case 91: |
693 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
694 | - include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php",$manager_theme)); |
|
695 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
693 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
694 | + include_once(includeFileProcessor("actions/web_access_permissions.dynamic.php", $manager_theme)); |
|
695 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
696 | 696 | break; |
697 | 697 | /********************************************************************/ |
698 | 698 | /* access groups processor */ |
699 | 699 | /********************************************************************/ |
700 | 700 | case 41: |
701 | - include_once(includeFileProcessor("processors/access_groups.processor.php",$manager_theme)); |
|
701 | + include_once(includeFileProcessor("processors/access_groups.processor.php", $manager_theme)); |
|
702 | 702 | break; |
703 | 703 | case 92: |
704 | - include_once(includeFileProcessor("processors/web_access_groups.processor.php",$manager_theme)); |
|
704 | + include_once(includeFileProcessor("processors/web_access_groups.processor.php", $manager_theme)); |
|
705 | 705 | break; |
706 | 706 | /********************************************************************/ |
707 | 707 | /* settings editor */ |
708 | 708 | /********************************************************************/ |
709 | 709 | case 17: |
710 | 710 | // get the settings editor |
711 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
712 | - include_once(includeFileProcessor("actions/mutate_settings.dynamic.php",$manager_theme)); |
|
713 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
711 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
712 | + include_once(includeFileProcessor("actions/mutate_settings.dynamic.php", $manager_theme)); |
|
713 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
714 | 714 | break; |
715 | 715 | case 118: |
716 | 716 | // call settings ajax include |
717 | 717 | ob_clean(); |
718 | - include_once(includeFileProcessor("includes/mutate_settings.ajax.php",$manager_theme)); |
|
718 | + include_once(includeFileProcessor("includes/mutate_settings.ajax.php", $manager_theme)); |
|
719 | 719 | break; |
720 | 720 | /********************************************************************/ |
721 | 721 | /* save settings */ |
722 | 722 | /********************************************************************/ |
723 | 723 | case 30: |
724 | 724 | // get the save settings processor |
725 | - include_once(includeFileProcessor("processors/save_settings.processor.php",$manager_theme)); |
|
725 | + include_once(includeFileProcessor("processors/save_settings.processor.php", $manager_theme)); |
|
726 | 726 | break; |
727 | 727 | /********************************************************************/ |
728 | 728 | /* system information */ |
729 | 729 | /********************************************************************/ |
730 | 730 | case 53: |
731 | 731 | // get the settings editor |
732 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
733 | - include_once(includeFileProcessor("actions/sysinfo.static.php",$manager_theme)); |
|
734 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
732 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
733 | + include_once(includeFileProcessor("actions/sysinfo.static.php", $manager_theme)); |
|
734 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
735 | 735 | break; |
736 | 736 | /********************************************************************/ |
737 | 737 | /* optimise table */ |
738 | 738 | /********************************************************************/ |
739 | 739 | case 54: |
740 | 740 | // get the table optimizer/truncate processor |
741 | - include_once(includeFileProcessor("processors/optimize_table.processor.php",$manager_theme)); |
|
741 | + include_once(includeFileProcessor("processors/optimize_table.processor.php", $manager_theme)); |
|
742 | 742 | break; |
743 | 743 | /********************************************************************/ |
744 | 744 | /* view logging */ |
745 | 745 | /********************************************************************/ |
746 | 746 | case 13: |
747 | 747 | // view logging |
748 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
749 | - include_once(includeFileProcessor("actions/logging.static.php",$manager_theme)); |
|
750 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
748 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
749 | + include_once(includeFileProcessor("actions/logging.static.php", $manager_theme)); |
|
750 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
751 | 751 | break; |
752 | 752 | /********************************************************************/ |
753 | 753 | /* empty logs */ |
754 | 754 | /********************************************************************/ |
755 | 755 | case 55: |
756 | 756 | // get the settings editor |
757 | - include_once(includeFileProcessor("processors/empty_table.processor.php",$manager_theme)); |
|
757 | + include_once(includeFileProcessor("processors/empty_table.processor.php", $manager_theme)); |
|
758 | 758 | break; |
759 | 759 | /********************************************************************/ |
760 | 760 | /* calls test page */ |
761 | 761 | /********************************************************************/ |
762 | 762 | case 999: |
763 | 763 | // get the test page |
764 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
765 | - include_once(includeFileProcessor("test_page.php",$manager_theme)); |
|
766 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
764 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
765 | + include_once(includeFileProcessor("test_page.php", $manager_theme)); |
|
766 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
767 | 767 | break; |
768 | 768 | /********************************************************************/ |
769 | 769 | /* Empty recycle bin */ |
770 | 770 | /********************************************************************/ |
771 | 771 | case 64: |
772 | 772 | // get the Recycle bin emptier |
773 | - include_once(includeFileProcessor("processors/remove_content.processor.php",$manager_theme)); |
|
773 | + include_once(includeFileProcessor("processors/remove_content.processor.php", $manager_theme)); |
|
774 | 774 | break; |
775 | 775 | /********************************************************************/ |
776 | 776 | /* Messages */ |
777 | 777 | /********************************************************************/ |
778 | 778 | case 10: |
779 | 779 | // get the messages page |
780 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
781 | - include_once(includeFileProcessor("actions/messages.static.php",$manager_theme)); |
|
782 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
780 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
781 | + include_once(includeFileProcessor("actions/messages.static.php", $manager_theme)); |
|
782 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
783 | 783 | break; |
784 | 784 | /********************************************************************/ |
785 | 785 | /* Delete a message */ |
786 | 786 | /********************************************************************/ |
787 | 787 | case 65: |
788 | 788 | // get the message deleter |
789 | - include_once(includeFileProcessor("processors/delete_message.processor.php",$manager_theme)); |
|
789 | + include_once(includeFileProcessor("processors/delete_message.processor.php", $manager_theme)); |
|
790 | 790 | break; |
791 | 791 | /********************************************************************/ |
792 | 792 | /* Send a message */ |
793 | 793 | /********************************************************************/ |
794 | 794 | case 66: |
795 | 795 | // get the message deleter |
796 | - include_once(includeFileProcessor("processors/send_message.processor.php",$manager_theme)); |
|
796 | + include_once(includeFileProcessor("processors/send_message.processor.php", $manager_theme)); |
|
797 | 797 | break; |
798 | 798 | /********************************************************************/ |
799 | 799 | /* Remove locks */ |
800 | 800 | /********************************************************************/ |
801 | 801 | case 67: |
802 | 802 | // get the lock remover |
803 | - include_once(includeFileProcessor("processors/remove_locks.processor.php",$manager_theme)); |
|
803 | + include_once(includeFileProcessor("processors/remove_locks.processor.php", $manager_theme)); |
|
804 | 804 | break; |
805 | 805 | /********************************************************************/ |
806 | 806 | /* Site schedule */ |
807 | 807 | /********************************************************************/ |
808 | 808 | case 70: |
809 | 809 | // get the schedule page |
810 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
811 | - include_once(includeFileProcessor("actions/site_schedule.static.php",$manager_theme)); |
|
812 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
810 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
811 | + include_once(includeFileProcessor("actions/site_schedule.static.php", $manager_theme)); |
|
812 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
813 | 813 | break; |
814 | 814 | /********************************************************************/ |
815 | 815 | /* Search */ |
816 | 816 | /********************************************************************/ |
817 | 817 | case 71: |
818 | 818 | // get the search page |
819 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
820 | - include_once(includeFileProcessor("actions/search.static.php",$manager_theme)); |
|
821 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
819 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
820 | + include_once(includeFileProcessor("actions/search.static.php", $manager_theme)); |
|
821 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
822 | 822 | break; |
823 | 823 | /********************************************************************/ |
824 | 824 | /* About */ |
825 | 825 | /********************************************************************/ |
826 | 826 | case 59: |
827 | 827 | // get the about page |
828 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
829 | - include_once(includeFileProcessor("actions/about.static.php",$manager_theme)); |
|
830 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
828 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
829 | + include_once(includeFileProcessor("actions/about.static.php", $manager_theme)); |
|
830 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
831 | 831 | break; |
832 | 832 | /********************************************************************/ |
833 | 833 | /* Add weblink */ |
834 | 834 | /********************************************************************/ |
835 | 835 | case 72: |
836 | 836 | // get the weblink page |
837 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
838 | - include_once(includeFileProcessor("actions/mutate_content.dynamic.php",$manager_theme)); |
|
839 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
837 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
838 | + include_once(includeFileProcessor("actions/mutate_content.dynamic.php", $manager_theme)); |
|
839 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
840 | 840 | break; |
841 | 841 | /********************************************************************/ |
842 | 842 | /* User management */ |
843 | 843 | /********************************************************************/ |
844 | 844 | case 75: |
845 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
846 | - include_once(includeFileProcessor("actions/user_management.static.php",$manager_theme)); |
|
847 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
845 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
846 | + include_once(includeFileProcessor("actions/user_management.static.php", $manager_theme)); |
|
847 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
848 | 848 | break; |
849 | 849 | case 99: |
850 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
851 | - include_once(includeFileProcessor("actions/web_user_management.static.php",$manager_theme)); |
|
852 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
850 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
851 | + include_once(includeFileProcessor("actions/web_user_management.static.php", $manager_theme)); |
|
852 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
853 | 853 | break; |
854 | 854 | case 86: |
855 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
856 | - include_once(includeFileProcessor("actions/role_management.static.php",$manager_theme)); |
|
857 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
855 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
856 | + include_once(includeFileProcessor("actions/role_management.static.php", $manager_theme)); |
|
857 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
858 | 858 | break; |
859 | 859 | /********************************************************************/ |
860 | 860 | /* template/ snippet management */ |
861 | 861 | /********************************************************************/ |
862 | 862 | case 76: |
863 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
864 | - include_once(includeFileProcessor("actions/resources.static.php",$manager_theme)); |
|
865 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
863 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
864 | + include_once(includeFileProcessor("actions/resources.static.php", $manager_theme)); |
|
865 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
866 | 866 | break; |
867 | 867 | /********************************************************************/ |
868 | 868 | /* Export to file */ |
869 | 869 | /********************************************************************/ |
870 | 870 | case 83: |
871 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
872 | - include_once(includeFileProcessor("actions/export_site.static.php",$manager_theme)); |
|
873 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
871 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
872 | + include_once(includeFileProcessor("actions/export_site.static.php", $manager_theme)); |
|
873 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
874 | 874 | break; |
875 | 875 | /********************************************************************/ |
876 | 876 | /* Resource Selector */ |
877 | 877 | /********************************************************************/ |
878 | 878 | case 84: |
879 | - include_once(includeFileProcessor("actions/resource_selector.static.php",$manager_theme)); |
|
879 | + include_once(includeFileProcessor("actions/resource_selector.static.php", $manager_theme)); |
|
880 | 880 | break; |
881 | 881 | /********************************************************************/ |
882 | 882 | /* Backup Manager */ |
883 | 883 | /********************************************************************/ |
884 | 884 | case 93: |
885 | 885 | # header and footer will be handled interally |
886 | - include_once(includeFileProcessor("actions/bkmanager.static.php",$manager_theme)); |
|
886 | + include_once(includeFileProcessor("actions/bkmanager.static.php", $manager_theme)); |
|
887 | 887 | break; |
888 | 888 | /********************************************************************/ |
889 | 889 | /* Duplicate Document */ |
890 | 890 | /********************************************************************/ |
891 | 891 | case 94: |
892 | 892 | // get the duplicate processor |
893 | - include_once(includeFileProcessor("processors/duplicate_content.processor.php",$manager_theme)); |
|
893 | + include_once(includeFileProcessor("processors/duplicate_content.processor.php", $manager_theme)); |
|
894 | 894 | break; |
895 | 895 | /********************************************************************/ |
896 | 896 | /* Import Document from file */ |
897 | 897 | /********************************************************************/ |
898 | 898 | case 95: |
899 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
900 | - include_once(includeFileProcessor("actions/import_site.static.php",$manager_theme)); |
|
901 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
899 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
900 | + include_once(includeFileProcessor("actions/import_site.static.php", $manager_theme)); |
|
901 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
902 | 902 | break; |
903 | 903 | /********************************************************************/ |
904 | 904 | /* Help */ |
905 | 905 | /********************************************************************/ |
906 | 906 | case 9: |
907 | 907 | // get the help page |
908 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
909 | - include_once(includeFileProcessor("actions/help.static.php",$manager_theme)); |
|
910 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
908 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
909 | + include_once(includeFileProcessor("actions/help.static.php", $manager_theme)); |
|
910 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
911 | 911 | break; |
912 | 912 | /********************************************************************/ |
913 | 913 | /* Template Variables - Based on Apodigm's Docvars */ |
914 | 914 | /********************************************************************/ |
915 | 915 | case 300: |
916 | 916 | // get the new document variable action |
917 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
918 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
919 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
917 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
918 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php", $manager_theme)); |
|
919 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
920 | 920 | break; |
921 | 921 | case 301: |
922 | 922 | // get the edit document variable action |
923 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
924 | - include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php",$manager_theme)); |
|
925 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
923 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
924 | + include_once(includeFileProcessor("actions/mutate_tmplvars.dynamic.php", $manager_theme)); |
|
925 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
926 | 926 | break; |
927 | 927 | case 302: |
928 | 928 | // get the save processor |
929 | - include_once(includeFileProcessor("processors/save_tmplvars.processor.php",$manager_theme)); |
|
929 | + include_once(includeFileProcessor("processors/save_tmplvars.processor.php", $manager_theme)); |
|
930 | 930 | break; |
931 | 931 | case 303: |
932 | 932 | // get the delete processor |
933 | - include_once(includeFileProcessor("processors/delete_tmplvars.processor.php",$manager_theme)); |
|
933 | + include_once(includeFileProcessor("processors/delete_tmplvars.processor.php", $manager_theme)); |
|
934 | 934 | break; |
935 | 935 | case 304: |
936 | 936 | // get the duplicate processor |
937 | - include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php",$manager_theme)); |
|
937 | + include_once(includeFileProcessor("processors/duplicate_tmplvars.processor.php", $manager_theme)); |
|
938 | 938 | break; |
939 | 939 | case 305: |
940 | 940 | // get the tv-rank action |
941 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
942 | - include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php",$manager_theme)); |
|
943 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
941 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
942 | + include_once(includeFileProcessor("actions/mutate_tv_rank.dynamic.php", $manager_theme)); |
|
943 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
944 | 944 | break; |
945 | 945 | /********************************************************************/ |
946 | 946 | /* Event viewer: show event message log */ |
947 | 947 | /********************************************************************/ |
948 | 948 | case 114: |
949 | 949 | // get event logs |
950 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
951 | - include_once(includeFileProcessor("actions/eventlog.dynamic.php",$manager_theme)); |
|
952 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
950 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
951 | + include_once(includeFileProcessor("actions/eventlog.dynamic.php", $manager_theme)); |
|
952 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
953 | 953 | break; |
954 | 954 | case 115: |
955 | 955 | // get event log details viewer |
956 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
957 | - include_once(includeFileProcessor("actions/eventlog_details.dynamic.php",$manager_theme)); |
|
958 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
956 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
957 | + include_once(includeFileProcessor("actions/eventlog_details.dynamic.php", $manager_theme)); |
|
958 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
959 | 959 | break; |
960 | 960 | case 116: |
961 | 961 | // get the event log delete processor |
962 | - include_once(includeFileProcessor("processors/delete_eventlog.processor.php",$manager_theme)); |
|
962 | + include_once(includeFileProcessor("processors/delete_eventlog.processor.php", $manager_theme)); |
|
963 | 963 | break; |
964 | 964 | |
965 | 965 | case 501: |
966 | 966 | //delete category |
967 | - include_once(includeFileProcessor("processors/delete_category.processor.php",$manager_theme)); |
|
967 | + include_once(includeFileProcessor("processors/delete_category.processor.php", $manager_theme)); |
|
968 | 968 | break; |
969 | 969 | /********************************************************************/ |
970 | 970 | /* default action: show not implemented message */ |
971 | 971 | /********************************************************************/ |
972 | 972 | default : |
973 | 973 | // say that what was requested doesn't do anything yet |
974 | - include_once(includeFileProcessor("includes/header.inc.php",$manager_theme)); |
|
974 | + include_once(includeFileProcessor("includes/header.inc.php", $manager_theme)); |
|
975 | 975 | echo " |
976 | 976 | <div class='sectionHeader'>".$_lang['functionnotimpl']."</div> |
977 | 977 | <div class='sectionBody'> |
978 | 978 | <p>".$_lang['functionnotimpl_message']."</p> |
979 | 979 | </div> |
980 | 980 | "; |
981 | - include_once(includeFileProcessor("includes/footer.inc.php",$manager_theme)); |
|
981 | + include_once(includeFileProcessor("includes/footer.inc.php", $manager_theme)); |
|
982 | 982 | } |
983 | 983 | |
984 | 984 | /********************************************************************/ |
985 | 985 | // log action, unless it's a frame request |
986 | -if($action!=1 && $action!=7 && $action!=2) { |
|
986 | +if ($action != 1 && $action != 7 && $action != 2) { |
|
987 | 987 | include_once "log.class.inc.php"; |
988 | 988 | $log = new logHandler; |
989 | 989 | $log->initAndWriteLog(); |
@@ -61,9 +61,13 @@ discard block |
||
61 | 61 | $mgr_dir = substr($self_dir,strrpos($self_dir,'/')+1); |
62 | 62 | $base_path = str_replace($mgr_dir . '/index.php','',$self); |
63 | 63 | $site_mgr_path = $base_path . 'assets/cache/siteManager.php'; |
64 | -if(is_file($site_mgr_path)) include_once($site_mgr_path); |
|
64 | +if(is_file($site_mgr_path)) { |
|
65 | + include_once($site_mgr_path); |
|
66 | +} |
|
65 | 67 | $site_hostnames_path = $base_path . 'assets/cache/siteHostnames.php'; |
66 | -if(is_file($site_hostnames_path)) include_once($site_hostnames_path); |
|
68 | +if(is_file($site_hostnames_path)) { |
|
69 | + include_once($site_hostnames_path); |
|
70 | +} |
|
67 | 71 | if(!defined('MGR_DIR') || MGR_DIR!==$mgr_dir) { |
68 | 72 | $src = "<?php\n"; |
69 | 73 | $src .= "define('MGR_DIR', '{$mgr_dir}');\n"; |
@@ -117,9 +121,15 @@ discard block |
||
117 | 121 | $incPath = str_replace("\\","/",dirname(__FILE__)."/includes/"); // Mod by Raymond |
118 | 122 | set_include_path(get_include_path() . PATH_SEPARATOR . $incPath); |
119 | 123 | |
120 | -if (!defined("ENT_COMPAT")) define("ENT_COMPAT", 2); |
|
121 | -if (!defined("ENT_NOQUOTES")) define("ENT_NOQUOTES", 0); |
|
122 | -if (!defined("ENT_QUOTES")) define("ENT_QUOTES", 3); |
|
124 | +if (!defined("ENT_COMPAT")) { |
|
125 | + define("ENT_COMPAT", 2); |
|
126 | +} |
|
127 | +if (!defined("ENT_NOQUOTES")) { |
|
128 | + define("ENT_NOQUOTES", 0); |
|
129 | +} |
|
130 | +if (!defined("ENT_QUOTES")) { |
|
131 | + define("ENT_QUOTES", 3); |
|
132 | +} |
|
123 | 133 | |
124 | 134 | // set the document_root :| |
125 | 135 | if(!isset($_SERVER["DOCUMENT_ROOT"]) || empty($_SERVER["DOCUMENT_ROOT"])) { |
@@ -182,10 +192,11 @@ discard block |
||
182 | 192 | |
183 | 193 | $s = array('[+MGR_DIR+]'); |
184 | 194 | $r = array(MGR_DIR); |
185 | -foreach($_lang as $k=>$v) |
|
186 | -{ |
|
187 | - if(strpos($v,'[+')!==false) $_lang[$k] = str_replace($s, $r, $v); |
|
188 | -} |
|
195 | +foreach($_lang as $k=>$v) { |
|
196 | + if(strpos($v,'[+')!==false) { |
|
197 | + $_lang[$k] = str_replace($s, $r, $v); |
|
198 | + } |
|
199 | + } |
|
189 | 200 | |
190 | 201 | // send the charset header |
191 | 202 | header('Content-Type: text/html; charset='.$modx_manager_charset); |
@@ -198,7 +209,7 @@ discard block |
||
198 | 209 | include_once "accesscontrol.inc.php"; |
199 | 210 | |
200 | 211 | // double check the session |
201 | -if(!isset($_SESSION['mgrValidated'])){ |
|
212 | +if(!isset($_SESSION['mgrValidated'])) { |
|
202 | 213 | echo "Not Logged In!"; |
203 | 214 | exit; |
204 | 215 | } |
@@ -215,7 +226,9 @@ discard block |
||
215 | 226 | } |
216 | 227 | |
217 | 228 | // Initialize System Alert Message Queque |
218 | -if (!isset($_SESSION['SystemAlertMsgQueque'])) $_SESSION['SystemAlertMsgQueque'] = array(); |
|
229 | +if (!isset($_SESSION['SystemAlertMsgQueque'])) { |
|
230 | + $_SESSION['SystemAlertMsgQueque'] = array(); |
|
231 | +} |
|
219 | 232 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
220 | 233 | |
221 | 234 | // first we check to see if this is a frameset request |
@@ -223,7 +236,7 @@ discard block |
||
223 | 236 | // this looks to be a top-level frameset request, so let's serve up a frameset |
224 | 237 | if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/frames/1.php")) { |
225 | 238 | include_once "media/style/".$manager_theme."/frames/1.php"; |
226 | - }else{ |
|
239 | + } else { |
|
227 | 240 | include_once "frames/1.php"; |
228 | 241 | } |
229 | 242 | exit; |
@@ -231,10 +244,15 @@ discard block |
||
231 | 244 | |
232 | 245 | // OK, let's retrieve the action directive from the request |
233 | 246 | $option = array('min_range'=>1,'max_range'=>2000); |
234 | -if(isset($_GET['a']) && isset($_POST['a'])) $modx->webAlertAndQuit($_lang['error_double_action']); |
|
235 | -elseif(isset($_GET['a'])) $action = filter_input(INPUT_GET, 'a',FILTER_VALIDATE_INT,$option); |
|
236 | -elseif(isset($_POST['a'])) $action = filter_input(INPUT_POST,'a',FILTER_VALIDATE_INT,$option); |
|
237 | -else $action = null; |
|
247 | +if(isset($_GET['a']) && isset($_POST['a'])) { |
|
248 | + $modx->webAlertAndQuit($_lang['error_double_action']); |
|
249 | +} elseif(isset($_GET['a'])) { |
|
250 | + $action = filter_input(INPUT_GET, 'a',FILTER_VALIDATE_INT,$option); |
|
251 | +} elseif(isset($_POST['a'])) { |
|
252 | + $action = filter_input(INPUT_POST,'a',FILTER_VALIDATE_INT,$option); |
|
253 | +} else { |
|
254 | + $action = null; |
|
255 | +} |
|
238 | 256 | |
239 | 257 | if (isset($_POST['updateMsgCount']) && $modx->hasPermission('messages')) { |
240 | 258 | include_once 'messageCount.inc.php'; |
@@ -264,11 +282,12 @@ discard block |
||
264 | 282 | $modx->invokeEvent("OnManagerPageInit", array("action" => $action)); |
265 | 283 | |
266 | 284 | // return element filepath |
267 | -function includeFileProcessor ($filepath,$manager_theme) { |
|
285 | +function includeFileProcessor ($filepath,$manager_theme) |
|
286 | +{ |
|
268 | 287 | $element = ""; |
269 | 288 | if(is_file(MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath)) { |
270 | 289 | $element = MODX_MANAGER_PATH."media/style/".$manager_theme."/".$filepath; |
271 | - }else{ |
|
290 | + } else { |
|
272 | 291 | $element = $filepath; |
273 | 292 | } |
274 | 293 | return $element; |
@@ -1,193 +1,193 @@ |
||
1 | 1 | <?php |
2 | 2 | if(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 | if(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
7 | - header('HTTP/1.0 404 Not Found'); |
|
8 | - exit; |
|
7 | + header('HTTP/1.0 404 Not Found'); |
|
8 | + exit; |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | if(isset($_SESSION['mgrValidated']) && $_SESSION['usertype'] != 'manager') { |
12 | - // if (isset($_COOKIE[session_name()])) { |
|
13 | - // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
14 | - // } |
|
15 | - @session_destroy(); |
|
16 | - // start session |
|
17 | - // startCMSSession(); |
|
12 | + // if (isset($_COOKIE[session_name()])) { |
|
13 | + // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
14 | + // } |
|
15 | + @session_destroy(); |
|
16 | + // start session |
|
17 | + // startCMSSession(); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | // andrazk 20070416 - if installer is running, destroy active sessions |
21 | 21 | if(file_exists(MODX_BASE_PATH . 'assets/cache/installProc.inc.php')) { |
22 | - include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
23 | - if(isset($installStartTime)) { |
|
24 | - if((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
|
25 | - unset($installStartTime); |
|
26 | - @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755); |
|
27 | - unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
28 | - } else { |
|
29 | - if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
30 | - if(isset($_COOKIE[session_name()])) { |
|
31 | - session_unset(); |
|
32 | - @session_destroy(); |
|
33 | - // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
34 | - } |
|
35 | - $installGoingOn = 1; |
|
36 | - } |
|
37 | - } |
|
38 | - } |
|
22 | + include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
23 | + if(isset($installStartTime)) { |
|
24 | + if((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
|
25 | + unset($installStartTime); |
|
26 | + @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755); |
|
27 | + unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
28 | + } else { |
|
29 | + if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
30 | + if(isset($_COOKIE[session_name()])) { |
|
31 | + session_unset(); |
|
32 | + @session_destroy(); |
|
33 | + // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
34 | + } |
|
35 | + $installGoingOn = 1; |
|
36 | + } |
|
37 | + } |
|
38 | + } |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // andrazk 20070416 - if session started before install and was not destroyed yet |
42 | 42 | if(isset($lastInstallTime)) { |
43 | - if(isset($_SESSION['mgrValidated'])) { |
|
44 | - if(isset($_SESSION['modx.session.created.time'])) { |
|
45 | - if($_SESSION['modx.session.created.time'] < $lastInstallTime) { |
|
46 | - if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
47 | - if(isset($_COOKIE[session_name()])) { |
|
48 | - session_unset(); |
|
49 | - @session_destroy(); |
|
50 | - // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
51 | - } |
|
52 | - header('HTTP/1.0 307 Redirect'); |
|
53 | - header('Location: ' . MODX_MANAGER_URL . 'index.php?installGoingOn=2'); |
|
54 | - } |
|
55 | - } |
|
56 | - } |
|
57 | - } |
|
43 | + if(isset($_SESSION['mgrValidated'])) { |
|
44 | + if(isset($_SESSION['modx.session.created.time'])) { |
|
45 | + if($_SESSION['modx.session.created.time'] < $lastInstallTime) { |
|
46 | + if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
47 | + if(isset($_COOKIE[session_name()])) { |
|
48 | + session_unset(); |
|
49 | + @session_destroy(); |
|
50 | + // setcookie(session_name(), '', 0, MODX_BASE_URL); |
|
51 | + } |
|
52 | + header('HTTP/1.0 307 Redirect'); |
|
53 | + header('Location: ' . MODX_MANAGER_URL . 'index.php?installGoingOn=2'); |
|
54 | + } |
|
55 | + } |
|
56 | + } |
|
57 | + } |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | if(!isset($_SESSION['mgrValidated'])) { |
61 | - if(isset($manager_language)) { |
|
62 | - // establish fallback to English default |
|
63 | - include_once "lang/english.inc.php"; |
|
64 | - // include localized overrides |
|
65 | - include_once "lang/" . $manager_language . ".inc.php"; |
|
66 | - } else { |
|
67 | - include_once "lang/english.inc.php"; |
|
68 | - } |
|
69 | - |
|
70 | - $modx->setPlaceholder('modx_charset', $modx_manager_charset); |
|
71 | - $modx->setPlaceholder('theme', $manager_theme); |
|
61 | + if(isset($manager_language)) { |
|
62 | + // establish fallback to English default |
|
63 | + include_once "lang/english.inc.php"; |
|
64 | + // include localized overrides |
|
65 | + include_once "lang/" . $manager_language . ".inc.php"; |
|
66 | + } else { |
|
67 | + include_once "lang/english.inc.php"; |
|
68 | + } |
|
69 | + |
|
70 | + $modx->setPlaceholder('modx_charset', $modx_manager_charset); |
|
71 | + $modx->setPlaceholder('theme', $manager_theme); |
|
72 | 72 | $modx->setPlaceholder('favicon', (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico')); |
73 | 73 | |
74 | - // invoke OnManagerLoginFormPrerender event |
|
75 | - $evtOut = $modx->invokeEvent('OnManagerLoginFormPrerender'); |
|
76 | - $html = is_array($evtOut) ? implode('', $evtOut) : ''; |
|
77 | - $modx->setPlaceholder('OnManagerLoginFormPrerender', $html); |
|
78 | - |
|
79 | - $modx->setPlaceholder('site_name', $site_name); |
|
80 | - $modx->setPlaceholder('manager_path', MGR_DIR); |
|
81 | - $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]); |
|
82 | - $modx->setPlaceholder('login_message', $_lang["login_message"]); |
|
83 | - $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/'); |
|
84 | - $modx->setPlaceholder('year', date('Y')); |
|
85 | - $modx->setPlaceholder('manager_theme_style', (isset($_COOKIE['MODX_themeColor']) ? $_COOKIE['MODX_themeColor'] : '')); |
|
86 | - |
|
87 | - // andrazk 20070416 - notify user of install/update |
|
88 | - if(isset($_GET['installGoingOn'])) { |
|
89 | - $installGoingOn = $_GET['installGoingOn']; |
|
90 | - } |
|
91 | - if(isset($installGoingOn)) { |
|
92 | - switch($installGoingOn) { |
|
93 | - case 1 : |
|
94 | - $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_install_in_progress"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
95 | - break; |
|
96 | - case 2 : |
|
97 | - $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_site_was_updated"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
98 | - break; |
|
99 | - } |
|
100 | - } |
|
101 | - |
|
102 | - if($modx->config['use_captcha'] == 1) { |
|
103 | - $modx->setPlaceholder('login_captcha_message', $_lang["login_captcha_message"]); |
|
104 | - $modx->setPlaceholder('captcha_image', '<a href="' . MODX_MANAGER_URL . '" class="loginCaptcha"><img id="captcha_image" src="' . MODX_MANAGER_URL . 'includes/veriword.php?rand=' . rand() . '" alt="' . $_lang["login_captcha_message"] . '" /></a>'); |
|
105 | - $modx->setPlaceholder('captcha_input', '<label>' . $_lang["captcha_code"] . '</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
106 | - } |
|
107 | - |
|
108 | - // login info |
|
109 | - $uid = isset($_COOKIE['modx_remember_manager']) ? preg_replace('/[^a-zA-Z0-9\-_@\.]*/', '', $_COOKIE['modx_remember_manager']) : ''; |
|
110 | - $modx->setPlaceholder('uid', $uid); |
|
111 | - $modx->setPlaceholder('username', $_lang["username"]); |
|
112 | - $modx->setPlaceholder('password', $_lang["password"]); |
|
113 | - |
|
114 | - // remember me |
|
115 | - $html = isset($_COOKIE['modx_remember_manager']) ? 'checked="checked"' : ''; |
|
116 | - $modx->setPlaceholder('remember_me', $html); |
|
117 | - $modx->setPlaceholder('remember_username', $_lang["remember_username"]); |
|
118 | - $modx->setPlaceholder('login_button', $_lang["login_button"]); |
|
119 | - |
|
120 | - // invoke OnManagerLoginFormRender event |
|
121 | - $evtOut = $modx->invokeEvent('OnManagerLoginFormRender'); |
|
122 | - $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">' . implode('', $evtOut) . '</div>' : ''; |
|
123 | - $modx->setPlaceholder('OnManagerLoginFormRender', $html); |
|
124 | - |
|
125 | - // load template |
|
126 | - $target = $modx->getConfig('manager_login_tpl'); |
|
127 | - $target = str_replace('[+base_path+]', MODX_BASE_PATH, $target); |
|
128 | - $target = $modx->mergeSettingsContent($target); |
|
129 | - |
|
130 | - $login_tpl = null; |
|
131 | - if(substr($target, 0, 1) === '@') { |
|
132 | - if(substr($target, 0, 6) === '@CHUNK') { |
|
133 | - $target = trim(substr($target, 7)); |
|
134 | - $login_tpl = $modx->getChunk($target); |
|
135 | - } elseif(substr($target, 0, 5) === '@FILE') { |
|
136 | - $target = trim(substr($target, 6)); |
|
137 | - $login_tpl = file_get_contents($target); |
|
138 | - } |
|
139 | - } else { |
|
140 | - $theme_path = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/'; |
|
141 | - if(is_file($theme_path . 'style.php')) { |
|
142 | - include($theme_path . 'style.php'); |
|
143 | - } |
|
144 | - $chunk = $modx->getChunk($target); |
|
145 | - if($chunk !== false && !empty($chunk)) { |
|
146 | - $login_tpl = $chunk; |
|
147 | - } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
148 | - $target = MODX_BASE_PATH . $target; |
|
149 | - $login_tpl = file_get_contents($target); |
|
150 | - } elseif(is_file($target)) { |
|
151 | - $login_tpl = file_get_contents($target); |
|
152 | - } elseif(is_file($theme_path . 'login.tpl')) { |
|
153 | - $target = $theme_path . 'login.tpl'; |
|
154 | - $login_tpl = file_get_contents($target); |
|
155 | - } elseif(is_file($theme_path . 'templates/actions/login.tpl')) { |
|
156 | - $target = $theme_path . 'templates/actions/login.tpl'; |
|
157 | - $login_tpl = file_get_contents($target); |
|
158 | - } elseif(is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible |
|
159 | - $target = $theme_path . 'html/login.html'; |
|
160 | - $login_tpl = file_get_contents($target); |
|
161 | - } else { |
|
162 | - $target = MODX_MANAGER_PATH . 'media/style/common/login.tpl'; |
|
163 | - $login_tpl = file_get_contents($target); |
|
164 | - } |
|
165 | - } |
|
166 | - |
|
167 | - // merge placeholders |
|
168 | - $login_tpl = $modx->mergePlaceholderContent($login_tpl); |
|
169 | - $regx = strpos($login_tpl, '[[+') !== false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers |
|
170 | - $login_tpl = preg_replace($regx, '', $login_tpl); //cleanup |
|
171 | - |
|
172 | - echo $login_tpl; |
|
173 | - |
|
174 | - exit; |
|
74 | + // invoke OnManagerLoginFormPrerender event |
|
75 | + $evtOut = $modx->invokeEvent('OnManagerLoginFormPrerender'); |
|
76 | + $html = is_array($evtOut) ? implode('', $evtOut) : ''; |
|
77 | + $modx->setPlaceholder('OnManagerLoginFormPrerender', $html); |
|
78 | + |
|
79 | + $modx->setPlaceholder('site_name', $site_name); |
|
80 | + $modx->setPlaceholder('manager_path', MGR_DIR); |
|
81 | + $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]); |
|
82 | + $modx->setPlaceholder('login_message', $_lang["login_message"]); |
|
83 | + $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/'); |
|
84 | + $modx->setPlaceholder('year', date('Y')); |
|
85 | + $modx->setPlaceholder('manager_theme_style', (isset($_COOKIE['MODX_themeColor']) ? $_COOKIE['MODX_themeColor'] : '')); |
|
86 | + |
|
87 | + // andrazk 20070416 - notify user of install/update |
|
88 | + if(isset($_GET['installGoingOn'])) { |
|
89 | + $installGoingOn = $_GET['installGoingOn']; |
|
90 | + } |
|
91 | + if(isset($installGoingOn)) { |
|
92 | + switch($installGoingOn) { |
|
93 | + case 1 : |
|
94 | + $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_install_in_progress"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
95 | + break; |
|
96 | + case 2 : |
|
97 | + $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_site_was_updated"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
98 | + break; |
|
99 | + } |
|
100 | + } |
|
101 | + |
|
102 | + if($modx->config['use_captcha'] == 1) { |
|
103 | + $modx->setPlaceholder('login_captcha_message', $_lang["login_captcha_message"]); |
|
104 | + $modx->setPlaceholder('captcha_image', '<a href="' . MODX_MANAGER_URL . '" class="loginCaptcha"><img id="captcha_image" src="' . MODX_MANAGER_URL . 'includes/veriword.php?rand=' . rand() . '" alt="' . $_lang["login_captcha_message"] . '" /></a>'); |
|
105 | + $modx->setPlaceholder('captcha_input', '<label>' . $_lang["captcha_code"] . '</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
106 | + } |
|
107 | + |
|
108 | + // login info |
|
109 | + $uid = isset($_COOKIE['modx_remember_manager']) ? preg_replace('/[^a-zA-Z0-9\-_@\.]*/', '', $_COOKIE['modx_remember_manager']) : ''; |
|
110 | + $modx->setPlaceholder('uid', $uid); |
|
111 | + $modx->setPlaceholder('username', $_lang["username"]); |
|
112 | + $modx->setPlaceholder('password', $_lang["password"]); |
|
113 | + |
|
114 | + // remember me |
|
115 | + $html = isset($_COOKIE['modx_remember_manager']) ? 'checked="checked"' : ''; |
|
116 | + $modx->setPlaceholder('remember_me', $html); |
|
117 | + $modx->setPlaceholder('remember_username', $_lang["remember_username"]); |
|
118 | + $modx->setPlaceholder('login_button', $_lang["login_button"]); |
|
119 | + |
|
120 | + // invoke OnManagerLoginFormRender event |
|
121 | + $evtOut = $modx->invokeEvent('OnManagerLoginFormRender'); |
|
122 | + $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">' . implode('', $evtOut) . '</div>' : ''; |
|
123 | + $modx->setPlaceholder('OnManagerLoginFormRender', $html); |
|
124 | + |
|
125 | + // load template |
|
126 | + $target = $modx->getConfig('manager_login_tpl'); |
|
127 | + $target = str_replace('[+base_path+]', MODX_BASE_PATH, $target); |
|
128 | + $target = $modx->mergeSettingsContent($target); |
|
129 | + |
|
130 | + $login_tpl = null; |
|
131 | + if(substr($target, 0, 1) === '@') { |
|
132 | + if(substr($target, 0, 6) === '@CHUNK') { |
|
133 | + $target = trim(substr($target, 7)); |
|
134 | + $login_tpl = $modx->getChunk($target); |
|
135 | + } elseif(substr($target, 0, 5) === '@FILE') { |
|
136 | + $target = trim(substr($target, 6)); |
|
137 | + $login_tpl = file_get_contents($target); |
|
138 | + } |
|
139 | + } else { |
|
140 | + $theme_path = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/'; |
|
141 | + if(is_file($theme_path . 'style.php')) { |
|
142 | + include($theme_path . 'style.php'); |
|
143 | + } |
|
144 | + $chunk = $modx->getChunk($target); |
|
145 | + if($chunk !== false && !empty($chunk)) { |
|
146 | + $login_tpl = $chunk; |
|
147 | + } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
148 | + $target = MODX_BASE_PATH . $target; |
|
149 | + $login_tpl = file_get_contents($target); |
|
150 | + } elseif(is_file($target)) { |
|
151 | + $login_tpl = file_get_contents($target); |
|
152 | + } elseif(is_file($theme_path . 'login.tpl')) { |
|
153 | + $target = $theme_path . 'login.tpl'; |
|
154 | + $login_tpl = file_get_contents($target); |
|
155 | + } elseif(is_file($theme_path . 'templates/actions/login.tpl')) { |
|
156 | + $target = $theme_path . 'templates/actions/login.tpl'; |
|
157 | + $login_tpl = file_get_contents($target); |
|
158 | + } elseif(is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible |
|
159 | + $target = $theme_path . 'html/login.html'; |
|
160 | + $login_tpl = file_get_contents($target); |
|
161 | + } else { |
|
162 | + $target = MODX_MANAGER_PATH . 'media/style/common/login.tpl'; |
|
163 | + $login_tpl = file_get_contents($target); |
|
164 | + } |
|
165 | + } |
|
166 | + |
|
167 | + // merge placeholders |
|
168 | + $login_tpl = $modx->mergePlaceholderContent($login_tpl); |
|
169 | + $regx = strpos($login_tpl, '[[+') !== false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers |
|
170 | + $login_tpl = preg_replace($regx, '', $login_tpl); //cleanup |
|
171 | + |
|
172 | + echo $login_tpl; |
|
173 | + |
|
174 | + exit; |
|
175 | 175 | |
176 | 176 | } else { |
177 | - // Update table active_user_sessions |
|
178 | - $modx->updateValidatedUserSession(); |
|
179 | - |
|
180 | - // Update last action in table active_users |
|
181 | - $itemid = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : ''; |
|
182 | - $lasthittime = time(); |
|
183 | - $action = isset($_REQUEST['a']) ? (int) $_REQUEST['a'] : 1; |
|
184 | - |
|
185 | - if($action !== 1) { |
|
186 | - if(!intval($itemid)) { |
|
187 | - $itemid = null; |
|
188 | - } |
|
189 | - $sql = sprintf("REPLACE INTO %s (sid, internalKey, username, lasthit, action, id) VALUES ('%s', %d, '%s', %d, '%s', %s)", $modx->getFullTableName('active_users') // Table |
|
190 | - , session_id(), $modx->getLoginUserID(), $_SESSION['mgrShortname'], $lasthittime, (string) $action, $itemid == null ? var_export(null, true) : $itemid); |
|
191 | - $modx->db->query($sql); |
|
192 | - } |
|
177 | + // Update table active_user_sessions |
|
178 | + $modx->updateValidatedUserSession(); |
|
179 | + |
|
180 | + // Update last action in table active_users |
|
181 | + $itemid = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : ''; |
|
182 | + $lasthittime = time(); |
|
183 | + $action = isset($_REQUEST['a']) ? (int) $_REQUEST['a'] : 1; |
|
184 | + |
|
185 | + if($action !== 1) { |
|
186 | + if(!intval($itemid)) { |
|
187 | + $itemid = null; |
|
188 | + } |
|
189 | + $sql = sprintf("REPLACE INTO %s (sid, internalKey, username, lasthit, action, id) VALUES ('%s', %d, '%s', %d, '%s', %s)", $modx->getFullTableName('active_users') // Table |
|
190 | + , session_id(), $modx->getLoginUserID(), $_SESSION['mgrShortname'], $lasthittime, (string) $action, $itemid == null ? var_export(null, true) : $itemid); |
|
191 | + $modx->db->query($sql); |
|
192 | + } |
|
193 | 193 | } |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | -if(IN_MANAGER_MODE != "true") { |
|
2 | +if (IN_MANAGER_MODE != "true") { |
|
3 | 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 | -if(!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
6 | +if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
7 | 7 | header('HTTP/1.0 404 Not Found'); |
8 | 8 | exit; |
9 | 9 | } |
10 | 10 | |
11 | -if(isset($_SESSION['mgrValidated']) && $_SESSION['usertype'] != 'manager') { |
|
11 | +if (isset($_SESSION['mgrValidated']) && $_SESSION['usertype'] != 'manager') { |
|
12 | 12 | // if (isset($_COOKIE[session_name()])) { |
13 | 13 | // setcookie(session_name(), '', 0, MODX_BASE_URL); |
14 | 14 | // } |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | } |
19 | 19 | |
20 | 20 | // andrazk 20070416 - if installer is running, destroy active sessions |
21 | -if(file_exists(MODX_BASE_PATH . 'assets/cache/installProc.inc.php')) { |
|
22 | - include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
23 | - if(isset($installStartTime)) { |
|
24 | - if((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
|
21 | +if (file_exists(MODX_BASE_PATH.'assets/cache/installProc.inc.php')) { |
|
22 | + include_once(MODX_BASE_PATH.'assets/cache/installProc.inc.php'); |
|
23 | + if (isset($installStartTime)) { |
|
24 | + if ((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
|
25 | 25 | unset($installStartTime); |
26 | - @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755); |
|
27 | - unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
|
26 | + @ chmod(MODX_BASE_PATH.'assets/cache/installProc.inc.php', 0755); |
|
27 | + unlink(MODX_BASE_PATH.'assets/cache/installProc.inc.php'); |
|
28 | 28 | } else { |
29 | - if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
30 | - if(isset($_COOKIE[session_name()])) { |
|
29 | + if ($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
30 | + if (isset($_COOKIE[session_name()])) { |
|
31 | 31 | session_unset(); |
32 | 32 | @session_destroy(); |
33 | 33 | // setcookie(session_name(), '', 0, MODX_BASE_URL); |
@@ -39,37 +39,37 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | // andrazk 20070416 - if session started before install and was not destroyed yet |
42 | -if(isset($lastInstallTime)) { |
|
43 | - if(isset($_SESSION['mgrValidated'])) { |
|
44 | - if(isset($_SESSION['modx.session.created.time'])) { |
|
45 | - if($_SESSION['modx.session.created.time'] < $lastInstallTime) { |
|
46 | - if($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
47 | - if(isset($_COOKIE[session_name()])) { |
|
42 | +if (isset($lastInstallTime)) { |
|
43 | + if (isset($_SESSION['mgrValidated'])) { |
|
44 | + if (isset($_SESSION['modx.session.created.time'])) { |
|
45 | + if ($_SESSION['modx.session.created.time'] < $lastInstallTime) { |
|
46 | + if ($_SERVER['REQUEST_METHOD'] != 'POST') { |
|
47 | + if (isset($_COOKIE[session_name()])) { |
|
48 | 48 | session_unset(); |
49 | 49 | @session_destroy(); |
50 | 50 | // setcookie(session_name(), '', 0, MODX_BASE_URL); |
51 | 51 | } |
52 | 52 | header('HTTP/1.0 307 Redirect'); |
53 | - header('Location: ' . MODX_MANAGER_URL . 'index.php?installGoingOn=2'); |
|
53 | + header('Location: '.MODX_MANAGER_URL.'index.php?installGoingOn=2'); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | -if(!isset($_SESSION['mgrValidated'])) { |
|
61 | - if(isset($manager_language)) { |
|
60 | +if (!isset($_SESSION['mgrValidated'])) { |
|
61 | + if (isset($manager_language)) { |
|
62 | 62 | // establish fallback to English default |
63 | 63 | include_once "lang/english.inc.php"; |
64 | 64 | // include localized overrides |
65 | - include_once "lang/" . $manager_language . ".inc.php"; |
|
65 | + include_once "lang/".$manager_language.".inc.php"; |
|
66 | 66 | } else { |
67 | 67 | include_once "lang/english.inc.php"; |
68 | 68 | } |
69 | 69 | |
70 | 70 | $modx->setPlaceholder('modx_charset', $modx_manager_charset); |
71 | 71 | $modx->setPlaceholder('theme', $manager_theme); |
72 | - $modx->setPlaceholder('favicon', (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico')); |
|
72 | + $modx->setPlaceholder('favicon', (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.$modx->config['manager_theme'].'/images/favicon.ico')); |
|
73 | 73 | |
74 | 74 | // invoke OnManagerLoginFormPrerender event |
75 | 75 | $evtOut = $modx->invokeEvent('OnManagerLoginFormPrerender'); |
@@ -80,29 +80,29 @@ discard block |
||
80 | 80 | $modx->setPlaceholder('manager_path', MGR_DIR); |
81 | 81 | $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]); |
82 | 82 | $modx->setPlaceholder('login_message', $_lang["login_message"]); |
83 | - $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/'); |
|
83 | + $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/'); |
|
84 | 84 | $modx->setPlaceholder('year', date('Y')); |
85 | 85 | $modx->setPlaceholder('manager_theme_style', (isset($_COOKIE['MODX_themeColor']) ? $_COOKIE['MODX_themeColor'] : '')); |
86 | 86 | |
87 | 87 | // andrazk 20070416 - notify user of install/update |
88 | - if(isset($_GET['installGoingOn'])) { |
|
88 | + if (isset($_GET['installGoingOn'])) { |
|
89 | 89 | $installGoingOn = $_GET['installGoingOn']; |
90 | 90 | } |
91 | - if(isset($installGoingOn)) { |
|
92 | - switch($installGoingOn) { |
|
91 | + if (isset($installGoingOn)) { |
|
92 | + switch ($installGoingOn) { |
|
93 | 93 | case 1 : |
94 | - $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_install_in_progress"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
94 | + $modx->setPlaceholder('login_message', "<p><span class=\"fail\">".$_lang["login_cancelled_install_in_progress"]."</p><p>".$_lang["login_message"]."</p>"); |
|
95 | 95 | break; |
96 | 96 | case 2 : |
97 | - $modx->setPlaceholder('login_message', "<p><span class=\"fail\">" . $_lang["login_cancelled_site_was_updated"] . "</p><p>" . $_lang["login_message"] . "</p>"); |
|
97 | + $modx->setPlaceholder('login_message', "<p><span class=\"fail\">".$_lang["login_cancelled_site_was_updated"]."</p><p>".$_lang["login_message"]."</p>"); |
|
98 | 98 | break; |
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | - if($modx->config['use_captcha'] == 1) { |
|
102 | + if ($modx->config['use_captcha'] == 1) { |
|
103 | 103 | $modx->setPlaceholder('login_captcha_message', $_lang["login_captcha_message"]); |
104 | - $modx->setPlaceholder('captcha_image', '<a href="' . MODX_MANAGER_URL . '" class="loginCaptcha"><img id="captcha_image" src="' . MODX_MANAGER_URL . 'includes/veriword.php?rand=' . rand() . '" alt="' . $_lang["login_captcha_message"] . '" /></a>'); |
|
105 | - $modx->setPlaceholder('captcha_input', '<label>' . $_lang["captcha_code"] . '</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
104 | + $modx->setPlaceholder('captcha_image', '<a href="'.MODX_MANAGER_URL.'" class="loginCaptcha"><img id="captcha_image" src="'.MODX_MANAGER_URL.'includes/veriword.php?rand='.rand().'" alt="'.$_lang["login_captcha_message"].'" /></a>'); |
|
105 | + $modx->setPlaceholder('captcha_input', '<label>'.$_lang["captcha_code"].'</label> <input type="text" name="captcha_code" tabindex="3" value="" />'); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | // login info |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | |
120 | 120 | // invoke OnManagerLoginFormRender event |
121 | 121 | $evtOut = $modx->invokeEvent('OnManagerLoginFormRender'); |
122 | - $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">' . implode('', $evtOut) . '</div>' : ''; |
|
122 | + $html = is_array($evtOut) ? '<div id="onManagerLoginFormRender">'.implode('', $evtOut).'</div>' : ''; |
|
123 | 123 | $modx->setPlaceholder('OnManagerLoginFormRender', $html); |
124 | 124 | |
125 | 125 | // load template |
@@ -128,38 +128,38 @@ discard block |
||
128 | 128 | $target = $modx->mergeSettingsContent($target); |
129 | 129 | |
130 | 130 | $login_tpl = null; |
131 | - if(substr($target, 0, 1) === '@') { |
|
132 | - if(substr($target, 0, 6) === '@CHUNK') { |
|
131 | + if (substr($target, 0, 1) === '@') { |
|
132 | + if (substr($target, 0, 6) === '@CHUNK') { |
|
133 | 133 | $target = trim(substr($target, 7)); |
134 | 134 | $login_tpl = $modx->getChunk($target); |
135 | - } elseif(substr($target, 0, 5) === '@FILE') { |
|
135 | + } elseif (substr($target, 0, 5) === '@FILE') { |
|
136 | 136 | $target = trim(substr($target, 6)); |
137 | 137 | $login_tpl = file_get_contents($target); |
138 | 138 | } |
139 | 139 | } else { |
140 | - $theme_path = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/'; |
|
141 | - if(is_file($theme_path . 'style.php')) { |
|
142 | - include($theme_path . 'style.php'); |
|
140 | + $theme_path = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/'; |
|
141 | + if (is_file($theme_path.'style.php')) { |
|
142 | + include($theme_path.'style.php'); |
|
143 | 143 | } |
144 | 144 | $chunk = $modx->getChunk($target); |
145 | - if($chunk !== false && !empty($chunk)) { |
|
145 | + if ($chunk !== false && !empty($chunk)) { |
|
146 | 146 | $login_tpl = $chunk; |
147 | - } elseif(is_file(MODX_BASE_PATH . $target)) { |
|
148 | - $target = MODX_BASE_PATH . $target; |
|
147 | + } elseif (is_file(MODX_BASE_PATH.$target)) { |
|
148 | + $target = MODX_BASE_PATH.$target; |
|
149 | 149 | $login_tpl = file_get_contents($target); |
150 | - } elseif(is_file($target)) { |
|
150 | + } elseif (is_file($target)) { |
|
151 | 151 | $login_tpl = file_get_contents($target); |
152 | - } elseif(is_file($theme_path . 'login.tpl')) { |
|
153 | - $target = $theme_path . 'login.tpl'; |
|
152 | + } elseif (is_file($theme_path.'login.tpl')) { |
|
153 | + $target = $theme_path.'login.tpl'; |
|
154 | 154 | $login_tpl = file_get_contents($target); |
155 | - } elseif(is_file($theme_path . 'templates/actions/login.tpl')) { |
|
156 | - $target = $theme_path . 'templates/actions/login.tpl'; |
|
155 | + } elseif (is_file($theme_path.'templates/actions/login.tpl')) { |
|
156 | + $target = $theme_path.'templates/actions/login.tpl'; |
|
157 | 157 | $login_tpl = file_get_contents($target); |
158 | - } elseif(is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible |
|
159 | - $target = $theme_path . 'html/login.html'; |
|
158 | + } elseif (is_file($theme_path.'html/login.html')) { // ClipperCMS compatible |
|
159 | + $target = $theme_path.'html/login.html'; |
|
160 | 160 | $login_tpl = file_get_contents($target); |
161 | 161 | } else { |
162 | - $target = MODX_MANAGER_PATH . 'media/style/common/login.tpl'; |
|
162 | + $target = MODX_MANAGER_PATH.'media/style/common/login.tpl'; |
|
163 | 163 | $login_tpl = file_get_contents($target); |
164 | 164 | } |
165 | 165 | } |
@@ -182,8 +182,8 @@ discard block |
||
182 | 182 | $lasthittime = time(); |
183 | 183 | $action = isset($_REQUEST['a']) ? (int) $_REQUEST['a'] : 1; |
184 | 184 | |
185 | - if($action !== 1) { |
|
186 | - if(!intval($itemid)) { |
|
185 | + if ($action !== 1) { |
|
186 | + if (!intval($itemid)) { |
|
187 | 187 | $itemid = null; |
188 | 188 | } |
189 | 189 | $sql = sprintf("REPLACE INTO %s (sid, internalKey, username, lasthit, action, id) VALUES ('%s', %d, '%s', %d, '%s', %s)", $modx->getFullTableName('active_users') // Table |
@@ -21,7 +21,8 @@ discard block |
||
21 | 21 | if(file_exists(MODX_BASE_PATH . 'assets/cache/installProc.inc.php')) { |
22 | 22 | include_once(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
23 | 23 | if(isset($installStartTime)) { |
24 | - if((time() - $installStartTime) > 5 * 60) { // if install flag older than 5 minutes, discard |
|
24 | + if((time() - $installStartTime) > 5 * 60) { |
|
25 | +// if install flag older than 5 minutes, discard |
|
25 | 26 | unset($installStartTime); |
26 | 27 | @ chmod(MODX_BASE_PATH . 'assets/cache/installProc.inc.php', 0755); |
27 | 28 | unlink(MODX_BASE_PATH . 'assets/cache/installProc.inc.php'); |
@@ -155,7 +156,8 @@ discard block |
||
155 | 156 | } elseif(is_file($theme_path . 'templates/actions/login.tpl')) { |
156 | 157 | $target = $theme_path . 'templates/actions/login.tpl'; |
157 | 158 | $login_tpl = file_get_contents($target); |
158 | - } elseif(is_file($theme_path . 'html/login.html')) { // ClipperCMS compatible |
|
159 | + } elseif(is_file($theme_path . 'html/login.html')) { |
|
160 | +// ClipperCMS compatible |
|
159 | 161 | $target = $theme_path . 'html/login.html'; |
160 | 162 | $login_tpl = file_get_contents($target); |
161 | 163 | } else { |
@@ -7,364 +7,364 @@ |
||
7 | 7 | // Added by Raymond 20-Jan-2005 |
8 | 8 | function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype = "", $docid = "", $sep = '') { |
9 | 9 | |
10 | - global $modx; |
|
10 | + global $modx; |
|
11 | 11 | |
12 | - // process any TV commands in value |
|
13 | - $docid = intval($docid) ? intval($docid) : $modx->documentIdentifier; |
|
14 | - $value = ProcessTVCommand($value, $name, $docid); |
|
12 | + // process any TV commands in value |
|
13 | + $docid = intval($docid) ? intval($docid) : $modx->documentIdentifier; |
|
14 | + $value = ProcessTVCommand($value, $name, $docid); |
|
15 | 15 | |
16 | - $params = array(); |
|
17 | - if($paramstring) { |
|
18 | - $cp = explode("&", $paramstring); |
|
19 | - foreach($cp as $p => $v) { |
|
20 | - $v = trim($v); // trim |
|
21 | - $ar = explode("=", $v); |
|
22 | - if(is_array($ar) && count($ar) == 2) { |
|
23 | - $params[$ar[0]] = decodeParamValue($ar[1]); |
|
24 | - } |
|
25 | - } |
|
26 | - } |
|
16 | + $params = array(); |
|
17 | + if($paramstring) { |
|
18 | + $cp = explode("&", $paramstring); |
|
19 | + foreach($cp as $p => $v) { |
|
20 | + $v = trim($v); // trim |
|
21 | + $ar = explode("=", $v); |
|
22 | + if(is_array($ar) && count($ar) == 2) { |
|
23 | + $params[$ar[0]] = decodeParamValue($ar[1]); |
|
24 | + } |
|
25 | + } |
|
26 | + } |
|
27 | 27 | |
28 | - $id = "tv$name"; |
|
29 | - switch($format) { |
|
30 | - case 'image': |
|
31 | - $images = parseInput($value, '||', 'array'); |
|
32 | - $o = ''; |
|
33 | - foreach($images as $image) { |
|
34 | - if(!is_array($image)) { |
|
35 | - $image = explode('==', $image); |
|
36 | - } |
|
37 | - $src = $image[0]; |
|
28 | + $id = "tv$name"; |
|
29 | + switch($format) { |
|
30 | + case 'image': |
|
31 | + $images = parseInput($value, '||', 'array'); |
|
32 | + $o = ''; |
|
33 | + foreach($images as $image) { |
|
34 | + if(!is_array($image)) { |
|
35 | + $image = explode('==', $image); |
|
36 | + } |
|
37 | + $src = $image[0]; |
|
38 | 38 | |
39 | - if($src) { |
|
40 | - // We have a valid source |
|
41 | - $attributes = ''; |
|
42 | - $attr = array( |
|
43 | - 'class' => $params['class'], |
|
44 | - 'src' => $src, |
|
45 | - 'id' => ($params['id'] ? $params['id'] : ''), |
|
46 | - 'alt' => $modx->htmlspecialchars($params['alttext']), |
|
47 | - 'style' => $params['style'] |
|
48 | - ); |
|
49 | - if(isset($params['align']) && $params['align'] != 'none') { |
|
50 | - $attr['align'] = $params['align']; |
|
51 | - } |
|
52 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
53 | - $attributes .= ' ' . $params['attrib']; |
|
39 | + if($src) { |
|
40 | + // We have a valid source |
|
41 | + $attributes = ''; |
|
42 | + $attr = array( |
|
43 | + 'class' => $params['class'], |
|
44 | + 'src' => $src, |
|
45 | + 'id' => ($params['id'] ? $params['id'] : ''), |
|
46 | + 'alt' => $modx->htmlspecialchars($params['alttext']), |
|
47 | + 'style' => $params['style'] |
|
48 | + ); |
|
49 | + if(isset($params['align']) && $params['align'] != 'none') { |
|
50 | + $attr['align'] = $params['align']; |
|
51 | + } |
|
52 | + foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
53 | + $attributes .= ' ' . $params['attrib']; |
|
54 | 54 | |
55 | - // Output the image with attributes |
|
56 | - $o .= '<img' . rtrim($attributes) . ' />'; |
|
57 | - } |
|
58 | - } |
|
59 | - break; |
|
55 | + // Output the image with attributes |
|
56 | + $o .= '<img' . rtrim($attributes) . ' />'; |
|
57 | + } |
|
58 | + } |
|
59 | + break; |
|
60 | 60 | |
61 | - case "delim": // display as delimitted list |
|
62 | - $value = parseInput($value, "||"); |
|
63 | - $p = $params['format'] ? $params['format'] : " "; |
|
64 | - if($p == "\\n") { |
|
65 | - $p = "\n"; |
|
66 | - } |
|
67 | - $o = str_replace("||", $p, $value); |
|
68 | - break; |
|
61 | + case "delim": // display as delimitted list |
|
62 | + $value = parseInput($value, "||"); |
|
63 | + $p = $params['format'] ? $params['format'] : " "; |
|
64 | + if($p == "\\n") { |
|
65 | + $p = "\n"; |
|
66 | + } |
|
67 | + $o = str_replace("||", $p, $value); |
|
68 | + break; |
|
69 | 69 | |
70 | - case "string": |
|
71 | - $value = parseInput($value); |
|
72 | - $format = strtolower($params['format']); |
|
73 | - if($format == 'upper case') { |
|
74 | - $o = strtoupper($value); |
|
75 | - } else if($format == 'lower case') { |
|
76 | - $o = strtolower($value); |
|
77 | - } else if($format == 'sentence case') { |
|
78 | - $o = ucfirst($value); |
|
79 | - } else if($format == 'capitalize') { |
|
80 | - $o = ucwords($value); |
|
81 | - } else { |
|
82 | - $o = $value; |
|
83 | - } |
|
84 | - break; |
|
70 | + case "string": |
|
71 | + $value = parseInput($value); |
|
72 | + $format = strtolower($params['format']); |
|
73 | + if($format == 'upper case') { |
|
74 | + $o = strtoupper($value); |
|
75 | + } else if($format == 'lower case') { |
|
76 | + $o = strtolower($value); |
|
77 | + } else if($format == 'sentence case') { |
|
78 | + $o = ucfirst($value); |
|
79 | + } else if($format == 'capitalize') { |
|
80 | + $o = ucwords($value); |
|
81 | + } else { |
|
82 | + $o = $value; |
|
83 | + } |
|
84 | + break; |
|
85 | 85 | |
86 | - case "date": |
|
87 | - if($value != '' || $params['default'] == 'Yes') { |
|
88 | - if(empty($value)) { |
|
89 | - $value = 'now'; |
|
90 | - } |
|
91 | - $timestamp = getUnixtimeFromDateString($value); |
|
92 | - $p = $params['format'] ? $params['format'] : "%A %d, %B %Y"; |
|
93 | - $o = strftime($p, $timestamp); |
|
94 | - } else { |
|
95 | - $value = ''; |
|
96 | - } |
|
97 | - break; |
|
86 | + case "date": |
|
87 | + if($value != '' || $params['default'] == 'Yes') { |
|
88 | + if(empty($value)) { |
|
89 | + $value = 'now'; |
|
90 | + } |
|
91 | + $timestamp = getUnixtimeFromDateString($value); |
|
92 | + $p = $params['format'] ? $params['format'] : "%A %d, %B %Y"; |
|
93 | + $o = strftime($p, $timestamp); |
|
94 | + } else { |
|
95 | + $value = ''; |
|
96 | + } |
|
97 | + break; |
|
98 | 98 | |
99 | - case "hyperlink": |
|
100 | - $value = parseInput($value, "||", "array"); |
|
101 | - $o = ''; |
|
102 | - for($i = 0; $i < count($value); $i++) { |
|
103 | - list($name, $url) = is_array($value[$i]) ? $value[$i] : explode("==", $value[$i]); |
|
104 | - if(!$url) { |
|
105 | - $url = $name; |
|
106 | - } |
|
107 | - if($url) { |
|
108 | - if($o) { |
|
109 | - $o .= '<br />'; |
|
110 | - } |
|
111 | - $attributes = ''; |
|
112 | - // setup the link attributes |
|
113 | - $attr = array( |
|
114 | - 'href' => $url, |
|
115 | - 'title' => $params['title'] ? $modx->htmlspecialchars($params['title']) : $name, |
|
116 | - 'class' => $params['class'], |
|
117 | - 'style' => $params['style'], |
|
118 | - 'target' => $params['target'], |
|
119 | - ); |
|
120 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
121 | - $attributes .= ' ' . $params['attrib']; // add extra |
|
99 | + case "hyperlink": |
|
100 | + $value = parseInput($value, "||", "array"); |
|
101 | + $o = ''; |
|
102 | + for($i = 0; $i < count($value); $i++) { |
|
103 | + list($name, $url) = is_array($value[$i]) ? $value[$i] : explode("==", $value[$i]); |
|
104 | + if(!$url) { |
|
105 | + $url = $name; |
|
106 | + } |
|
107 | + if($url) { |
|
108 | + if($o) { |
|
109 | + $o .= '<br />'; |
|
110 | + } |
|
111 | + $attributes = ''; |
|
112 | + // setup the link attributes |
|
113 | + $attr = array( |
|
114 | + 'href' => $url, |
|
115 | + 'title' => $params['title'] ? $modx->htmlspecialchars($params['title']) : $name, |
|
116 | + 'class' => $params['class'], |
|
117 | + 'style' => $params['style'], |
|
118 | + 'target' => $params['target'], |
|
119 | + ); |
|
120 | + foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
121 | + $attributes .= ' ' . $params['attrib']; // add extra |
|
122 | 122 | |
123 | - // Output the link |
|
124 | - $o .= '<a' . rtrim($attributes) . '>' . ($params['text'] ? $modx->htmlspecialchars($params['text']) : $name) . '</a>'; |
|
125 | - } |
|
126 | - } |
|
127 | - break; |
|
123 | + // Output the link |
|
124 | + $o .= '<a' . rtrim($attributes) . '>' . ($params['text'] ? $modx->htmlspecialchars($params['text']) : $name) . '</a>'; |
|
125 | + } |
|
126 | + } |
|
127 | + break; |
|
128 | 128 | |
129 | - case "htmltag": |
|
130 | - $value = parseInput($value, "||", "array"); |
|
131 | - $tagid = $params['tagid']; |
|
132 | - $tagname = ($params['tagname']) ? $params['tagname'] : 'div'; |
|
133 | - $o = ''; |
|
134 | - // Loop through a list of tags |
|
135 | - for($i = 0; $i < count($value); $i++) { |
|
136 | - $tagvalue = is_array($value[$i]) ? implode(' ', $value[$i]) : $value[$i]; |
|
137 | - if(!$tagvalue) { |
|
138 | - continue; |
|
139 | - } |
|
129 | + case "htmltag": |
|
130 | + $value = parseInput($value, "||", "array"); |
|
131 | + $tagid = $params['tagid']; |
|
132 | + $tagname = ($params['tagname']) ? $params['tagname'] : 'div'; |
|
133 | + $o = ''; |
|
134 | + // Loop through a list of tags |
|
135 | + for($i = 0; $i < count($value); $i++) { |
|
136 | + $tagvalue = is_array($value[$i]) ? implode(' ', $value[$i]) : $value[$i]; |
|
137 | + if(!$tagvalue) { |
|
138 | + continue; |
|
139 | + } |
|
140 | 140 | |
141 | - $attributes = ''; |
|
142 | - $attr = array( |
|
143 | - 'id' => ($tagid ? $tagid : $id), |
|
144 | - // 'tv' already added to id |
|
145 | - 'class' => $params['class'], |
|
146 | - 'style' => $params['style'], |
|
147 | - ); |
|
148 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
149 | - $attributes .= ' ' . $params['attrib']; // add extra |
|
141 | + $attributes = ''; |
|
142 | + $attr = array( |
|
143 | + 'id' => ($tagid ? $tagid : $id), |
|
144 | + // 'tv' already added to id |
|
145 | + 'class' => $params['class'], |
|
146 | + 'style' => $params['style'], |
|
147 | + ); |
|
148 | + foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
149 | + $attributes .= ' ' . $params['attrib']; // add extra |
|
150 | 150 | |
151 | - // Output the HTML Tag |
|
152 | - $o .= '<' . $tagname . rtrim($attributes) . '>' . $tagvalue . '</' . $tagname . '>'; |
|
153 | - } |
|
154 | - break; |
|
151 | + // Output the HTML Tag |
|
152 | + $o .= '<' . $tagname . rtrim($attributes) . '>' . $tagvalue . '</' . $tagname . '>'; |
|
153 | + } |
|
154 | + break; |
|
155 | 155 | |
156 | - case "richtext": |
|
157 | - $value = parseInput($value); |
|
158 | - $w = $params['w'] ? $params['w'] : '100%'; |
|
159 | - $h = $params['h'] ? $params['h'] : '400px'; |
|
160 | - $richtexteditor = $params['edt'] ? $params['edt'] : ""; |
|
161 | - $o = '<div class="MODX_RichTextWidget"><textarea id="' . $id . '" name="' . $id . '" style="width:' . $w . '; height:' . $h . ';">'; |
|
162 | - $o .= $modx->htmlspecialchars($value); |
|
163 | - $o .= '</textarea></div>'; |
|
164 | - $replace_richtext = array($id); |
|
165 | - // setup editors |
|
166 | - if(!empty($replace_richtext) && !empty($richtexteditor)) { |
|
167 | - // invoke OnRichTextEditorInit event |
|
168 | - $evtOut = $modx->invokeEvent("OnRichTextEditorInit", array( |
|
169 | - 'editor' => $richtexteditor, |
|
170 | - 'elements' => $replace_richtext, |
|
171 | - 'forfrontend' => 1, |
|
172 | - 'width' => $w, |
|
173 | - 'height' => $h |
|
174 | - )); |
|
175 | - if(is_array($evtOut)) { |
|
176 | - $o .= implode("", $evtOut); |
|
177 | - } |
|
178 | - } |
|
179 | - break; |
|
156 | + case "richtext": |
|
157 | + $value = parseInput($value); |
|
158 | + $w = $params['w'] ? $params['w'] : '100%'; |
|
159 | + $h = $params['h'] ? $params['h'] : '400px'; |
|
160 | + $richtexteditor = $params['edt'] ? $params['edt'] : ""; |
|
161 | + $o = '<div class="MODX_RichTextWidget"><textarea id="' . $id . '" name="' . $id . '" style="width:' . $w . '; height:' . $h . ';">'; |
|
162 | + $o .= $modx->htmlspecialchars($value); |
|
163 | + $o .= '</textarea></div>'; |
|
164 | + $replace_richtext = array($id); |
|
165 | + // setup editors |
|
166 | + if(!empty($replace_richtext) && !empty($richtexteditor)) { |
|
167 | + // invoke OnRichTextEditorInit event |
|
168 | + $evtOut = $modx->invokeEvent("OnRichTextEditorInit", array( |
|
169 | + 'editor' => $richtexteditor, |
|
170 | + 'elements' => $replace_richtext, |
|
171 | + 'forfrontend' => 1, |
|
172 | + 'width' => $w, |
|
173 | + 'height' => $h |
|
174 | + )); |
|
175 | + if(is_array($evtOut)) { |
|
176 | + $o .= implode("", $evtOut); |
|
177 | + } |
|
178 | + } |
|
179 | + break; |
|
180 | 180 | |
181 | - case "unixtime": |
|
182 | - $value = parseInput($value); |
|
183 | - $o = getUnixtimeFromDateString($value); |
|
184 | - break; |
|
181 | + case "unixtime": |
|
182 | + $value = parseInput($value); |
|
183 | + $o = getUnixtimeFromDateString($value); |
|
184 | + break; |
|
185 | 185 | |
186 | - case "viewport": |
|
187 | - $value = parseInput($value); |
|
188 | - $id = '_' . time(); |
|
189 | - if(!$params['vpid']) { |
|
190 | - $params['vpid'] = $id; |
|
191 | - } |
|
192 | - $sTag = "<iframe"; |
|
193 | - $eTag = "</iframe>"; |
|
194 | - $autoMode = "0"; |
|
195 | - $w = $params['width']; |
|
196 | - $h = $params['height']; |
|
197 | - if($params['stretch'] == 'Yes') { |
|
198 | - $w = "100%"; |
|
199 | - $h = "100%"; |
|
200 | - } |
|
201 | - if($params['asize'] == 'Yes' || ($params['awidth'] == 'Yes' && $params['aheight'] == 'Yes')) { |
|
202 | - $autoMode = "3"; //both |
|
203 | - } else if($params['awidth'] == 'Yes') { |
|
204 | - $autoMode = "1"; //width only |
|
205 | - } else if($params['aheight'] == 'Yes') { |
|
206 | - $autoMode = "2"; //height only |
|
207 | - } |
|
186 | + case "viewport": |
|
187 | + $value = parseInput($value); |
|
188 | + $id = '_' . time(); |
|
189 | + if(!$params['vpid']) { |
|
190 | + $params['vpid'] = $id; |
|
191 | + } |
|
192 | + $sTag = "<iframe"; |
|
193 | + $eTag = "</iframe>"; |
|
194 | + $autoMode = "0"; |
|
195 | + $w = $params['width']; |
|
196 | + $h = $params['height']; |
|
197 | + if($params['stretch'] == 'Yes') { |
|
198 | + $w = "100%"; |
|
199 | + $h = "100%"; |
|
200 | + } |
|
201 | + if($params['asize'] == 'Yes' || ($params['awidth'] == 'Yes' && $params['aheight'] == 'Yes')) { |
|
202 | + $autoMode = "3"; //both |
|
203 | + } else if($params['awidth'] == 'Yes') { |
|
204 | + $autoMode = "1"; //width only |
|
205 | + } else if($params['aheight'] == 'Yes') { |
|
206 | + $autoMode = "2"; //height only |
|
207 | + } |
|
208 | 208 | |
209 | - $modx->regClientStartupScript(MODX_MANAGER_URL . "media/script/bin/viewport.js", array( |
|
210 | - 'name' => 'viewport', |
|
211 | - 'version' => '0', |
|
212 | - 'plaintext' => false |
|
213 | - )); |
|
214 | - $o = $sTag . " id='" . $params['vpid'] . "' name='" . $params['vpid'] . "' "; |
|
215 | - if($params['class']) { |
|
216 | - $o .= " class='" . $params['class'] . "' "; |
|
217 | - } |
|
218 | - if($params['style']) { |
|
219 | - $o .= " style='" . $params['style'] . "' "; |
|
220 | - } |
|
221 | - if($params['attrib']) { |
|
222 | - $o .= $params['attrib'] . " "; |
|
223 | - } |
|
224 | - $o .= "scrolling='" . ($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto")) . "' "; |
|
225 | - $o .= "src='" . $value . "' frameborder='" . $params['borsize'] . "' "; |
|
226 | - $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'" . $params['vpid'] . "\\'," . $autoMode . ")',100);\" width='" . $w . "' height='" . $h . "' "; |
|
227 | - $o .= ">"; |
|
228 | - $o .= $eTag; |
|
229 | - break; |
|
209 | + $modx->regClientStartupScript(MODX_MANAGER_URL . "media/script/bin/viewport.js", array( |
|
210 | + 'name' => 'viewport', |
|
211 | + 'version' => '0', |
|
212 | + 'plaintext' => false |
|
213 | + )); |
|
214 | + $o = $sTag . " id='" . $params['vpid'] . "' name='" . $params['vpid'] . "' "; |
|
215 | + if($params['class']) { |
|
216 | + $o .= " class='" . $params['class'] . "' "; |
|
217 | + } |
|
218 | + if($params['style']) { |
|
219 | + $o .= " style='" . $params['style'] . "' "; |
|
220 | + } |
|
221 | + if($params['attrib']) { |
|
222 | + $o .= $params['attrib'] . " "; |
|
223 | + } |
|
224 | + $o .= "scrolling='" . ($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto")) . "' "; |
|
225 | + $o .= "src='" . $value . "' frameborder='" . $params['borsize'] . "' "; |
|
226 | + $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'" . $params['vpid'] . "\\'," . $autoMode . ")',100);\" width='" . $w . "' height='" . $h . "' "; |
|
227 | + $o .= ">"; |
|
228 | + $o .= $eTag; |
|
229 | + break; |
|
230 | 230 | |
231 | - case "datagrid": |
|
232 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
233 | - $grd = new DataGrid('', $value); |
|
231 | + case "datagrid": |
|
232 | + include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
233 | + $grd = new DataGrid('', $value); |
|
234 | 234 | |
235 | - $grd->noRecordMsg = $params['egmsg']; |
|
235 | + $grd->noRecordMsg = $params['egmsg']; |
|
236 | 236 | |
237 | - $grd->columnHeaderClass = $params['chdrc']; |
|
238 | - $grd->cssClass = $params['tblc']; |
|
239 | - $grd->itemClass = $params['itmc']; |
|
240 | - $grd->altItemClass = $params['aitmc']; |
|
237 | + $grd->columnHeaderClass = $params['chdrc']; |
|
238 | + $grd->cssClass = $params['tblc']; |
|
239 | + $grd->itemClass = $params['itmc']; |
|
240 | + $grd->altItemClass = $params['aitmc']; |
|
241 | 241 | |
242 | - $grd->columnHeaderStyle = $params['chdrs']; |
|
243 | - $grd->cssStyle = $params['tbls']; |
|
244 | - $grd->itemStyle = $params['itms']; |
|
245 | - $grd->altItemStyle = $params['aitms']; |
|
242 | + $grd->columnHeaderStyle = $params['chdrs']; |
|
243 | + $grd->cssStyle = $params['tbls']; |
|
244 | + $grd->itemStyle = $params['itms']; |
|
245 | + $grd->altItemStyle = $params['aitms']; |
|
246 | 246 | |
247 | - $grd->columns = $params['cols']; |
|
248 | - $grd->fields = $params['flds']; |
|
249 | - $grd->colWidths = $params['cwidth']; |
|
250 | - $grd->colAligns = $params['calign']; |
|
251 | - $grd->colColors = $params['ccolor']; |
|
252 | - $grd->colTypes = $params['ctype']; |
|
247 | + $grd->columns = $params['cols']; |
|
248 | + $grd->fields = $params['flds']; |
|
249 | + $grd->colWidths = $params['cwidth']; |
|
250 | + $grd->colAligns = $params['calign']; |
|
251 | + $grd->colColors = $params['ccolor']; |
|
252 | + $grd->colTypes = $params['ctype']; |
|
253 | 253 | |
254 | - $grd->cellPadding = $params['cpad']; |
|
255 | - $grd->cellSpacing = $params['cspace']; |
|
256 | - $grd->header = $params['head']; |
|
257 | - $grd->footer = $params['foot']; |
|
258 | - $grd->pageSize = $params['psize']; |
|
259 | - $grd->pagerLocation = $params['ploc']; |
|
260 | - $grd->pagerClass = $params['pclass']; |
|
261 | - $grd->pagerStyle = $params['pstyle']; |
|
262 | - $o = $grd->render(); |
|
263 | - break; |
|
254 | + $grd->cellPadding = $params['cpad']; |
|
255 | + $grd->cellSpacing = $params['cspace']; |
|
256 | + $grd->header = $params['head']; |
|
257 | + $grd->footer = $params['foot']; |
|
258 | + $grd->pageSize = $params['psize']; |
|
259 | + $grd->pagerLocation = $params['ploc']; |
|
260 | + $grd->pagerClass = $params['pclass']; |
|
261 | + $grd->pagerStyle = $params['pstyle']; |
|
262 | + $o = $grd->render(); |
|
263 | + break; |
|
264 | 264 | |
265 | - case 'htmlentities': |
|
266 | - $value = parseInput($value); |
|
267 | - if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
268 | - // remove delimiter from checkbox and listbox-multiple TVs |
|
269 | - $value = str_replace('||', '', $value); |
|
270 | - } |
|
271 | - $o = htmlentities($value, ENT_NOQUOTES, $modx->config['modx_charset']); |
|
272 | - break; |
|
265 | + case 'htmlentities': |
|
266 | + $value = parseInput($value); |
|
267 | + if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
268 | + // remove delimiter from checkbox and listbox-multiple TVs |
|
269 | + $value = str_replace('||', '', $value); |
|
270 | + } |
|
271 | + $o = htmlentities($value, ENT_NOQUOTES, $modx->config['modx_charset']); |
|
272 | + break; |
|
273 | 273 | |
274 | - case 'custom_widget': |
|
275 | - $widget_output = ''; |
|
276 | - $o = ''; |
|
277 | - /* If we are loading a file */ |
|
278 | - if(substr($params['output'], 0, 5) == "@FILE") { |
|
279 | - $file_name = MODX_BASE_PATH . trim(substr($params['output'], 6)); |
|
280 | - if(!file_exists($file_name)) { |
|
281 | - $widget_output = $file_name . ' does not exist'; |
|
282 | - } else { |
|
283 | - $widget_output = file_get_contents($file_name); |
|
284 | - } |
|
285 | - } elseif(substr($params['output'], 0, 8) == '@INCLUDE') { |
|
286 | - $file_name = MODX_BASE_PATH . trim(substr($params['output'], 9)); |
|
287 | - if(!file_exists($file_name)) { |
|
288 | - $widget_output = $file_name . ' does not exist'; |
|
289 | - } else { |
|
290 | - /* The included file needs to set $widget_output. Can be string, array, object */ |
|
291 | - include $file_name; |
|
292 | - } |
|
293 | - } elseif(substr($params['output'], 0, 6) == '@CHUNK' && $value !== '') { |
|
294 | - $chunk_name = trim(substr($params['output'], 7)); |
|
295 | - $widget_output = $modx->getChunk($chunk_name); |
|
296 | - } elseif(substr($params['output'], 0, 5) == '@EVAL' && $value !== '') { |
|
297 | - $eval_str = trim(substr($params['output'], 6)); |
|
298 | - $widget_output = eval($eval_str); |
|
299 | - } elseif($value !== '') { |
|
300 | - $widget_output = $params['output']; |
|
301 | - } else { |
|
302 | - $widget_output = ''; |
|
303 | - } |
|
304 | - if(is_string($widget_output)) { |
|
305 | - $_ = $modx->config['enable_filter']; |
|
306 | - $modx->config['enable_filter'] = 1; |
|
307 | - $widget_output = $modx->parseText($widget_output, array('value' => $value)); |
|
308 | - $modx->config['enable_filter'] = $_; |
|
309 | - $o = $modx->parseDocumentSource($widget_output); |
|
310 | - } else { |
|
311 | - $o = $widget_output; |
|
312 | - } |
|
313 | - break; |
|
274 | + case 'custom_widget': |
|
275 | + $widget_output = ''; |
|
276 | + $o = ''; |
|
277 | + /* If we are loading a file */ |
|
278 | + if(substr($params['output'], 0, 5) == "@FILE") { |
|
279 | + $file_name = MODX_BASE_PATH . trim(substr($params['output'], 6)); |
|
280 | + if(!file_exists($file_name)) { |
|
281 | + $widget_output = $file_name . ' does not exist'; |
|
282 | + } else { |
|
283 | + $widget_output = file_get_contents($file_name); |
|
284 | + } |
|
285 | + } elseif(substr($params['output'], 0, 8) == '@INCLUDE') { |
|
286 | + $file_name = MODX_BASE_PATH . trim(substr($params['output'], 9)); |
|
287 | + if(!file_exists($file_name)) { |
|
288 | + $widget_output = $file_name . ' does not exist'; |
|
289 | + } else { |
|
290 | + /* The included file needs to set $widget_output. Can be string, array, object */ |
|
291 | + include $file_name; |
|
292 | + } |
|
293 | + } elseif(substr($params['output'], 0, 6) == '@CHUNK' && $value !== '') { |
|
294 | + $chunk_name = trim(substr($params['output'], 7)); |
|
295 | + $widget_output = $modx->getChunk($chunk_name); |
|
296 | + } elseif(substr($params['output'], 0, 5) == '@EVAL' && $value !== '') { |
|
297 | + $eval_str = trim(substr($params['output'], 6)); |
|
298 | + $widget_output = eval($eval_str); |
|
299 | + } elseif($value !== '') { |
|
300 | + $widget_output = $params['output']; |
|
301 | + } else { |
|
302 | + $widget_output = ''; |
|
303 | + } |
|
304 | + if(is_string($widget_output)) { |
|
305 | + $_ = $modx->config['enable_filter']; |
|
306 | + $modx->config['enable_filter'] = 1; |
|
307 | + $widget_output = $modx->parseText($widget_output, array('value' => $value)); |
|
308 | + $modx->config['enable_filter'] = $_; |
|
309 | + $o = $modx->parseDocumentSource($widget_output); |
|
310 | + } else { |
|
311 | + $o = $widget_output; |
|
312 | + } |
|
313 | + break; |
|
314 | 314 | |
315 | - default: |
|
316 | - $value = parseInput($value); |
|
317 | - if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
318 | - // add separator |
|
319 | - $value = explode('||', $value); |
|
320 | - $value = implode($sep, $value); |
|
321 | - } |
|
322 | - $o = $value; |
|
323 | - break; |
|
324 | - } |
|
325 | - return $o; |
|
315 | + default: |
|
316 | + $value = parseInput($value); |
|
317 | + if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
318 | + // add separator |
|
319 | + $value = explode('||', $value); |
|
320 | + $value = implode($sep, $value); |
|
321 | + } |
|
322 | + $o = $value; |
|
323 | + break; |
|
324 | + } |
|
325 | + return $o; |
|
326 | 326 | } |
327 | 327 | |
328 | 328 | function decodeParamValue($s) { |
329 | - $s = str_replace("%3D", '=', $s); // = |
|
330 | - $s = str_replace("%26", '&', $s); // & |
|
331 | - return $s; |
|
329 | + $s = str_replace("%3D", '=', $s); // = |
|
330 | + $s = str_replace("%26", '&', $s); // & |
|
331 | + return $s; |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | // returns an array if a delimiter is present. returns array is a recordset is present |
335 | 335 | function parseInput($src, $delim = "||", $type = "string", $columns = true) { // type can be: string, array |
336 | - global $modx; |
|
337 | - if($modx->db->isResult($src)) { |
|
338 | - // must be a recordset |
|
339 | - $rows = array(); |
|
340 | - while($cols = $modx->db->getRow($src, 'num')) $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
341 | - return ($type == "array") ? $rows : implode($delim, $rows); |
|
342 | - } else { |
|
343 | - // must be a text |
|
344 | - if($type == "array") { |
|
345 | - return explode($delim, $src); |
|
346 | - } else { |
|
347 | - return $src; |
|
348 | - } |
|
349 | - } |
|
336 | + global $modx; |
|
337 | + if($modx->db->isResult($src)) { |
|
338 | + // must be a recordset |
|
339 | + $rows = array(); |
|
340 | + while($cols = $modx->db->getRow($src, 'num')) $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
341 | + return ($type == "array") ? $rows : implode($delim, $rows); |
|
342 | + } else { |
|
343 | + // must be a text |
|
344 | + if($type == "array") { |
|
345 | + return explode($delim, $src); |
|
346 | + } else { |
|
347 | + return $src; |
|
348 | + } |
|
349 | + } |
|
350 | 350 | } |
351 | 351 | |
352 | 352 | function getUnixtimeFromDateString($value) { |
353 | - $timestamp = false; |
|
354 | - // Check for MySQL or legacy style date |
|
355 | - $date_match_1 = '/^([0-9]{2})-([0-9]{2})-([0-9]{4})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
|
356 | - $date_match_2 = '/^([0-9]{4})-([0-9]{2})-([0-9]{2})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
|
357 | - $matches = array(); |
|
358 | - if(strpos($value, '-') !== false) { |
|
359 | - if(preg_match($date_match_1, $value, $matches)) { |
|
360 | - $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]); |
|
361 | - } elseif(preg_match($date_match_2, $value, $matches)) { |
|
362 | - $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); |
|
363 | - } |
|
364 | - } |
|
365 | - // If those didn't work, use strtotime to figure out the date |
|
366 | - if($timestamp === false || $timestamp === -1) { |
|
367 | - $timestamp = strtotime($value); |
|
368 | - } |
|
369 | - return $timestamp; |
|
353 | + $timestamp = false; |
|
354 | + // Check for MySQL or legacy style date |
|
355 | + $date_match_1 = '/^([0-9]{2})-([0-9]{2})-([0-9]{4})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
|
356 | + $date_match_2 = '/^([0-9]{4})-([0-9]{2})-([0-9]{2})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
|
357 | + $matches = array(); |
|
358 | + if(strpos($value, '-') !== false) { |
|
359 | + if(preg_match($date_match_1, $value, $matches)) { |
|
360 | + $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]); |
|
361 | + } elseif(preg_match($date_match_2, $value, $matches)) { |
|
362 | + $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); |
|
363 | + } |
|
364 | + } |
|
365 | + // If those didn't work, use strtotime to figure out the date |
|
366 | + if($timestamp === false || $timestamp === -1) { |
|
367 | + $timestamp = strtotime($value); |
|
368 | + } |
|
369 | + return $timestamp; |
|
370 | 370 | } |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | */ |
6 | 6 | |
7 | 7 | // Added by Raymond 20-Jan-2005 |
8 | -function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype = "", $docid = "", $sep = '') { |
|
8 | +function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype = "", $docid = "", $sep = ''){ |
|
9 | 9 | |
10 | 10 | global $modx; |
11 | 11 | |
@@ -14,29 +14,29 @@ discard block |
||
14 | 14 | $value = ProcessTVCommand($value, $name, $docid); |
15 | 15 | |
16 | 16 | $params = array(); |
17 | - if($paramstring) { |
|
17 | + if ($paramstring) { |
|
18 | 18 | $cp = explode("&", $paramstring); |
19 | - foreach($cp as $p => $v) { |
|
19 | + foreach ($cp as $p => $v) { |
|
20 | 20 | $v = trim($v); // trim |
21 | 21 | $ar = explode("=", $v); |
22 | - if(is_array($ar) && count($ar) == 2) { |
|
22 | + if (is_array($ar) && count($ar) == 2) { |
|
23 | 23 | $params[$ar[0]] = decodeParamValue($ar[1]); |
24 | 24 | } |
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
28 | 28 | $id = "tv$name"; |
29 | - switch($format) { |
|
29 | + switch ($format) { |
|
30 | 30 | case 'image': |
31 | 31 | $images = parseInput($value, '||', 'array'); |
32 | 32 | $o = ''; |
33 | - foreach($images as $image) { |
|
34 | - if(!is_array($image)) { |
|
33 | + foreach ($images as $image) { |
|
34 | + if (!is_array($image)) { |
|
35 | 35 | $image = explode('==', $image); |
36 | 36 | } |
37 | 37 | $src = $image[0]; |
38 | 38 | |
39 | - if($src) { |
|
39 | + if ($src) { |
|
40 | 40 | // We have a valid source |
41 | 41 | $attributes = ''; |
42 | 42 | $attr = array( |
@@ -46,14 +46,14 @@ discard block |
||
46 | 46 | 'alt' => $modx->htmlspecialchars($params['alttext']), |
47 | 47 | 'style' => $params['style'] |
48 | 48 | ); |
49 | - if(isset($params['align']) && $params['align'] != 'none') { |
|
49 | + if (isset($params['align']) && $params['align'] != 'none') { |
|
50 | 50 | $attr['align'] = $params['align']; |
51 | 51 | } |
52 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
53 | - $attributes .= ' ' . $params['attrib']; |
|
52 | + foreach ($attr as $k => $v) $attributes .= ($v ? ' '.$k.'="'.$v.'"' : ''); |
|
53 | + $attributes .= ' '.$params['attrib']; |
|
54 | 54 | |
55 | 55 | // Output the image with attributes |
56 | - $o .= '<img' . rtrim($attributes) . ' />'; |
|
56 | + $o .= '<img'.rtrim($attributes).' />'; |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | break; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | case "delim": // display as delimitted list |
62 | 62 | $value = parseInput($value, "||"); |
63 | 63 | $p = $params['format'] ? $params['format'] : " "; |
64 | - if($p == "\\n") { |
|
64 | + if ($p == "\\n") { |
|
65 | 65 | $p = "\n"; |
66 | 66 | } |
67 | 67 | $o = str_replace("||", $p, $value); |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | case "string": |
71 | 71 | $value = parseInput($value); |
72 | 72 | $format = strtolower($params['format']); |
73 | - if($format == 'upper case') { |
|
73 | + if ($format == 'upper case') { |
|
74 | 74 | $o = strtoupper($value); |
75 | - } else if($format == 'lower case') { |
|
75 | + } else if ($format == 'lower case') { |
|
76 | 76 | $o = strtolower($value); |
77 | - } else if($format == 'sentence case') { |
|
77 | + } else if ($format == 'sentence case') { |
|
78 | 78 | $o = ucfirst($value); |
79 | - } else if($format == 'capitalize') { |
|
79 | + } else if ($format == 'capitalize') { |
|
80 | 80 | $o = ucwords($value); |
81 | 81 | } else { |
82 | 82 | $o = $value; |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | break; |
85 | 85 | |
86 | 86 | case "date": |
87 | - if($value != '' || $params['default'] == 'Yes') { |
|
88 | - if(empty($value)) { |
|
87 | + if ($value != '' || $params['default'] == 'Yes') { |
|
88 | + if (empty($value)) { |
|
89 | 89 | $value = 'now'; |
90 | 90 | } |
91 | 91 | $timestamp = getUnixtimeFromDateString($value); |
@@ -99,13 +99,13 @@ discard block |
||
99 | 99 | case "hyperlink": |
100 | 100 | $value = parseInput($value, "||", "array"); |
101 | 101 | $o = ''; |
102 | - for($i = 0; $i < count($value); $i++) { |
|
102 | + for ($i = 0; $i < count($value); $i++) { |
|
103 | 103 | list($name, $url) = is_array($value[$i]) ? $value[$i] : explode("==", $value[$i]); |
104 | - if(!$url) { |
|
104 | + if (!$url) { |
|
105 | 105 | $url = $name; |
106 | 106 | } |
107 | - if($url) { |
|
108 | - if($o) { |
|
107 | + if ($url) { |
|
108 | + if ($o) { |
|
109 | 109 | $o .= '<br />'; |
110 | 110 | } |
111 | 111 | $attributes = ''; |
@@ -117,11 +117,11 @@ discard block |
||
117 | 117 | 'style' => $params['style'], |
118 | 118 | 'target' => $params['target'], |
119 | 119 | ); |
120 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
121 | - $attributes .= ' ' . $params['attrib']; // add extra |
|
120 | + foreach ($attr as $k => $v) $attributes .= ($v ? ' '.$k.'="'.$v.'"' : ''); |
|
121 | + $attributes .= ' '.$params['attrib']; // add extra |
|
122 | 122 | |
123 | 123 | // Output the link |
124 | - $o .= '<a' . rtrim($attributes) . '>' . ($params['text'] ? $modx->htmlspecialchars($params['text']) : $name) . '</a>'; |
|
124 | + $o .= '<a'.rtrim($attributes).'>'.($params['text'] ? $modx->htmlspecialchars($params['text']) : $name).'</a>'; |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 | break; |
@@ -132,9 +132,9 @@ discard block |
||
132 | 132 | $tagname = ($params['tagname']) ? $params['tagname'] : 'div'; |
133 | 133 | $o = ''; |
134 | 134 | // Loop through a list of tags |
135 | - for($i = 0; $i < count($value); $i++) { |
|
135 | + for ($i = 0; $i < count($value); $i++) { |
|
136 | 136 | $tagvalue = is_array($value[$i]) ? implode(' ', $value[$i]) : $value[$i]; |
137 | - if(!$tagvalue) { |
|
137 | + if (!$tagvalue) { |
|
138 | 138 | continue; |
139 | 139 | } |
140 | 140 | |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | 'class' => $params['class'], |
146 | 146 | 'style' => $params['style'], |
147 | 147 | ); |
148 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
149 | - $attributes .= ' ' . $params['attrib']; // add extra |
|
148 | + foreach ($attr as $k => $v) $attributes .= ($v ? ' '.$k.'="'.$v.'"' : ''); |
|
149 | + $attributes .= ' '.$params['attrib']; // add extra |
|
150 | 150 | |
151 | 151 | // Output the HTML Tag |
152 | - $o .= '<' . $tagname . rtrim($attributes) . '>' . $tagvalue . '</' . $tagname . '>'; |
|
152 | + $o .= '<'.$tagname.rtrim($attributes).'>'.$tagvalue.'</'.$tagname.'>'; |
|
153 | 153 | } |
154 | 154 | break; |
155 | 155 | |
@@ -158,12 +158,12 @@ discard block |
||
158 | 158 | $w = $params['w'] ? $params['w'] : '100%'; |
159 | 159 | $h = $params['h'] ? $params['h'] : '400px'; |
160 | 160 | $richtexteditor = $params['edt'] ? $params['edt'] : ""; |
161 | - $o = '<div class="MODX_RichTextWidget"><textarea id="' . $id . '" name="' . $id . '" style="width:' . $w . '; height:' . $h . ';">'; |
|
161 | + $o = '<div class="MODX_RichTextWidget"><textarea id="'.$id.'" name="'.$id.'" style="width:'.$w.'; height:'.$h.';">'; |
|
162 | 162 | $o .= $modx->htmlspecialchars($value); |
163 | 163 | $o .= '</textarea></div>'; |
164 | 164 | $replace_richtext = array($id); |
165 | 165 | // setup editors |
166 | - if(!empty($replace_richtext) && !empty($richtexteditor)) { |
|
166 | + if (!empty($replace_richtext) && !empty($richtexteditor)) { |
|
167 | 167 | // invoke OnRichTextEditorInit event |
168 | 168 | $evtOut = $modx->invokeEvent("OnRichTextEditorInit", array( |
169 | 169 | 'editor' => $richtexteditor, |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | 'width' => $w, |
173 | 173 | 'height' => $h |
174 | 174 | )); |
175 | - if(is_array($evtOut)) { |
|
175 | + if (is_array($evtOut)) { |
|
176 | 176 | $o .= implode("", $evtOut); |
177 | 177 | } |
178 | 178 | } |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | |
186 | 186 | case "viewport": |
187 | 187 | $value = parseInput($value); |
188 | - $id = '_' . time(); |
|
189 | - if(!$params['vpid']) { |
|
188 | + $id = '_'.time(); |
|
189 | + if (!$params['vpid']) { |
|
190 | 190 | $params['vpid'] = $id; |
191 | 191 | } |
192 | 192 | $sTag = "<iframe"; |
@@ -194,42 +194,42 @@ discard block |
||
194 | 194 | $autoMode = "0"; |
195 | 195 | $w = $params['width']; |
196 | 196 | $h = $params['height']; |
197 | - if($params['stretch'] == 'Yes') { |
|
197 | + if ($params['stretch'] == 'Yes') { |
|
198 | 198 | $w = "100%"; |
199 | 199 | $h = "100%"; |
200 | 200 | } |
201 | - if($params['asize'] == 'Yes' || ($params['awidth'] == 'Yes' && $params['aheight'] == 'Yes')) { |
|
202 | - $autoMode = "3"; //both |
|
203 | - } else if($params['awidth'] == 'Yes') { |
|
201 | + if ($params['asize'] == 'Yes' || ($params['awidth'] == 'Yes' && $params['aheight'] == 'Yes')) { |
|
202 | + $autoMode = "3"; //both |
|
203 | + } else if ($params['awidth'] == 'Yes') { |
|
204 | 204 | $autoMode = "1"; //width only |
205 | - } else if($params['aheight'] == 'Yes') { |
|
206 | - $autoMode = "2"; //height only |
|
205 | + } else if ($params['aheight'] == 'Yes') { |
|
206 | + $autoMode = "2"; //height only |
|
207 | 207 | } |
208 | 208 | |
209 | - $modx->regClientStartupScript(MODX_MANAGER_URL . "media/script/bin/viewport.js", array( |
|
209 | + $modx->regClientStartupScript(MODX_MANAGER_URL."media/script/bin/viewport.js", array( |
|
210 | 210 | 'name' => 'viewport', |
211 | 211 | 'version' => '0', |
212 | 212 | 'plaintext' => false |
213 | 213 | )); |
214 | - $o = $sTag . " id='" . $params['vpid'] . "' name='" . $params['vpid'] . "' "; |
|
215 | - if($params['class']) { |
|
216 | - $o .= " class='" . $params['class'] . "' "; |
|
214 | + $o = $sTag." id='".$params['vpid']."' name='".$params['vpid']."' "; |
|
215 | + if ($params['class']) { |
|
216 | + $o .= " class='".$params['class']."' "; |
|
217 | 217 | } |
218 | - if($params['style']) { |
|
219 | - $o .= " style='" . $params['style'] . "' "; |
|
218 | + if ($params['style']) { |
|
219 | + $o .= " style='".$params['style']."' "; |
|
220 | 220 | } |
221 | - if($params['attrib']) { |
|
222 | - $o .= $params['attrib'] . " "; |
|
221 | + if ($params['attrib']) { |
|
222 | + $o .= $params['attrib']." "; |
|
223 | 223 | } |
224 | - $o .= "scrolling='" . ($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto")) . "' "; |
|
225 | - $o .= "src='" . $value . "' frameborder='" . $params['borsize'] . "' "; |
|
226 | - $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'" . $params['vpid'] . "\\'," . $autoMode . ")',100);\" width='" . $w . "' height='" . $h . "' "; |
|
224 | + $o .= "scrolling='".($params['sbar'] == 'No' ? "no" : ($params['sbar'] == 'Yes' ? "yes" : "auto"))."' "; |
|
225 | + $o .= "src='".$value."' frameborder='".$params['borsize']."' "; |
|
226 | + $o .= "onload=\"window.setTimeout('ResizeViewPort(\\'".$params['vpid']."\\',".$autoMode.")',100);\" width='".$w."' height='".$h."' "; |
|
227 | 227 | $o .= ">"; |
228 | 228 | $o .= $eTag; |
229 | 229 | break; |
230 | 230 | |
231 | 231 | case "datagrid": |
232 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
232 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
233 | 233 | $grd = new DataGrid('', $value); |
234 | 234 | |
235 | 235 | $grd->noRecordMsg = $params['egmsg']; |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | |
265 | 265 | case 'htmlentities': |
266 | 266 | $value = parseInput($value); |
267 | - if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
267 | + if ($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
268 | 268 | // remove delimiter from checkbox and listbox-multiple TVs |
269 | 269 | $value = str_replace('||', '', $value); |
270 | 270 | } |
@@ -275,33 +275,33 @@ discard block |
||
275 | 275 | $widget_output = ''; |
276 | 276 | $o = ''; |
277 | 277 | /* If we are loading a file */ |
278 | - if(substr($params['output'], 0, 5) == "@FILE") { |
|
279 | - $file_name = MODX_BASE_PATH . trim(substr($params['output'], 6)); |
|
280 | - if(!file_exists($file_name)) { |
|
281 | - $widget_output = $file_name . ' does not exist'; |
|
278 | + if (substr($params['output'], 0, 5) == "@FILE") { |
|
279 | + $file_name = MODX_BASE_PATH.trim(substr($params['output'], 6)); |
|
280 | + if (!file_exists($file_name)) { |
|
281 | + $widget_output = $file_name.' does not exist'; |
|
282 | 282 | } else { |
283 | 283 | $widget_output = file_get_contents($file_name); |
284 | 284 | } |
285 | - } elseif(substr($params['output'], 0, 8) == '@INCLUDE') { |
|
286 | - $file_name = MODX_BASE_PATH . trim(substr($params['output'], 9)); |
|
287 | - if(!file_exists($file_name)) { |
|
288 | - $widget_output = $file_name . ' does not exist'; |
|
285 | + } elseif (substr($params['output'], 0, 8) == '@INCLUDE') { |
|
286 | + $file_name = MODX_BASE_PATH.trim(substr($params['output'], 9)); |
|
287 | + if (!file_exists($file_name)) { |
|
288 | + $widget_output = $file_name.' does not exist'; |
|
289 | 289 | } else { |
290 | 290 | /* The included file needs to set $widget_output. Can be string, array, object */ |
291 | 291 | include $file_name; |
292 | 292 | } |
293 | - } elseif(substr($params['output'], 0, 6) == '@CHUNK' && $value !== '') { |
|
293 | + } elseif (substr($params['output'], 0, 6) == '@CHUNK' && $value !== '') { |
|
294 | 294 | $chunk_name = trim(substr($params['output'], 7)); |
295 | 295 | $widget_output = $modx->getChunk($chunk_name); |
296 | - } elseif(substr($params['output'], 0, 5) == '@EVAL' && $value !== '') { |
|
296 | + } elseif (substr($params['output'], 0, 5) == '@EVAL' && $value !== '') { |
|
297 | 297 | $eval_str = trim(substr($params['output'], 6)); |
298 | 298 | $widget_output = eval($eval_str); |
299 | - } elseif($value !== '') { |
|
299 | + } elseif ($value !== '') { |
|
300 | 300 | $widget_output = $params['output']; |
301 | 301 | } else { |
302 | 302 | $widget_output = ''; |
303 | 303 | } |
304 | - if(is_string($widget_output)) { |
|
304 | + if (is_string($widget_output)) { |
|
305 | 305 | $_ = $modx->config['enable_filter']; |
306 | 306 | $modx->config['enable_filter'] = 1; |
307 | 307 | $widget_output = $modx->parseText($widget_output, array('value' => $value)); |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | |
315 | 315 | default: |
316 | 316 | $value = parseInput($value); |
317 | - if($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
317 | + if ($tvtype == 'checkbox' || $tvtype == 'listbox-multiple') { |
|
318 | 318 | // add separator |
319 | 319 | $value = explode('||', $value); |
320 | 320 | $value = implode($sep, $value); |
@@ -325,23 +325,23 @@ discard block |
||
325 | 325 | return $o; |
326 | 326 | } |
327 | 327 | |
328 | -function decodeParamValue($s) { |
|
328 | +function decodeParamValue($s){ |
|
329 | 329 | $s = str_replace("%3D", '=', $s); // = |
330 | 330 | $s = str_replace("%26", '&', $s); // & |
331 | 331 | return $s; |
332 | 332 | } |
333 | 333 | |
334 | 334 | // returns an array if a delimiter is present. returns array is a recordset is present |
335 | -function parseInput($src, $delim = "||", $type = "string", $columns = true) { // type can be: string, array |
|
335 | +function parseInput($src, $delim = "||", $type = "string", $columns = true){ // type can be: string, array |
|
336 | 336 | global $modx; |
337 | - if($modx->db->isResult($src)) { |
|
337 | + if ($modx->db->isResult($src)) { |
|
338 | 338 | // must be a recordset |
339 | 339 | $rows = array(); |
340 | - while($cols = $modx->db->getRow($src, 'num')) $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
340 | + while ($cols = $modx->db->getRow($src, 'num')) $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
341 | 341 | return ($type == "array") ? $rows : implode($delim, $rows); |
342 | 342 | } else { |
343 | 343 | // must be a text |
344 | - if($type == "array") { |
|
344 | + if ($type == "array") { |
|
345 | 345 | return explode($delim, $src); |
346 | 346 | } else { |
347 | 347 | return $src; |
@@ -349,21 +349,21 @@ discard block |
||
349 | 349 | } |
350 | 350 | } |
351 | 351 | |
352 | -function getUnixtimeFromDateString($value) { |
|
352 | +function getUnixtimeFromDateString($value){ |
|
353 | 353 | $timestamp = false; |
354 | 354 | // Check for MySQL or legacy style date |
355 | 355 | $date_match_1 = '/^([0-9]{2})-([0-9]{2})-([0-9]{4})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
356 | 356 | $date_match_2 = '/^([0-9]{4})-([0-9]{2})-([0-9]{2})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
357 | 357 | $matches = array(); |
358 | - if(strpos($value, '-') !== false) { |
|
359 | - if(preg_match($date_match_1, $value, $matches)) { |
|
358 | + if (strpos($value, '-') !== false) { |
|
359 | + if (preg_match($date_match_1, $value, $matches)) { |
|
360 | 360 | $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]); |
361 | - } elseif(preg_match($date_match_2, $value, $matches)) { |
|
361 | + } elseif (preg_match($date_match_2, $value, $matches)) { |
|
362 | 362 | $timestamp = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]); |
363 | 363 | } |
364 | 364 | } |
365 | 365 | // If those didn't work, use strtotime to figure out the date |
366 | - if($timestamp === false || $timestamp === -1) { |
|
366 | + if ($timestamp === false || $timestamp === -1) { |
|
367 | 367 | $timestamp = strtotime($value); |
368 | 368 | } |
369 | 369 | return $timestamp; |
@@ -5,7 +5,8 @@ discard block |
||
5 | 5 | */ |
6 | 6 | |
7 | 7 | // Added by Raymond 20-Jan-2005 |
8 | -function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype = "", $docid = "", $sep = '') { |
|
8 | +function getTVDisplayFormat($name, $value, $format, $paramstring = "", $tvtype = "", $docid = "", $sep = '') |
|
9 | +{ |
|
9 | 10 | |
10 | 11 | global $modx; |
11 | 12 | |
@@ -49,7 +50,9 @@ discard block |
||
49 | 50 | if(isset($params['align']) && $params['align'] != 'none') { |
50 | 51 | $attr['align'] = $params['align']; |
51 | 52 | } |
52 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
53 | + foreach($attr as $k => $v) { |
|
54 | + $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
55 | + } |
|
53 | 56 | $attributes .= ' ' . $params['attrib']; |
54 | 57 | |
55 | 58 | // Output the image with attributes |
@@ -117,7 +120,9 @@ discard block |
||
117 | 120 | 'style' => $params['style'], |
118 | 121 | 'target' => $params['target'], |
119 | 122 | ); |
120 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
123 | + foreach($attr as $k => $v) { |
|
124 | + $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
125 | + } |
|
121 | 126 | $attributes .= ' ' . $params['attrib']; // add extra |
122 | 127 | |
123 | 128 | // Output the link |
@@ -145,7 +150,9 @@ discard block |
||
145 | 150 | 'class' => $params['class'], |
146 | 151 | 'style' => $params['style'], |
147 | 152 | ); |
148 | - foreach($attr as $k => $v) $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
153 | + foreach($attr as $k => $v) { |
|
154 | + $attributes .= ($v ? ' ' . $k . '="' . $v . '"' : ''); |
|
155 | + } |
|
149 | 156 | $attributes .= ' ' . $params['attrib']; // add extra |
150 | 157 | |
151 | 158 | // Output the HTML Tag |
@@ -325,19 +332,24 @@ discard block |
||
325 | 332 | return $o; |
326 | 333 | } |
327 | 334 | |
328 | -function decodeParamValue($s) { |
|
335 | +function decodeParamValue($s) |
|
336 | +{ |
|
329 | 337 | $s = str_replace("%3D", '=', $s); // = |
330 | 338 | $s = str_replace("%26", '&', $s); // & |
331 | 339 | return $s; |
332 | 340 | } |
333 | 341 | |
334 | 342 | // returns an array if a delimiter is present. returns array is a recordset is present |
335 | -function parseInput($src, $delim = "||", $type = "string", $columns = true) { // type can be: string, array |
|
343 | +function parseInput($src, $delim = "||", $type = "string", $columns = true) |
|
344 | +{ |
|
345 | +// type can be: string, array |
|
336 | 346 | global $modx; |
337 | 347 | if($modx->db->isResult($src)) { |
338 | 348 | // must be a recordset |
339 | 349 | $rows = array(); |
340 | - while($cols = $modx->db->getRow($src, 'num')) $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
350 | + while($cols = $modx->db->getRow($src, 'num')) { |
|
351 | + $rows[] = ($columns) ? $cols : implode(" ", $cols); |
|
352 | + } |
|
341 | 353 | return ($type == "array") ? $rows : implode($delim, $rows); |
342 | 354 | } else { |
343 | 355 | // must be a text |
@@ -349,7 +361,8 @@ discard block |
||
349 | 361 | } |
350 | 362 | } |
351 | 363 | |
352 | -function getUnixtimeFromDateString($value) { |
|
364 | +function getUnixtimeFromDateString($value) |
|
365 | +{ |
|
353 | 366 | $timestamp = false; |
354 | 367 | // Check for MySQL or legacy style date |
355 | 368 | $date_match_1 = '/^([0-9]{2})-([0-9]{2})-([0-9]{4})\ ([0-9]{2}):([0-9]{2}):([0-9]{2})$/'; |
@@ -29,33 +29,33 @@ discard block |
||
29 | 29 | // include MagPieRSS |
30 | 30 | require_once(MODX_MANAGER_PATH.'media/rss/rss_fetch.inc'); |
31 | 31 | // Convert relative path into absolute url |
32 | -function rel2abs( $rel, $base ) { |
|
32 | +function rel2abs($rel, $base){ |
|
33 | 33 | // parse base URL and convert to local variables: $scheme, $host, $path |
34 | - extract( parse_url( $base ) ); |
|
35 | - if ( strpos( $rel,"//" ) === 0 ) { |
|
36 | - return $scheme . ':' . $rel; |
|
34 | + extract(parse_url($base)); |
|
35 | + if (strpos($rel, "//") === 0) { |
|
36 | + return $scheme.':'.$rel; |
|
37 | 37 | } |
38 | 38 | // return if already absolute URL |
39 | - if ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) { |
|
39 | + if (parse_url($rel, PHP_URL_SCHEME) != '') { |
|
40 | 40 | return $rel; |
41 | 41 | } |
42 | 42 | // queries and anchors |
43 | - if ( $rel[0] == '#' || $rel[0] == '?' ) { |
|
44 | - return $base . $rel; |
|
43 | + if ($rel[0] == '#' || $rel[0] == '?') { |
|
44 | + return $base.$rel; |
|
45 | 45 | } |
46 | 46 | // remove non-directory element from path |
47 | - $path = preg_replace( '#/[^/]*$#', '', $path ); |
|
47 | + $path = preg_replace('#/[^/]*$#', '', $path); |
|
48 | 48 | // destroy path if relative url points to root |
49 | - if ( $rel[0] == '/' ) { |
|
49 | + if ($rel[0] == '/') { |
|
50 | 50 | $path = ''; |
51 | 51 | } |
52 | 52 | // dirty absolute URL |
53 | - $abs = $host . $path . "/" . $rel; |
|
53 | + $abs = $host.$path."/".$rel; |
|
54 | 54 | // replace '//' or '/./' or '/foo/../' with '/' |
55 | - $abs = preg_replace( "/(\/\.?\/)/", "/", $abs ); |
|
56 | - $abs = preg_replace( "/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs ); |
|
55 | + $abs = preg_replace("/(\/\.?\/)/", "/", $abs); |
|
56 | + $abs = preg_replace("/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs); |
|
57 | 57 | // absolute URL is ready! |
58 | - return $scheme . '://' . $abs; |
|
58 | + return $scheme.'://'.$abs; |
|
59 | 59 | } |
60 | 60 | $feedData = array(); |
61 | 61 | |
@@ -63,15 +63,15 @@ discard block |
||
63 | 63 | foreach ($urls as $section=>$url) { |
64 | 64 | $output = ''; |
65 | 65 | $rss = @fetch_rss($url); |
66 | - if( !$rss ){ |
|
67 | - $feedData[$section] = 'Failed to retrieve ' . $url; |
|
66 | + if (!$rss) { |
|
67 | + $feedData[$section] = 'Failed to retrieve '.$url; |
|
68 | 68 | continue; |
69 | 69 | } |
70 | 70 | $output .= '<ul>'; |
71 | 71 | |
72 | 72 | $items = array_slice($rss->items, 0, $itemsNumber); |
73 | 73 | foreach ($items as $item) { |
74 | - $href = rel2abs($item['link'],'https://github.com'); |
|
74 | + $href = rel2abs($item['link'], 'https://github.com'); |
|
75 | 75 | $title = $item['title']; |
76 | 76 | $pubdate = $item['pubdate']; |
77 | 77 | $pubdate = $modx->toDateFormat(strtotime($pubdate)); |
@@ -29,7 +29,8 @@ discard block |
||
29 | 29 | // include MagPieRSS |
30 | 30 | require_once(MODX_MANAGER_PATH.'media/rss/rss_fetch.inc'); |
31 | 31 | // Convert relative path into absolute url |
32 | -function rel2abs( $rel, $base ) { |
|
32 | +function rel2abs( $rel, $base ) |
|
33 | +{ |
|
33 | 34 | // parse base URL and convert to local variables: $scheme, $host, $path |
34 | 35 | extract( parse_url( $base ) ); |
35 | 36 | if ( strpos( $rel,"//" ) === 0 ) { |
@@ -63,7 +64,7 @@ discard block |
||
63 | 64 | foreach ($urls as $section=>$url) { |
64 | 65 | $output = ''; |
65 | 66 | $rss = @fetch_rss($url); |
66 | - if( !$rss ){ |
|
67 | + if( !$rss ) { |
|
67 | 68 | $feedData[$section] = 'Failed to retrieve ' . $url; |
68 | 69 | continue; |
69 | 70 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | - /* |
|
2 | + /* |
|
3 | 3 | * MODX Manager Home Page Implmentation by pixelchutes (www.pixelchutes.com) |
4 | 4 | * Based on kudo's kRSS Module v1.0.72 |
5 | 5 | * |
@@ -30,43 +30,43 @@ discard block |
||
30 | 30 | require_once(MODX_MANAGER_PATH.'media/rss/rss_fetch.inc'); |
31 | 31 | // Convert relative path into absolute url |
32 | 32 | function rel2abs( $rel, $base ) { |
33 | - // parse base URL and convert to local variables: $scheme, $host, $path |
|
34 | - extract( parse_url( $base ) ); |
|
35 | - if ( strpos( $rel,"//" ) === 0 ) { |
|
36 | - return $scheme . ':' . $rel; |
|
37 | - } |
|
38 | - // return if already absolute URL |
|
39 | - if ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) { |
|
40 | - return $rel; |
|
41 | - } |
|
42 | - // queries and anchors |
|
43 | - if ( $rel[0] == '#' || $rel[0] == '?' ) { |
|
44 | - return $base . $rel; |
|
45 | - } |
|
46 | - // remove non-directory element from path |
|
47 | - $path = preg_replace( '#/[^/]*$#', '', $path ); |
|
48 | - // destroy path if relative url points to root |
|
49 | - if ( $rel[0] == '/' ) { |
|
50 | - $path = ''; |
|
51 | - } |
|
52 | - // dirty absolute URL |
|
53 | - $abs = $host . $path . "/" . $rel; |
|
54 | - // replace '//' or '/./' or '/foo/../' with '/' |
|
55 | - $abs = preg_replace( "/(\/\.?\/)/", "/", $abs ); |
|
56 | - $abs = preg_replace( "/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs ); |
|
57 | - // absolute URL is ready! |
|
58 | - return $scheme . '://' . $abs; |
|
33 | + // parse base URL and convert to local variables: $scheme, $host, $path |
|
34 | + extract( parse_url( $base ) ); |
|
35 | + if ( strpos( $rel,"//" ) === 0 ) { |
|
36 | + return $scheme . ':' . $rel; |
|
37 | + } |
|
38 | + // return if already absolute URL |
|
39 | + if ( parse_url( $rel, PHP_URL_SCHEME ) != '' ) { |
|
40 | + return $rel; |
|
41 | + } |
|
42 | + // queries and anchors |
|
43 | + if ( $rel[0] == '#' || $rel[0] == '?' ) { |
|
44 | + return $base . $rel; |
|
45 | + } |
|
46 | + // remove non-directory element from path |
|
47 | + $path = preg_replace( '#/[^/]*$#', '', $path ); |
|
48 | + // destroy path if relative url points to root |
|
49 | + if ( $rel[0] == '/' ) { |
|
50 | + $path = ''; |
|
51 | + } |
|
52 | + // dirty absolute URL |
|
53 | + $abs = $host . $path . "/" . $rel; |
|
54 | + // replace '//' or '/./' or '/foo/../' with '/' |
|
55 | + $abs = preg_replace( "/(\/\.?\/)/", "/", $abs ); |
|
56 | + $abs = preg_replace( "/\/(?!\.\.)[^\/]+\/\.\.\//", "/", $abs ); |
|
57 | + // absolute URL is ready! |
|
58 | + return $scheme . '://' . $abs; |
|
59 | 59 | } |
60 | 60 | $feedData = array(); |
61 | 61 | |
62 | 62 | // create Feed |
63 | 63 | foreach ($urls as $section=>$url) { |
64 | - $output = ''; |
|
64 | + $output = ''; |
|
65 | 65 | $rss = @fetch_rss($url); |
66 | 66 | if( !$rss ){ |
67 | - $feedData[$section] = 'Failed to retrieve ' . $url; |
|
68 | - continue; |
|
69 | - } |
|
67 | + $feedData[$section] = 'Failed to retrieve ' . $url; |
|
68 | + continue; |
|
69 | + } |
|
70 | 70 | $output .= '<ul>'; |
71 | 71 | |
72 | 72 | $items = array_slice($rss->items, 0, $itemsNumber); |
@@ -84,5 +84,5 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | $output .= '</ul>'; |
87 | - $feedData[$section] = $output; |
|
87 | + $feedData[$section] = $output; |
|
88 | 88 | } |