@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || 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(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php')) { |
|
| 7 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/functions.inc.php'); |
|
| 6 | +if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php')) { |
|
| 7 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/functions.inc.php'); |
|
| 8 | 8 | } else { |
| 9 | - include_once(MODX_MANAGER_PATH . 'actions/resources/functions.inc.php'); |
|
| 9 | + include_once(MODX_MANAGER_PATH.'actions/resources/functions.inc.php'); |
|
| 10 | 10 | } |
| 11 | -if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php')) { |
|
| 12 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/mgrResources.class.php'); |
|
| 11 | +if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php')) { |
|
| 12 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/mgrResources.class.php'); |
|
| 13 | 13 | } else { |
| 14 | - include_once(MODX_MANAGER_PATH . 'actions/resources/mgrResources.class.php'); |
|
| 14 | + include_once(MODX_MANAGER_PATH.'actions/resources/mgrResources.class.php'); |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | $resources = new mgrResources(); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | 'type7' => $_lang["lock_element_type_7"], |
| 29 | 29 | 'type8' => $_lang["lock_element_type_8"] |
| 30 | 30 | ); |
| 31 | -foreach($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 31 | +foreach ($unlockTranslations as $key => $value) $unlockTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 32 | 32 | |
| 33 | 33 | // Prepare lang-strings for mgrResAction() |
| 34 | 34 | $mraTranslations = array( |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | 'confirm_delete_plugin' => $_lang["confirm_delete_plugin"], |
| 45 | 45 | 'confirm_delete_module' => $_lang["confirm_delete_module"], |
| 46 | 46 | ); |
| 47 | -foreach($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 47 | +foreach ($mraTranslations as $key => $value) $mraTranslations[$key] = iconv($modx->config["modx_charset"], "utf-8", $value); |
|
| 48 | 48 | ?> |
| 49 | 49 | <script>var trans = <?php echo json_encode($unlockTranslations); ?>;</script> |
| 50 | 50 | <script>var mraTrans = <?php echo json_encode($mraTranslations); ?>;</script> |
@@ -65,45 +65,45 @@ discard block |
||
| 65 | 65 | </script> |
| 66 | 66 | |
| 67 | 67 | <?php |
| 68 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php')) { |
|
| 69 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab1_templates.inc.php'); |
|
| 68 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php')) { |
|
| 69 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab1_templates.inc.php'); |
|
| 70 | 70 | } else { |
| 71 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab1_templates.inc.php'); |
|
| 71 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab1_templates.inc.php'); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php')) { |
|
| 75 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab2_templatevars.inc.php'); |
|
| 74 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php')) { |
|
| 75 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab2_templatevars.inc.php'); |
|
| 76 | 76 | } else { |
| 77 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab2_templatevars.inc.php'); |
|
| 77 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab2_templatevars.inc.php'); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php')) { |
|
| 81 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab3_chunks.inc.php'); |
|
| 80 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php')) { |
|
| 81 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab3_chunks.inc.php'); |
|
| 82 | 82 | } else { |
| 83 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab3_chunks.inc.php'); |
|
| 83 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab3_chunks.inc.php'); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php')) { |
|
| 87 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab4_snippets.inc.php'); |
|
| 86 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php')) { |
|
| 87 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab4_snippets.inc.php'); |
|
| 88 | 88 | } else { |
| 89 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab4_snippets.inc.php'); |
|
| 89 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab4_snippets.inc.php'); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php')) { |
|
| 93 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab5_plugins.inc.php'); |
|
| 92 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php')) { |
|
| 93 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab5_plugins.inc.php'); |
|
| 94 | 94 | } else { |
| 95 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab5_plugins.inc.php'); |
|
| 95 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab5_plugins.inc.php'); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - if(file_exists(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php')) { |
|
| 99 | - include_once(MODX_MANAGER_PATH . '/media/style/' . $modx->config['manager_theme'] . '/actions/resources/tab6_categoryview.inc.php'); |
|
| 98 | + if (file_exists(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php')) { |
|
| 99 | + include_once(MODX_MANAGER_PATH.'/media/style/'.$modx->config['manager_theme'].'/actions/resources/tab6_categoryview.inc.php'); |
|
| 100 | 100 | } else { |
| 101 | - include_once(MODX_MANAGER_PATH . '/actions/resources/tab6_categoryview.inc.php'); |
|
| 101 | + include_once(MODX_MANAGER_PATH.'/actions/resources/tab6_categoryview.inc.php'); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | |
| 105 | - if(is_numeric($_GET['tab'])) { |
|
| 106 | - echo '<script type="text/javascript"> tpResources.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
| 105 | + if (is_numeric($_GET['tab'])) { |
|
| 106 | + echo '<script type="text/javascript"> tpResources.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
| 107 | 107 | } |
| 108 | 108 | ?> |
| 109 | 109 | </div> |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if (!defined('IN_MANAGER_MODE') || 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 | -if(!$modx->hasPermission('change_password')) {
|
|
| 5 | +if (!$modx->hasPermission('change_password')) {
|
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | ?> |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || 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 | -if(!$modx->hasPermission('access_permissions')) { |
|
| 5 | +if (!$modx->hasPermission('access_permissions')) { |
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -17,23 +17,23 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // find all document groups, for the select :) |
| 19 | 19 | $rs = $modx->db->select('*', $tbl_documentgroup_names, '', 'name'); |
| 20 | -if($modx->db->getRecordCount($rs) < 1) { |
|
| 20 | +if ($modx->db->getRecordCount($rs) < 1) { |
|
| 21 | 21 | $docgroupselector = '[no groups to add]'; |
| 22 | 22 | } else { |
| 23 | - $docgroupselector = '<select name="docgroup">' . "\n"; |
|
| 24 | - while($row = $modx->db->getRow($rs)) { |
|
| 25 | - $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
| 23 | + $docgroupselector = '<select name="docgroup">'."\n"; |
|
| 24 | + while ($row = $modx->db->getRow($rs)) { |
|
| 25 | + $docgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
| 26 | 26 | } |
| 27 | 27 | $docgroupselector .= "</select>\n"; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $rs = $modx->db->select('*', $tbl_membergroup_names, '', 'name'); |
| 31 | -if($modx->db->getRecordCount($rs) < 1) { |
|
| 31 | +if ($modx->db->getRecordCount($rs) < 1) { |
|
| 32 | 32 | $usrgroupselector = '[no user groups]'; |
| 33 | 33 | } else { |
| 34 | - $usrgroupselector = '<select name="usergroup">' . "\n"; |
|
| 35 | - while($row = $modx->db->getRow($rs)) { |
|
| 36 | - $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
| 34 | + $usrgroupselector = '<select name="usergroup">'."\n"; |
|
| 35 | + while ($row = $modx->db->getRow($rs)) { |
|
| 36 | + $usrgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
| 37 | 37 | } |
| 38 | 38 | $usrgroupselector .= "</select>\n"; |
| 39 | 39 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | <div class="alert alert-info"><?= $_lang['access_permissions_introtext'] ?></div> |
| 70 | 70 | </div> |
| 71 | 71 | |
| 72 | -<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">' . $_lang['access_permissions_off'] . '</div>' : '') ?></div> |
|
| 72 | +<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">'.$_lang['access_permissions_off'].'</div>' : '') ?></div> |
|
| 73 | 73 | |
| 74 | 74 | <div class="tab-pane" id="uapPane"> |
| 75 | 75 | <script type="text/javascript"> |
@@ -96,10 +96,10 @@ discard block |
||
| 96 | 96 | </form> |
| 97 | 97 | </div> |
| 98 | 98 | <?php |
| 99 | - $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names . ' AS groupnames |
|
| 100 | - LEFT JOIN ' . $tbl_member_groups . ' AS groups ON groups.user_group = groupnames.id |
|
| 101 | - LEFT JOIN ' . $tbl_manager_users . ' AS users ON users.id = groups.member', '', 'groupnames.name, user_name'); |
|
| 102 | - if($modx->db->getRecordCount($rs) < 1) { |
|
| 99 | + $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name', $tbl_membergroup_names.' AS groupnames |
|
| 100 | + LEFT JOIN ' . $tbl_member_groups.' AS groups ON groups.user_group = groupnames.id |
|
| 101 | + LEFT JOIN ' . $tbl_manager_users.' AS users ON users.id = groups.member', '', 'groupnames.name, user_name'); |
|
| 102 | + if ($modx->db->getRecordCount($rs) < 1) { |
|
| 103 | 103 | ?> |
| 104 | 104 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
| 105 | 105 | <?php |
@@ -108,9 +108,9 @@ discard block |
||
| 108 | 108 | <div class="form-group"> |
| 109 | 109 | <?php |
| 110 | 110 | $pid = ''; |
| 111 | - while($row = $modx->db->getRow($rs)) { |
|
| 112 | - if($pid != $row['id']) { |
|
| 113 | - if($pid != '') { |
|
| 111 | + while ($row = $modx->db->getRow($rs)) { |
|
| 112 | + if ($pid != $row['id']) { |
|
| 113 | + if ($pid != '') { |
|
| 114 | 114 | echo '</div><div class="form-group">'; |
| 115 | 115 | } |
| 116 | 116 | ?> |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | <?= $_lang['access_permissions_users_in_group'] ?> |
| 130 | 130 | <?php |
| 131 | 131 | } |
| 132 | - if(!$row['user_id']) { |
|
| 132 | + if (!$row['user_id']) { |
|
| 133 | 133 | ?> |
| 134 | 134 | <i><?= $_lang['access_permissions_no_users_in_group'] ?></i> |
| 135 | 135 | <?php |
@@ -167,10 +167,10 @@ discard block |
||
| 167 | 167 | </form> |
| 168 | 168 | </div> |
| 169 | 169 | <?php |
| 170 | - $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names . ' AS dgnames |
|
| 171 | - LEFT JOIN ' . $tbl_document_groups . ' AS dg ON dg.document_group = dgnames.id |
|
| 172 | - LEFT JOIN ' . $tbl_site_content . ' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id'); |
|
| 173 | - if($modx->db->getRecordCount($rs) < 1) { |
|
| 170 | + $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $tbl_documentgroup_names.' AS dgnames |
|
| 171 | + LEFT JOIN ' . $tbl_document_groups.' AS dg ON dg.document_group = dgnames.id |
|
| 172 | + LEFT JOIN ' . $tbl_site_content.' AS sc ON sc.id = dg.document', '', 'dgnames.name, sc.id'); |
|
| 173 | + if ($modx->db->getRecordCount($rs) < 1) { |
|
| 174 | 174 | ?> |
| 175 | 175 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
| 176 | 176 | <?php |
@@ -179,9 +179,9 @@ discard block |
||
| 179 | 179 | <div class="form-group"> |
| 180 | 180 | <?php |
| 181 | 181 | $pid = ''; |
| 182 | - while($row = $modx->db->getRow($rs)) { |
|
| 183 | - if($pid != $row['id']) { |
|
| 184 | - if($pid != '') { |
|
| 182 | + while ($row = $modx->db->getRow($rs)) { |
|
| 183 | + if ($pid != $row['id']) { |
|
| 184 | + if ($pid != '') { |
|
| 185 | 185 | echo '</div><div class="form-group">'; |
| 186 | 186 | } |
| 187 | 187 | ?> |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | <?= $_lang['access_permissions_resources_in_group'] ?> |
| 201 | 201 | <?php |
| 202 | 202 | } |
| 203 | - if(!$row['doc_id']) { |
|
| 203 | + if (!$row['doc_id']) { |
|
| 204 | 204 | ?> |
| 205 | 205 | <i><?= $_lang['access_permissions_no_resources_in_group'] ?></i> |
| 206 | 206 | <?php |
@@ -226,10 +226,10 @@ discard block |
||
| 226 | 226 | <p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p> |
| 227 | 227 | <?php |
| 228 | 228 | // User/Document Group Links |
| 229 | - $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names . ' AS groupnames |
|
| 230 | - LEFT JOIN ' . $tbl_membergroup_access . ' AS groupacc ON groupacc.membergroup = groupnames.id |
|
| 231 | - LEFT JOIN ' . $tbl_documentgroup_names . ' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name'); |
|
| 232 | - if($modx->db->getRecordCount($rs) < 1) { |
|
| 229 | + $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $tbl_membergroup_names.' AS groupnames |
|
| 230 | + LEFT JOIN ' . $tbl_membergroup_access.' AS groupacc ON groupacc.membergroup = groupnames.id |
|
| 231 | + LEFT JOIN ' . $tbl_documentgroup_names.' AS dgnames ON dgnames.id = groupacc.documentgroup', '', 'name, dg_name'); |
|
| 232 | + if ($modx->db->getRecordCount($rs) < 1) { |
|
| 233 | 233 | ?> |
| 234 | 234 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
| 235 | 235 | <?php |
@@ -251,23 +251,23 @@ discard block |
||
| 251 | 251 | <ul> |
| 252 | 252 | <?php |
| 253 | 253 | $pid = ''; |
| 254 | - while($row = $modx->db->getRow($rs)) { |
|
| 255 | - if($row['id'] != $pid) { |
|
| 256 | - if($pid != '') { |
|
| 254 | + while ($row = $modx->db->getRow($rs)) { |
|
| 255 | + if ($row['id'] != $pid) { |
|
| 256 | + if ($pid != '') { |
|
| 257 | 257 | echo '</ul></li>'; |
| 258 | 258 | } // close previous one |
| 259 | 259 | ?> |
| 260 | 260 | <li><b><?= $row['name'] ?></b></li> |
| 261 | 261 | <?php |
| 262 | - if(!$row['dg_id']) { |
|
| 263 | - echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
| 262 | + if (!$row['dg_id']) { |
|
| 263 | + echo '<i>'.$_lang['no_groups_found'].'</i></li>'; |
|
| 264 | 264 | $pid = ''; |
| 265 | 265 | continue; |
| 266 | 266 | } else { |
| 267 | 267 | echo '<ul>'; |
| 268 | 268 | } |
| 269 | 269 | } |
| 270 | - if(!$row['dg_id']) { |
|
| 270 | + if (!$row['dg_id']) { |
|
| 271 | 271 | continue; |
| 272 | 272 | } |
| 273 | 273 | ?> |
@@ -1,8 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
|
|
| 2 | +if (!defined('IN_MANAGER_MODE') || 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 | -if(!$modx->hasPermission('view_eventlog')) {
|
|
| 5 | +if (!$modx->hasPermission('view_eventlog')) {
|
|
| 6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
| 7 | 7 | } |
| 8 | 8 | |
@@ -15,12 +15,12 @@ discard block |
||
| 15 | 15 | $modx->manager->initPageViewState(); |
| 16 | 16 | |
| 17 | 17 | // get and save search string |
| 18 | -if($_REQUEST['op'] == 'reset') {
|
|
| 18 | +if ($_REQUEST['op'] == 'reset') {
|
|
| 19 | 19 | $sqlQuery = $query = ''; |
| 20 | 20 | $_PAGE['vs']['search'] = ''; |
| 21 | 21 | } else {
|
| 22 | 22 | $sqlQuery = $query = isset($_REQUEST['search']) ? $_REQUEST['search'] : $_PAGE['vs']['search']; |
| 23 | - if(!is_numeric($sqlQuery)) {
|
|
| 23 | + if (!is_numeric($sqlQuery)) {
|
|
| 24 | 24 | $sqlQuery = $modx->db->escape($query); |
| 25 | 25 | } |
| 26 | 26 | $_PAGE['vs']['search'] = $query; |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $_PAGE['vs']['lm'] = $listmode; |
| 32 | 32 | |
| 33 | 33 | // context menu |
| 34 | -include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
|
| 34 | +include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php"; |
|
| 35 | 35 | $cm = new ContextMenu("cntxm", 150);
|
| 36 | 36 | $cm->addItem($_lang['view_log'], "js:menuAction(1)", $_style['actions_preview']); |
| 37 | 37 | $cm->addSeparator(); |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | <?php |
| 128 | 128 | $ds = $modx->db->select("el.id, ELT(el.type , 'text-info {$_style['actions_info']}' , 'text-warning {$_style['actions_triangle']}' , 'text-danger {$_style['actions_error']}' ) as icon, el.createdon, el.source, el.eventid,IFNULL(wu.username,mu.username) as username", "{$tbl_event_log} AS el
|
| 129 | 129 | LEFT JOIN {$tbl_manager_users} AS mu ON mu.id=el.user AND el.usertype=0
|
| 130 | - LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "" . (is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '') . "(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
|
|
| 131 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
| 130 | + LEFT JOIN {$tbl_web_users} AS wu ON wu.id=el.user AND el.usertype=1", ($sqlQuery ? "".(is_numeric($sqlQuery) ? "(eventid='{$sqlQuery}') OR " : '')."(source LIKE '%{$sqlQuery}%') OR (description LIKE '%{$sqlQuery}%')" : ""), "createdon DESC");
|
|
| 131 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
| 132 | 132 | $grd = new DataGrid('', $ds, $number_of_results); // set page size to 0 t show all items
|
| 133 | 133 | $grd->pagerClass = ''; |
| 134 | 134 | $grd->pageClass = 'page-item'; |
@@ -139,14 +139,14 @@ discard block |
||
| 139 | 139 | $grd->itemClass = "tableItem"; |
| 140 | 140 | $grd->altItemClass = "tableAltItem"; |
| 141 | 141 | $grd->fields = "type,source,createdon,eventid,username"; |
| 142 | - $grd->columns = $_lang['type'] . " ," . $_lang['source'] . " ," . $_lang['date'] . " ," . $_lang['event_id'] . " ," . $_lang['sysinfo_userid']; |
|
| 142 | + $grd->columns = $_lang['type']." ,".$_lang['source']." ,".$_lang['date']." ,".$_lang['event_id']." ,".$_lang['sysinfo_userid']; |
|
| 143 | 143 | $grd->colWidths = "1%,,1%,1%,1%"; |
| 144 | 144 | $grd->colAligns = "center,,,center,center"; |
| 145 | - $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='" . $_lang['click_to_context'] . "'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='" . $_lang['click_to_view_details'] . "'>[+source+]</a>||date: " . $modx->toDateFormat(null, 'formatOnly') . ' %I:%M %p'; |
|
| 146 | - if($listmode == '1') {
|
|
| 145 | + $grd->colTypes = "template:<a class='gridRowIcon' href='javascript:;' onclick='return showContentMenu([+id+],event);' title='".$_lang['click_to_context']."'><i class='[+icon+]'></i></a>||template:<a href='index.php?a=115&id=[+id+]' title='".$_lang['click_to_view_details']."'>[+source+]</a>||date: ".$modx->toDateFormat(null, 'formatOnly').' %I:%M %p'; |
|
| 146 | + if ($listmode == '1') {
|
|
| 147 | 147 | $grd->pageSize = 0; |
| 148 | 148 | } |
| 149 | - if($_REQUEST['op'] == 'reset') {
|
|
| 149 | + if ($_REQUEST['op'] == 'reset') {
|
|
| 150 | 150 | $grd->pageNumber = 1; |
| 151 | 151 | } |
| 152 | 152 | // render grid |
@@ -2,16 +2,16 @@ discard block |
||
| 2 | 2 | /** |
| 3 | 3 | * Ajax Requests |
| 4 | 4 | */ |
| 5 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 5 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 6 | 6 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | -if( isset( $_REQUEST[$cm->get('request_key')]['ajax'] ) ) |
|
| 9 | +if (isset($_REQUEST[$cm->get('request_key')]['ajax'])) |
|
| 10 | 10 | { |
| 11 | 11 | $_data = $_REQUEST[$cm->get('request_key')]; |
| 12 | 12 | $output = ''; |
| 13 | 13 | $task = $_data['task']; |
| 14 | - switch( $task ) |
|
| 14 | + switch ($task) |
|
| 15 | 15 | { |
| 16 | 16 | /** |
| 17 | 17 | * get categories |
@@ -19,19 +19,19 @@ discard block |
||
| 19 | 19 | case 'categorize_load_elements': |
| 20 | 20 | $elements = $_data['elements']; |
| 21 | 21 | |
| 22 | - if( $uncategorized_elements = $cm->getAssignedElements( 0, $_data['elements'] ) ) |
|
| 22 | + if ($uncategorized_elements = $cm->getAssignedElements(0, $_data['elements'])) |
|
| 23 | 23 | { |
| 24 | 24 | $output .= $cm->renderView('chunks/categorize/uncategorized_elements', $uncategorized_elements); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - foreach( $cm->getCategories() as $category ) |
|
| 27 | + foreach ($cm->getCategories() as $category) |
|
| 28 | 28 | { |
| 29 | - $category['elements'] = $cm->getAssignedElements( $category['id'], $_data['elements'] ); |
|
| 29 | + $category['elements'] = $cm->getAssignedElements($category['id'], $_data['elements']); |
|
| 30 | 30 | $output .= $cm->renderView('chunks/categorize/category', $category); |
| 31 | 31 | } |
| 32 | 32 | break; |
| 33 | 33 | } |
| 34 | - exit( $output ); |
|
| 34 | + exit($output); |
|
| 35 | 35 | } |
| 36 | 36 | /** |
| 37 | 37 | * Categorize elements |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * @see http://modxcms.com/forums/index.php/topic,40430.msg251476.html#msg251476 |
| 42 | 42 | * |
| 43 | 43 | */ |
| 44 | -if( isset( $_POST[$cm->get('request_key')]['categorize']['submit'] ) ) |
|
| 44 | +if (isset($_POST[$cm->get('request_key')]['categorize']['submit'])) |
|
| 45 | 45 | { |
| 46 | 46 | $_data = $_POST[$cm->get('request_key')]['categorize']; |
| 47 | 47 | $_changes = 0; |
@@ -54,15 +54,15 @@ discard block |
||
| 54 | 54 | 'categorize' |
| 55 | 55 | ); |
| 56 | 56 | |
| 57 | - if( !isset( $_data['elements'] ) ) |
|
| 57 | + if (!isset($_data['elements'])) |
|
| 58 | 58 | { |
| 59 | - $cm->addMessage( $cm->txt('cm_unknown_error'), 'categorize' ); |
|
| 59 | + $cm->addMessage($cm->txt('cm_unknown_error'), 'categorize'); |
|
| 60 | 60 | return; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - foreach( $_data['elements'] as $element_id => $data ) |
|
| 63 | + foreach ($_data['elements'] as $element_id => $data) |
|
| 64 | 64 | { |
| 65 | - if( $cm->updateElement( $_data['elementsgroup'], $element_id, $data['category_id'] ) ) |
|
| 65 | + if ($cm->updateElement($_data['elementsgroup'], $element_id, $data['category_id'])) |
|
| 66 | 66 | { |
| 67 | 67 | $cm->addMessage( |
| 68 | 68 | sprintf( |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - if( $_changes === 0 ) |
|
| 81 | + if ($_changes === 0) |
|
| 82 | 82 | { |
| 83 | - $cm->addMessage( $cm->txt('cm_no_categorization'), 'categorize' ); |
|
| 83 | + $cm->addMessage($cm->txt('cm_no_categorization'), 'categorize'); |
|
| 84 | 84 | return; |
| 85 | 85 | } |
| 86 | 86 | else |
@@ -98,29 +98,29 @@ discard block |
||
| 98 | 98 | /** |
| 99 | 99 | * Add a new category |
| 100 | 100 | */ |
| 101 | -if( isset( $_POST[$cm->get('request_key')]['add']['submit'] ) ) |
|
| 101 | +if (isset($_POST[$cm->get('request_key')]['add']['submit'])) |
|
| 102 | 102 | { |
| 103 | 103 | $_data = $_POST[$cm->get('request_key')]['add']['data']; |
| 104 | - $category = trim( html_entity_decode($_data['name']) ); |
|
| 104 | + $category = trim(html_entity_decode($_data['name'])); |
|
| 105 | 105 | $rank = (int) $_data['rank']; |
| 106 | 106 | |
| 107 | - if( empty( $category ) ) |
|
| 107 | + if (empty($category)) |
|
| 108 | 108 | { |
| 109 | - $cm->addMessage( $cm->txt('cm_enter_name_for_category'), 'add' ); |
|
| 109 | + $cm->addMessage($cm->txt('cm_enter_name_for_category'), 'add'); |
|
| 110 | 110 | return; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - if( $cm->isCategoryExists( $category ) ) |
|
| 113 | + if ($cm->isCategoryExists($category)) |
|
| 114 | 114 | { |
| 115 | - $cm->addMessage( sprintf( $cm->txt('cm_category_x_exists'), $category ), 'add' ); |
|
| 115 | + $cm->addMessage(sprintf($cm->txt('cm_category_x_exists'), $category), 'add'); |
|
| 116 | 116 | return; |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - if( $cm->addCategory( $category, $rank ) !== 0 ) |
|
| 119 | + if ($cm->addCategory($category, $rank) !== 0) |
|
| 120 | 120 | { |
| 121 | 121 | $cm->addMessage( |
| 122 | 122 | sprintf( |
| 123 | - $cm->txt( 'cm_category_x_saved_at_position_y' ), |
|
| 123 | + $cm->txt('cm_category_x_saved_at_position_y'), |
|
| 124 | 124 | $category, |
| 125 | 125 | $rank |
| 126 | 126 | ), |
@@ -129,26 +129,26 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | else |
| 131 | 131 | { |
| 132 | - $cm->addMessage( $cm->txt('cm_unknown_error'), 'add' ); |
|
| 132 | + $cm->addMessage($cm->txt('cm_unknown_error'), 'add'); |
|
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | /** |
| 137 | 137 | * Sort categories |
| 138 | 138 | */ |
| 139 | -if( isset( $_POST[$cm->get('request_key')]['sort']['submit'] ) ) |
|
| 139 | +if (isset($_POST[$cm->get('request_key')]['sort']['submit'])) |
|
| 140 | 140 | { |
| 141 | 141 | $categories = $_POST[$cm->get('request_key')]['sort']['data']; |
| 142 | 142 | $_changes = 0; |
| 143 | 143 | |
| 144 | - foreach( $categories as $category_id => $_data ) |
|
| 144 | + foreach ($categories as $category_id => $_data) |
|
| 145 | 145 | { |
| 146 | 146 | $data = array( |
| 147 | - 'category' => urldecode( $_data['category'] ), |
|
| 147 | + 'category' => urldecode($_data['category']), |
|
| 148 | 148 | 'rank' => $_data['rank'] |
| 149 | 149 | ); |
| 150 | 150 | |
| 151 | - if( $cm->updateCategory( $category_id, $data ) ) |
|
| 151 | + if ($cm->updateCategory($category_id, $data)) |
|
| 152 | 152 | { |
| 153 | 153 | $cm->addMessage( |
| 154 | 154 | sprintf( |
@@ -162,9 +162,9 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - if( $_changes === 0 ) |
|
| 165 | + if ($_changes === 0) |
|
| 166 | 166 | { |
| 167 | - $cm->addMessage( $cm->txt( 'cm_no_changes' ), 'sort'); |
|
| 167 | + $cm->addMessage($cm->txt('cm_no_changes'), 'sort'); |
|
| 168 | 168 | } |
| 169 | 169 | else |
| 170 | 170 | { |
@@ -181,21 +181,21 @@ discard block |
||
| 181 | 181 | /** |
| 182 | 182 | * Edit categories |
| 183 | 183 | */ |
| 184 | -if( isset( $_POST[$cm->get('request_key')]['edit']['submit'] ) ) |
|
| 184 | +if (isset($_POST[$cm->get('request_key')]['edit']['submit'])) |
|
| 185 | 185 | { |
| 186 | 186 | $categories = $_POST[$cm->get('request_key')]['edit']['data']; |
| 187 | 187 | $_changes = 0; |
| 188 | 188 | |
| 189 | - foreach( $categories as $category_id => $_data ) |
|
| 189 | + foreach ($categories as $category_id => $_data) |
|
| 190 | 190 | { |
| 191 | - if( isset( $_data['delete'] ) ) |
|
| 191 | + if (isset($_data['delete'])) |
|
| 192 | 192 | { |
| 193 | - if( $cm->deleteCategory( $category_id ) ) |
|
| 193 | + if ($cm->deleteCategory($category_id)) |
|
| 194 | 194 | { |
| 195 | 195 | $cm->addMessage( |
| 196 | 196 | sprintf( |
| 197 | 197 | $cm->txt('cm_category_x_deleted'), |
| 198 | - urldecode( $_data['origin'] ) |
|
| 198 | + urldecode($_data['origin']) |
|
| 199 | 199 | ), |
| 200 | 200 | 'edit' |
| 201 | 201 | ); |
@@ -205,16 +205,16 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | $data = array( |
| 208 | - 'category' => trim( html_entity_decode( $_data['category'] ) ), |
|
| 208 | + 'category' => trim(html_entity_decode($_data['category'])), |
|
| 209 | 209 | 'rank' => $_data['rank'] |
| 210 | 210 | ); |
| 211 | 211 | |
| 212 | - if( $cm->updateCategory( $category_id, $data ) ) |
|
| 212 | + if ($cm->updateCategory($category_id, $data)) |
|
| 213 | 213 | { |
| 214 | 214 | $cm->addMessage( |
| 215 | 215 | sprintf( |
| 216 | 216 | $cm->txt('cm_category_x_renamed_to_y'), |
| 217 | - urldecode( $_data['origin'] ), |
|
| 217 | + urldecode($_data['origin']), |
|
| 218 | 218 | $data['category'] |
| 219 | 219 | ), |
| 220 | 220 | 'edit' |
@@ -223,26 +223,26 @@ discard block |
||
| 223 | 223 | } |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - if( $_changes === 0 ) |
|
| 226 | + if ($_changes === 0) |
|
| 227 | 227 | { |
| 228 | - $cm->addMessage( $cm->txt( 'cm_no_changes' ), 'edit'); |
|
| 228 | + $cm->addMessage($cm->txt('cm_no_changes'), 'edit'); |
|
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | /** |
| 233 | 233 | * Delete singel category by $_GET |
| 234 | 234 | */ |
| 235 | -if( isset( $_GET[$cm->get('request_key')]['delete'] ) |
|
| 236 | - && !empty( $_GET[$cm->get('request_key')]['delete'] ) ) |
|
| 235 | +if (isset($_GET[$cm->get('request_key')]['delete']) |
|
| 236 | + && !empty($_GET[$cm->get('request_key')]['delete'])) |
|
| 237 | 237 | { |
| 238 | - $category_id = (int)$_GET[$cm->get('request_key')]['delete']; |
|
| 238 | + $category_id = (int) $_GET[$cm->get('request_key')]['delete']; |
|
| 239 | 239 | |
| 240 | - if( $cm->deleteCategory( $category_id ) ) |
|
| 240 | + if ($cm->deleteCategory($category_id)) |
|
| 241 | 241 | { |
| 242 | 242 | $cm->addMessage( |
| 243 | 243 | sprintf( |
| 244 | 244 | $cm->txt('cm_category_x_deleted'), |
| 245 | - urldecode( $_GET[$cm->get('request_key')]['category'] ) |
|
| 245 | + urldecode($_GET[$cm->get('request_key')]['category']) |
|
| 246 | 246 | ), |
| 247 | 247 | 'edit' |
| 248 | 248 | ); |
@@ -251,15 +251,15 @@ discard block |
||
| 251 | 251 | /** |
| 252 | 252 | * Translate phrases |
| 253 | 253 | */ |
| 254 | -if( isset( $_POST[$cm->get('request_key')]['translate']['submit'] ) ) |
|
| 254 | +if (isset($_POST[$cm->get('request_key')]['translate']['submit'])) |
|
| 255 | 255 | { |
| 256 | 256 | $translations = $_POST[$cm->get('request_key')]['translate']['data']; |
| 257 | 257 | |
| 258 | - foreach( $translations as $native_phrase => $translation ) |
|
| 258 | + foreach ($translations as $native_phrase => $translation) |
|
| 259 | 259 | { |
| 260 | - $native_phrase = urldecode( $native_phrase ); |
|
| 260 | + $native_phrase = urldecode($native_phrase); |
|
| 261 | 261 | |
| 262 | - if( empty( $translation ) ) |
|
| 262 | + if (empty($translation)) |
|
| 263 | 263 | { |
| 264 | 264 | $translation = $native_phrase; |
| 265 | 265 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | ); |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - $cm->c('Translator')->addTranslation( $native_phrase, $translation, 'phrase' ); |
|
| 275 | + $cm->c('Translator')->addTranslation($native_phrase, $translation, 'phrase'); |
|
| 276 | 276 | |
| 277 | 277 | $cm->addMessage( |
| 278 | 278 | sprintf( |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | * Message Quit Template |
| 4 | 4 | * |
| 5 | 5 | */ |
| 6 | -if(( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) && IN_PARSER_MODE!="true") { |
|
| 6 | +if ((!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) && IN_PARSER_MODE != "true") { |
|
| 7 | 7 | die("<b>INCLUDE ACCESS ERROR</b><br /><br />Direct access to this file prohibited."); |
| 8 | 8 | } |
| 9 | 9 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | </script> |
| 21 | 21 | </head><body> |
| 22 | 22 | "; |
| 23 | -if($is_error) { |
|
| 23 | +if ($is_error) { |
|
| 24 | 24 | $parsedMessageString .= "<h3 style='color:red;background:#e0e0e0;padding:2px;'> MODX Parse Error </h3> |
| 25 | 25 | <table border='0' cellpadding='1' cellspacing='0'> |
| 26 | 26 | <tr><td colspan='3'>MODX encountered the following error while attempting to parse the requested resource:</td></tr> |
@@ -32,14 +32,14 @@ discard block |
||
| 32 | 32 | <tr><td colspan='3'><b style='color:#003399;'>« $msg »</b></td></tr>"; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -if(!empty($query)) { |
|
| 35 | +if (!empty($query)) { |
|
| 36 | 36 | $parsedMessageString .= "<tr><td colspan='3'><hr size='1' width='98%' style='color:#e0e0e0'/><b style='color:#999;font-size: 9px;border-left:1px solid #c0c0c0; margin-left:10px;'> SQL: <span id='sqlHolder'>$query</span></b><hr size='1' width='98%' style='color:#e0e0e0'/> |
| 37 | 37 | <a href='javascript:copyToClip();' style='color:#821517;font-size: 9px; text-decoration: none'>[Copy SQL to ClipBoard]</a><textarea id='holdtext' style='display:none;'></textarea></td></tr>"; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | -if($text!='') { |
|
| 40 | +if ($text != '') { |
|
| 41 | 41 | |
| 42 | - $errortype = array ( |
|
| 42 | + $errortype = array( |
|
| 43 | 43 | E_ERROR => "Error", |
| 44 | 44 | E_WARNING => "Warning", |
| 45 | 45 | E_PARSE => "Parsing Error", |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $parsedMessageString .= "<tr><td> Line: </td>"; |
| 71 | 71 | $parsedMessageString .= "<td colspan='2'>$line</td><td> </td>"; |
| 72 | 72 | $parsedMessageString .= "</tr>"; |
| 73 | - if($source!='') { |
|
| 73 | + if ($source != '') { |
|
| 74 | 74 | $parsedMessageString .= "<tr><td valign='top'> Line $line source: </td>"; |
| 75 | 75 | $parsedMessageString .= "<td colspan='2'>$source</td><td> </td>"; |
| 76 | 76 | $parsedMessageString .= "</tr>"; |
@@ -1,75 +1,75 @@ |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || 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($modx->manager->action!='8' && isset($_SESSION['mgrValidated'])){ |
|
| 6 | +if ($modx->manager->action != '8' && isset($_SESSION['mgrValidated'])) { |
|
| 7 | 7 | |
| 8 | - $homeurl = $modx->makeUrl($manager_login_startup>0 ? $manager_login_startup:$site_start); |
|
| 8 | + $homeurl = $modx->makeUrl($manager_login_startup > 0 ? $manager_login_startup : $site_start); |
|
| 9 | 9 | $logouturl = MODX_MANAGER_URL.'index.php?a=8'; |
| 10 | 10 | |
| 11 | - $modx->setPlaceholder('modx_charset',$modx_manager_charset); |
|
| 12 | - $modx->setPlaceholder('theme',$manager_theme); |
|
| 11 | + $modx->setPlaceholder('modx_charset', $modx_manager_charset); |
|
| 12 | + $modx->setPlaceholder('theme', $manager_theme); |
|
| 13 | 13 | |
| 14 | - $modx->setPlaceholder('site_name',$site_name); |
|
| 15 | - $modx->setPlaceholder('logo_slogan',$_lang["logo_slogan"]); |
|
| 16 | - $modx->setPlaceholder('manager_lockout_message',$_lang["manager_lockout_message"]); |
|
| 14 | + $modx->setPlaceholder('site_name', $site_name); |
|
| 15 | + $modx->setPlaceholder('logo_slogan', $_lang["logo_slogan"]); |
|
| 16 | + $modx->setPlaceholder('manager_lockout_message', $_lang["manager_lockout_message"]); |
|
| 17 | 17 | |
| 18 | - $modx->setPlaceholder('home',$_lang["home"]); |
|
| 19 | - $modx->setPlaceholder('homeurl',$homeurl); |
|
| 20 | - $modx->setPlaceholder('logout',$_lang["logout"]); |
|
| 21 | - $modx->setPlaceholder('logouturl',$logouturl); |
|
| 22 | - $modx->setPlaceholder('manager_theme_url',MODX_MANAGER_URL . 'media/style/' . $modx->config['manager_theme'] . '/'); |
|
| 23 | - $modx->setPlaceholder('year',date('Y')); |
|
| 18 | + $modx->setPlaceholder('home', $_lang["home"]); |
|
| 19 | + $modx->setPlaceholder('homeurl', $homeurl); |
|
| 20 | + $modx->setPlaceholder('logout', $_lang["logout"]); |
|
| 21 | + $modx->setPlaceholder('logouturl', $logouturl); |
|
| 22 | + $modx->setPlaceholder('manager_theme_url', MODX_MANAGER_URL.'media/style/'.$modx->config['manager_theme'].'/'); |
|
| 23 | + $modx->setPlaceholder('year', date('Y')); |
|
| 24 | 24 | |
| 25 | 25 | // load template |
| 26 | - if(!isset($modx->config['manager_lockout_tpl']) || empty($modx->config['manager_lockout_tpl'])) { |
|
| 27 | - $modx->config['manager_lockout_tpl'] = MODX_MANAGER_PATH . 'media/style/common/manager.lockout.tpl'; |
|
| 26 | + if (!isset($modx->config['manager_lockout_tpl']) || empty($modx->config['manager_lockout_tpl'])) { |
|
| 27 | + $modx->config['manager_lockout_tpl'] = MODX_MANAGER_PATH.'media/style/common/manager.lockout.tpl'; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $target = $modx->config['manager_lockout_tpl']; |
| 31 | 31 | $target = str_replace('[+base_path+]', MODX_BASE_PATH, $target); |
| 32 | 32 | $target = $modx->mergeSettingsContent($target); |
| 33 | 33 | |
| 34 | - if(substr($target,0,1)==='@') { |
|
| 35 | - if(substr($target,0,6)==='@CHUNK') { |
|
| 36 | - $target = trim(substr($target,7)); |
|
| 34 | + if (substr($target, 0, 1) === '@') { |
|
| 35 | + if (substr($target, 0, 6) === '@CHUNK') { |
|
| 36 | + $target = trim(substr($target, 7)); |
|
| 37 | 37 | $lockout_tpl = $modx->getChunk($target); |
| 38 | 38 | } |
| 39 | - elseif(substr($target,0,5)==='@FILE') { |
|
| 40 | - $target = trim(substr($target,6)); |
|
| 39 | + elseif (substr($target, 0, 5) === '@FILE') { |
|
| 40 | + $target = trim(substr($target, 6)); |
|
| 41 | 41 | $lockout_tpl = file_get_contents($target); |
| 42 | 42 | } |
| 43 | 43 | } else { |
| 44 | 44 | $chunk = $modx->getChunk($target); |
| 45 | - if($chunk!==false && !empty($chunk)) { |
|
| 45 | + if ($chunk !== false && !empty($chunk)) { |
|
| 46 | 46 | $lockout_tpl = $chunk; |
| 47 | 47 | } |
| 48 | - elseif(is_file(MODX_BASE_PATH . $target)) { |
|
| 49 | - $target = MODX_BASE_PATH . $target; |
|
| 48 | + elseif (is_file(MODX_BASE_PATH.$target)) { |
|
| 49 | + $target = MODX_BASE_PATH.$target; |
|
| 50 | 50 | $lockout_tpl = file_get_contents($target); |
| 51 | 51 | } |
| 52 | - elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl')) { |
|
| 53 | - $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/manager.lockout.tpl'; |
|
| 52 | + elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/manager.lockout.tpl')) { |
|
| 53 | + $target = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/manager.lockout.tpl'; |
|
| 54 | 54 | $lockout_tpl = file_get_contents($target); |
| 55 | 55 | } |
| 56 | - elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl')) { |
|
| 57 | - $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/templates/actions/manager.lockout.tpl'; |
|
| 56 | + elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/templates/actions/manager.lockout.tpl')) { |
|
| 57 | + $target = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/templates/actions/manager.lockout.tpl'; |
|
| 58 | 58 | $login_tpl = file_get_contents($target); |
| 59 | 59 | } |
| 60 | - elseif(is_file(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html')) { // ClipperCMS compatible |
|
| 61 | - $target = MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/html/manager.lockout.html'; |
|
| 60 | + elseif (is_file(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/html/manager.lockout.html')) { // ClipperCMS compatible |
|
| 61 | + $target = MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/html/manager.lockout.html'; |
|
| 62 | 62 | $lockout_tpl = file_get_contents($target); |
| 63 | 63 | } |
| 64 | 64 | else { |
| 65 | - $target = MODX_MANAGER_PATH . 'media/style/common/manager.lockout.tpl'; |
|
| 65 | + $target = MODX_MANAGER_PATH.'media/style/common/manager.lockout.tpl'; |
|
| 66 | 66 | $lockout_tpl = file_get_contents($target); |
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // merge placeholders |
| 71 | 71 | $lockout_tpl = $modx->mergePlaceholderContent($lockout_tpl); |
| 72 | - $regx = strpos($lockout_tpl,'[[+')!==false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers |
|
| 72 | + $regx = strpos($lockout_tpl, '[[+') !== false ? '~\[\[\+(.*?)\]\]~' : '~\[\+(.*?)\+\]~'; // little tweak for newer parsers |
|
| 73 | 73 | $lockout_tpl = preg_replace($regx, '', $lockout_tpl); //cleanup |
| 74 | 74 | |
| 75 | 75 | echo $lockout_tpl; |
@@ -1,10 +1,10 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || 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 | 6 | // show debug information |
| 7 | -if(isset($enable_debug) && $enable_debug==true) { |
|
| 7 | +if (isset($enable_debug) && $enable_debug == true) { |
|
| 8 | 8 | ?> |
| 9 | 9 | <script language="javascript"> |
| 10 | 10 | //document.onload = removeDebug(); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | </style> |
| 37 | 37 | <?php |
| 38 | - $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $tend = $mtime; $totaltime = ($tend - $tstart); |
|
| 38 | + $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $tend = $mtime; $totaltime = ($tend - $tstart); |
|
| 39 | 39 | ?> |
| 40 | 40 | <div class='debug' id='debug' name='debug' onClick="removeDebugDiv();"> |
| 41 | 41 | <table border="0" cellspacing="0" cellpadding="0"> |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | </tr> |
| 45 | 45 | <tr> |
| 46 | 46 | <td width="70">Time taken</td> |
| 47 | - <td width="80"><?php echo printf ("%6.5f s", $totaltime); ?></td> |
|
| 47 | + <td width="80"><?php echo printf("%6.5f s", $totaltime); ?></td> |
|
| 48 | 48 | </tr> |
| 49 | 49 | </table> |
| 50 | 50 | </div> |
@@ -1,10 +1,10 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
| 2 | +if (!defined('IN_MANAGER_MODE') || 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 | global $SystemAlertMsgQueque; |
| 6 | 6 | // display system alert window if messages are available |
| 7 | -if(count($SystemAlertMsgQueque) > 0) { |
|
| 7 | +if (count($SystemAlertMsgQueque) > 0) { |
|
| 8 | 8 | include "sysalert.display.inc.php"; |
| 9 | 9 | } |
| 10 | 10 | ?> |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | }); |
| 19 | 19 | </script> |
| 20 | 20 | <?php |
| 21 | -if(in_array($modx->manager->action, array( |
|
| 21 | +if (in_array($modx->manager->action, array( |
|
| 22 | 22 | 85, |
| 23 | 23 | 27, |
| 24 | 24 | 4, |