@@ -1,6 +1,6 @@ |
||
1 | 1 | <!-- plugins --> |
2 | 2 | <?php |
3 | -if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
3 | +if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
|
4 | 4 | die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
5 | 5 | } |
6 | 6 |
@@ -1,30 +1,30 @@ 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('web_access_permissions')) { |
|
5 | +if (!$modx->hasPermission('web_access_permissions')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
9 | 9 | // find all document groups, for the select :) |
10 | 10 | $rs = $modx->db->select('*', $modx->getFullTableName('documentgroup_names'), '', 'name'); |
11 | -if($modx->db->getRecordCount($rs) < 1) { |
|
11 | +if ($modx->db->getRecordCount($rs) < 1) { |
|
12 | 12 | $docgroupselector = "[no groups to add]"; |
13 | 13 | } else { |
14 | - $docgroupselector = '<select name="docgroup">' . "\n"; |
|
15 | - while($row = $modx->db->getRow($rs)) { |
|
16 | - $docgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
14 | + $docgroupselector = '<select name="docgroup">'."\n"; |
|
15 | + while ($row = $modx->db->getRow($rs)) { |
|
16 | + $docgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
17 | 17 | } |
18 | 18 | $docgroupselector .= "</select>\n"; |
19 | 19 | } |
20 | 20 | |
21 | 21 | $rs = $modx->db->select('*', $modx->getFullTableName('webgroup_names'), '', 'name'); |
22 | -if($modx->db->getRecordCount($rs) < 1) { |
|
22 | +if ($modx->db->getRecordCount($rs) < 1) { |
|
23 | 23 | $usrgroupselector = '[no user groups]'; |
24 | 24 | } else { |
25 | - $usrgroupselector = '<select name="usergroup">' . "\n"; |
|
26 | - while($row = $modx->db->getRow($rs)) { |
|
27 | - $usrgroupselector .= "\t" . '<option value="' . $row['id'] . '">' . $row['name'] . "</option>\n"; |
|
25 | + $usrgroupselector = '<select name="usergroup">'."\n"; |
|
26 | + while ($row = $modx->db->getRow($rs)) { |
|
27 | + $usrgroupselector .= "\t".'<option value="'.$row['id'].'">'.$row['name']."</option>\n"; |
|
28 | 28 | } |
29 | 29 | $usrgroupselector .= "</select>\n"; |
30 | 30 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <div class="alert alert-info"><?= $_lang['access_permissions_introtext'] ?></div> |
61 | 61 | </div> |
62 | 62 | |
63 | -<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">' . $_lang['access_permissions_off'] . '</div>' : '') ?></div> |
|
63 | +<div class="container"><?= ($use_udperms != 1 ? '<div class="alert alert-danger">'.$_lang['access_permissions_off'].'</div>' : '') ?></div> |
|
64 | 64 | |
65 | 65 | |
66 | 66 | <div class="tab-pane" id="wuapPane"> |
@@ -88,10 +88,10 @@ discard block |
||
88 | 88 | </form> |
89 | 89 | </div> |
90 | 90 | <?php |
91 | - $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name ', $modx->getFullTableName('webgroup_names') . " AS groupnames |
|
92 | - LEFT JOIN " . $modx->getFullTableName('web_groups') . " AS groups ON groups.webgroup = groupnames.id |
|
93 | - LEFT JOIN " . $modx->getFullTableName('web_users') . " AS users ON users.id = groups.webuser", '', 'groupnames.name, user_name'); |
|
94 | - if($modx->db->getRecordCount($rs) < 1) { |
|
91 | + $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name ', $modx->getFullTableName('webgroup_names')." AS groupnames |
|
92 | + LEFT JOIN " . $modx->getFullTableName('web_groups')." AS groups ON groups.webgroup = groupnames.id |
|
93 | + LEFT JOIN " . $modx->getFullTableName('web_users')." AS users ON users.id = groups.webuser", '', 'groupnames.name, user_name'); |
|
94 | + if ($modx->db->getRecordCount($rs) < 1) { |
|
95 | 95 | ?> |
96 | 96 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
97 | 97 | <?php |
@@ -100,9 +100,9 @@ discard block |
||
100 | 100 | <div class="form-group"> |
101 | 101 | <?php |
102 | 102 | $pid = ''; |
103 | - while($row = $modx->db->getRow($rs)) { |
|
104 | - if($pid != $row['id']) { |
|
105 | - if($pid != '') { |
|
103 | + while ($row = $modx->db->getRow($rs)) { |
|
104 | + if ($pid != $row['id']) { |
|
105 | + if ($pid != '') { |
|
106 | 106 | echo '</div><div class="form-group">'; |
107 | 107 | } |
108 | 108 | ?> |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | <?= $_lang['web_access_permissions_users_in_group'] ?> |
122 | 122 | <?php |
123 | 123 | } |
124 | - if(!$row['user_id']) { |
|
124 | + if (!$row['user_id']) { |
|
125 | 125 | ?> |
126 | 126 | <i><?= $_lang['access_permissions_no_users_in_group'] ?></i> |
127 | 127 | <?php |
@@ -159,10 +159,10 @@ discard block |
||
159 | 159 | </form> |
160 | 160 | </div> |
161 | 161 | <?php |
162 | - $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $modx->getFullTableName('documentgroup_names') . " AS dgnames |
|
163 | - LEFT JOIN " . $modx->getFullTableName('document_groups') . " AS dg ON dg.document_group = dgnames.id |
|
164 | - LEFT JOIN " . $modx->getFullTableName('site_content') . " AS sc ON sc.id = dg.document", '', 'dgnames.name, sc.id'); |
|
165 | - if($modx->db->getRecordCount($rs) < 1) { |
|
162 | + $rs = $modx->db->select('dgnames.id, dgnames.name, sc.id AS doc_id, sc.pagetitle AS doc_title', $modx->getFullTableName('documentgroup_names')." AS dgnames |
|
163 | + LEFT JOIN " . $modx->getFullTableName('document_groups')." AS dg ON dg.document_group = dgnames.id |
|
164 | + LEFT JOIN " . $modx->getFullTableName('site_content')." AS sc ON sc.id = dg.document", '', 'dgnames.name, sc.id'); |
|
165 | + if ($modx->db->getRecordCount($rs) < 1) { |
|
166 | 166 | ?> |
167 | 167 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
168 | 168 | <?php |
@@ -171,9 +171,9 @@ discard block |
||
171 | 171 | <div class="form-group"> |
172 | 172 | <?php |
173 | 173 | $pid = ''; |
174 | - while($row = $modx->db->getRow($rs)) { |
|
175 | - if($pid != $row['id']) { |
|
176 | - if($pid != '') { |
|
174 | + while ($row = $modx->db->getRow($rs)) { |
|
175 | + if ($pid != $row['id']) { |
|
176 | + if ($pid != '') { |
|
177 | 177 | echo '</div><div class="form-group">'; |
178 | 178 | } |
179 | 179 | ?> |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | <?= $_lang['access_permissions_resources_in_group'] ?> |
193 | 193 | <?php |
194 | 194 | } |
195 | - if(!$row['doc_id']) { |
|
195 | + if (!$row['doc_id']) { |
|
196 | 196 | ?> |
197 | 197 | <i><?= $_lang['access_permissions_no_resources_in_group'] ?></i> |
198 | 198 | <?php |
@@ -217,10 +217,10 @@ discard block |
||
217 | 217 | <div class="container container-body"> |
218 | 218 | <p class="element-edit-message-tab alert alert-warning"><?= $_lang['access_permissions_links_tab'] ?></p> |
219 | 219 | <?php |
220 | - $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $modx->getFullTableName('webgroup_names') . " AS groupnames |
|
221 | - LEFT JOIN " . $modx->getFullTableName('webgroup_access') . " AS groupacc ON groupacc.webgroup = groupnames.id |
|
222 | - LEFT JOIN " . $modx->getFullTableName('documentgroup_names') . " AS dgnames ON dgnames.id = groupacc.documentgroup", '', 'name, dg_name'); |
|
223 | - if($modx->db->getRecordCount($rs) < 1) { |
|
220 | + $rs = $modx->db->select('groupnames.*, groupacc.id AS link_id, dgnames.id AS dg_id, dgnames.name AS dg_name', $modx->getFullTableName('webgroup_names')." AS groupnames |
|
221 | + LEFT JOIN " . $modx->getFullTableName('webgroup_access')." AS groupacc ON groupacc.webgroup = groupnames.id |
|
222 | + LEFT JOIN " . $modx->getFullTableName('documentgroup_names')." AS dgnames ON dgnames.id = groupacc.documentgroup", '', 'name, dg_name'); |
|
223 | + if ($modx->db->getRecordCount($rs) < 1) { |
|
224 | 224 | ?> |
225 | 225 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
226 | 226 | <?php |
@@ -242,23 +242,23 @@ discard block |
||
242 | 242 | <ul> |
243 | 243 | <?php |
244 | 244 | $pid = ''; |
245 | - while($row = $modx->db->getRow($rs)) { |
|
246 | - if($row['id'] != $pid) { |
|
247 | - if($pid != '') { |
|
245 | + while ($row = $modx->db->getRow($rs)) { |
|
246 | + if ($row['id'] != $pid) { |
|
247 | + if ($pid != '') { |
|
248 | 248 | echo '</ul></li>'; |
249 | 249 | } // close previous one |
250 | 250 | ?> |
251 | 251 | <li><b><?= $row['name'] ?></b></li> |
252 | 252 | <?php |
253 | - if(!$row['dg_id']) { |
|
254 | - echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
253 | + if (!$row['dg_id']) { |
|
254 | + echo '<i>'.$_lang['no_groups_found'].'</i></li>'; |
|
255 | 255 | $pid = ''; |
256 | 256 | continue; |
257 | 257 | } else { |
258 | 258 | echo '<ul>'; |
259 | 259 | } |
260 | 260 | } |
261 | - if(!$row['dg_id']) { |
|
261 | + if (!$row['dg_id']) { |
|
262 | 262 | continue; |
263 | 263 | } |
264 | 264 | ?> |
@@ -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('edit_user')) { |
|
5 | +if (!$modx->hasPermission('edit_user')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <?php |
21 | 21 | $rs = $modx->db->select('name, id, description', $modx->getFullTableName('user_roles'), '', 'name'); |
22 | 22 | $limit = $modx->db->getRecordCount($rs); |
23 | - if($limit < 1) { |
|
23 | + if ($limit < 1) { |
|
24 | 24 | ?> |
25 | 25 | <p><?= $_lang["no_records_found"] ?></p> |
26 | 26 | <?php |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | </thead> |
38 | 38 | <tbody> |
39 | 39 | <?php |
40 | - while($row = $modx->db->getRow($rs)) { |
|
41 | - if($row['id'] == 1) { |
|
40 | + while ($row = $modx->db->getRow($rs)) { |
|
41 | + if ($row['id'] == 1) { |
|
42 | 42 | ?> |
43 | 43 | <tr class="text-muted disabled"> |
44 | 44 | <td><b><?= $row['name'] ?></b></td> |
@@ -1,9 +1,9 @@ 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(!$modx->hasPermission('category_manager')) { |
|
6 | +if (!$modx->hasPermission('category_manager')) { |
|
7 | 7 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
8 | 8 | } |
9 | 9 | |
@@ -15,32 +15,32 @@ discard block |
||
15 | 15 | 'native_language' => 'de', |
16 | 16 | 'name' => 'Categories Manager', |
17 | 17 | 'dirname' => $site_manager_url, |
18 | - 'url' => 'index.php?a=120&id=' . $_GET['id'], |
|
19 | - 'path' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR, |
|
20 | - 'inc_dir' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR, |
|
21 | - 'languages_dir' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR, |
|
22 | - 'views_dir' => realpath( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'category_mgr' . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR, |
|
18 | + 'url' => 'index.php?a=120&id='.$_GET['id'], |
|
19 | + 'path' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR, |
|
20 | + 'inc_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'inc'.DIRECTORY_SEPARATOR, |
|
21 | + 'languages_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR, |
|
22 | + 'views_dir' => realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR.'category_mgr'.DIRECTORY_SEPARATOR.'skin'.DIRECTORY_SEPARATOR, |
|
23 | 23 | 'request_key' => 'module_categories_manager', |
24 | 24 | 'messages' => array() |
25 | 25 | ); |
26 | 26 | |
27 | -require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php'; |
|
27 | +require_once $_module_params['inc_dir'].'Module_Categories_Manager.php'; |
|
28 | 28 | $cm = new Module_Categories_Manager(); |
29 | 29 | |
30 | 30 | // assign module_params to internal params |
31 | -foreach( $_module_params as $param => $value ) |
|
31 | +foreach ($_module_params as $param => $value) |
|
32 | 32 | { |
33 | - $cm->set( $param, $value ); |
|
33 | + $cm->set($param, $value); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | // catch the request actions |
37 | -include_once $cm->get('inc_dir') . 'request_trigger.inc.php'; |
|
37 | +include_once $cm->get('inc_dir').'request_trigger.inc.php'; |
|
38 | 38 | |
39 | -if( !$categories = $cm->getCategories() ) |
|
39 | +if (!$categories = $cm->getCategories()) |
|
40 | 40 | { |
41 | - setcookie('webfxtab_manage-categories-pane', 0 ); |
|
42 | - $cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' ); |
|
41 | + setcookie('webfxtab_manage-categories-pane', 0); |
|
42 | + $cm->addMessage($cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global'); |
|
43 | 43 | } |
44 | 44 | |
45 | -$cm->renderView('main', $categories ); |
|
45 | +$cm->renderView('main', $categories); |
|
46 | 46 | return; |
@@ -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('edit_user')) { |
|
5 | +if (!$modx->hasPermission('edit_user')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
7 | 7 | } |
8 | 8 | |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | $modx->manager->initPageViewState(); |
11 | 11 | |
12 | 12 | // get and save search string |
13 | -if($_REQUEST['op'] == 'reset') { |
|
13 | +if ($_REQUEST['op'] == 'reset') { |
|
14 | 14 | $query = ''; |
15 | 15 | $_PAGE['vs']['search'] = ''; |
16 | 16 | } else { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | |
27 | 27 | // context menu |
28 | -include_once MODX_MANAGER_PATH . "includes/controls/contextmenu.php"; |
|
28 | +include_once MODX_MANAGER_PATH."includes/controls/contextmenu.php"; |
|
29 | 29 | $cm = new ContextMenu("cntxm", 150); |
30 | 30 | $cm->addItem($_lang["edit"], "js:menuAction(1)", $_style["actions_edit"], (!$modx->hasPermission('edit_user') ? 1 : 0)); |
31 | 31 | $cm->addItem($_lang["delete"], "js:menuAction(2)", $_style["actions_delete"], (!$modx->hasPermission('delete_user') ? 1 : 0)); |
@@ -121,16 +121,16 @@ discard block |
||
121 | 121 | <div class="table-responsive"> |
122 | 122 | <?php |
123 | 123 | $where = ""; |
124 | - if(!$modx->hasPermission('save_role')) { |
|
125 | - $where .= (empty($where) ? "" : " AND ") . "mua.role != 1"; |
|
124 | + if (!$modx->hasPermission('save_role')) { |
|
125 | + $where .= (empty($where) ? "" : " AND ")."mua.role != 1"; |
|
126 | 126 | } |
127 | - if(!empty($sqlQuery)) { |
|
128 | - $where .= (empty($where) ? "" : " AND ") . "((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))"; |
|
127 | + if (!empty($sqlQuery)) { |
|
128 | + $where .= (empty($where) ? "" : " AND ")."((mu.username LIKE '{$sqlQuery}%') OR (mua.fullname LIKE '%{$sqlQuery}%') OR (mua.email LIKE '{$sqlQuery}%'))"; |
|
129 | 129 | } |
130 | - $ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users') . " AS mu |
|
131 | - INNER JOIN " . $modx->getFullTableName('user_attributes') . " AS mua ON mua.internalKey=mu.id |
|
132 | - LEFT JOIN " . $modx->getFullTableName('user_roles') . " AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC'); |
|
133 | - include_once MODX_MANAGER_PATH . "includes/controls/datagrid.class.php"; |
|
130 | + $ds = $modx->db->select("mu.id, mu.username, rname.name AS role, mua.fullname, mua.email, ELT(mua.gender, '{$_lang['user_male']}', '{$_lang['user_female']}', '{$_lang['user_other']}') AS gender, IF(mua.blocked,'{$_lang['yes']}','-') as blocked, mua.thislogin", $modx->getFullTableName('manager_users')." AS mu |
|
131 | + INNER JOIN " . $modx->getFullTableName('user_attributes')." AS mua ON mua.internalKey=mu.id |
|
132 | + LEFT JOIN " . $modx->getFullTableName('user_roles')." AS rname ON mua.role=rname.id", $where, 'mua.blocked ASC, mua.thislogin DESC'); |
|
133 | + include_once MODX_MANAGER_PATH."includes/controls/datagrid.class.php"; |
|
134 | 134 | $grd = new DataGrid('', $ds, $modx->config['number_of_results']); // set page size to 0 t show all items |
135 | 135 | $grd->noRecordMsg = $_lang["no_records_found"]; |
136 | 136 | $grd->cssClass = "table data"; |
@@ -151,19 +151,19 @@ discard block |
||
151 | 151 | $grd->colWidths = "1%,,,,,,1%,1%"; |
152 | 152 | $grd->colAligns = "center,,,,,center,center,right' nowrap='nowrap"; |
153 | 153 | $grd->colTypes = implode('||', array( |
154 | - 'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="' . $_lang['click_to_context'] . '"><i class="' . $_style['icons_user'] . '"></i></a>', |
|
155 | - 'template:<a href="index.php?a=12&id=[+id+]" title="' . $_lang['click_to_edit_title'] . '">[+value+]</a>', |
|
154 | + 'template:<a class="gridRowIcon" href="javascript:;" onclick="return showContentMenu([+id+],event);" title="'.$_lang['click_to_context'].'"><i class="'.$_style['icons_user'].'"></i></a>', |
|
155 | + 'template:<a href="index.php?a=12&id=[+id+]" title="'.$_lang['click_to_edit_title'].'">[+value+]</a>', |
|
156 | 156 | 'template:[+fullname+]', |
157 | 157 | 'template:[+role+]', |
158 | 158 | 'template:[+email+]', |
159 | 159 | 'template:[+gender+]', |
160 | 160 | 'template:[+blocked+]', |
161 | - 'date: ' . $modx->toDateFormat('[+thislogin+]', 'formatOnly') . ' %H:%M' |
|
161 | + 'date: '.$modx->toDateFormat('[+thislogin+]', 'formatOnly').' %H:%M' |
|
162 | 162 | )); |
163 | - if($listmode == '1') { |
|
163 | + if ($listmode == '1') { |
|
164 | 164 | $grd->pageSize = 0; |
165 | 165 | } |
166 | - if($_REQUEST['op'] == 'reset') { |
|
166 | + if ($_REQUEST['op'] == 'reset') { |
|
167 | 167 | $grd->pageNumber = 1; |
168 | 168 | } |
169 | 169 | // render grid |
@@ -1,15 +1,15 @@ 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(isset($_REQUEST['id'])) { |
|
6 | +if (isset($_REQUEST['id'])) { |
|
7 | 7 | $id = (int) $_REQUEST['id']; |
8 | 8 | } else { |
9 | 9 | $id = 0; |
10 | 10 | } |
11 | 11 | |
12 | -if(isset($_GET['opened'])) { |
|
12 | +if (isset($_GET['opened'])) { |
|
13 | 13 | $_SESSION['openedArray'] = $_GET['opened']; |
14 | 14 | } |
15 | 15 | |
@@ -22,16 +22,16 @@ discard block |
||
22 | 22 | $tbl_site_templates = $modx->getFullTableName('site_templates'); |
23 | 23 | |
24 | 24 | // Get access permissions |
25 | -if($_SESSION['mgrDocgroups']) { |
|
25 | +if ($_SESSION['mgrDocgroups']) { |
|
26 | 26 | $docgrp = implode(",", $_SESSION['mgrDocgroups']); |
27 | 27 | } |
28 | -$access = "1='" . $_SESSION['mgrRole'] . "' OR sc.privatemgr=0" . (!$docgrp ? "" : " OR dg.document_group IN ($docgrp)"); |
|
28 | +$access = "1='".$_SESSION['mgrRole']."' OR sc.privatemgr=0".(!$docgrp ? "" : " OR dg.document_group IN ($docgrp)"); |
|
29 | 29 | |
30 | 30 | // |
31 | -if($_SESSION['tree_show_only_folders']) { |
|
32 | - $parent = $id ? ($modx->db->getValue("SELECT parent FROM " . $tbl_site_content . " WHERE id=$id LIMIT 1")) : 0; |
|
33 | - $isfolder = $modx->db->getValue("SELECT isfolder FROM " . $tbl_site_content . " WHERE id=$id LIMIT 1"); |
|
34 | - if(!$isfolder && $parent != 0) { |
|
31 | +if ($_SESSION['tree_show_only_folders']) { |
|
32 | + $parent = $id ? ($modx->db->getValue("SELECT parent FROM ".$tbl_site_content." WHERE id=$id LIMIT 1")) : 0; |
|
33 | + $isfolder = $modx->db->getValue("SELECT isfolder FROM ".$tbl_site_content." WHERE id=$id LIMIT 1"); |
|
34 | + if (!$isfolder && $parent != 0) { |
|
35 | 35 | $id = $_REQUEST['id'] = $parent; |
36 | 36 | } |
37 | 37 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $rs = $modx->db->select('DISTINCT sc.*', "{$tbl_site_content} AS sc |
41 | 41 | LEFT JOIN {$tbl_document_groups} AS dg ON dg.document = sc.id", "sc.id ='{$id}' AND ({$access})"); |
42 | 42 | $content = $modx->db->getRow($rs); |
43 | -if(!$content) { |
|
43 | +if (!$content) { |
|
44 | 44 | $modx->webAlertAndQuit($_lang["access_permission_denied"]); |
45 | 45 | } |
46 | 46 | |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | ); |
85 | 85 | $filter_sort = ''; |
86 | 86 | $filter_dir = ''; |
87 | -if($numRecords > 0) { |
|
88 | - $filter_sort = '<select size="1" name="sort" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id=' . $id . '&dir=' . $dir . '&sort=\'+this.options[this.selectedIndex].value">' . '<option value="createdon"' . (($sort == 'createdon') ? ' selected' : '') . '>' . $_lang['createdon'] . '</option>' . '<option value="pub_date"' . (($sort == 'pub_date') ? ' selected' : '') . '>' . $_lang["page_data_publishdate"] . '</option>' . '<option value="pagetitle"' . (($sort == 'pagetitle') ? ' selected' : '') . '>' . $_lang['pagetitle'] . '</option>' . '<option value="menuindex"' . (($sort == 'menuindex') ? ' selected' : '') . '>' . $_lang['resource_opt_menu_index'] . '</option>' . //******** resource_opt_is_published - // |
|
89 | - '<option value="published"' . (($sort == 'published') ? ' selected' : '') . '>' . $_lang['resource_opt_is_published'] . '</option>' . //********// |
|
87 | +if ($numRecords > 0) { |
|
88 | + $filter_sort = '<select size="1" name="sort" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id='.$id.'&dir='.$dir.'&sort=\'+this.options[this.selectedIndex].value">'.'<option value="createdon"'.(($sort == 'createdon') ? ' selected' : '').'>'.$_lang['createdon'].'</option>'.'<option value="pub_date"'.(($sort == 'pub_date') ? ' selected' : '').'>'.$_lang["page_data_publishdate"].'</option>'.'<option value="pagetitle"'.(($sort == 'pagetitle') ? ' selected' : '').'>'.$_lang['pagetitle'].'</option>'.'<option value="menuindex"'.(($sort == 'menuindex') ? ' selected' : '').'>'.$_lang['resource_opt_menu_index'].'</option>'.//******** resource_opt_is_published - // |
|
89 | + '<option value="published"'.(($sort == 'published') ? ' selected' : '').'>'.$_lang['resource_opt_is_published'].'</option>'.//********// |
|
90 | 90 | '</select>'; |
91 | - $filter_dir = '<select size="1" name="dir" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id=' . $id . '&sort=' . $sort . '&dir=\'+this.options[this.selectedIndex].value">' . '<option value="DESC"' . (($dir == 'DESC') ? ' selected' : '') . '>' . $_lang['sort_desc'] . '</option>' . '<option value="ASC"' . (($dir == 'ASC') ? ' selected' : '') . '>' . $_lang['sort_asc'] . '</option>' . '</select>'; |
|
91 | + $filter_dir = '<select size="1" name="dir" class="form-control form-control-sm" onchange="document.location=\'index.php?a=3&id='.$id.'&sort='.$sort.'&dir=\'+this.options[this.selectedIndex].value">'.'<option value="DESC"'.(($dir == 'DESC') ? ' selected' : '').'>'.$_lang['sort_desc'].'</option>'.'<option value="ASC"'.(($dir == 'ASC') ? ' selected' : '').'>'.$_lang['sort_asc'].'</option>'.'</select>'; |
|
92 | 92 | $resource = $modx->db->makeArray($rs); |
93 | 93 | |
94 | 94 | // CSS style for table |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | ); |
133 | 133 | $modx->table->setColumnWidths($tbWidth); |
134 | 134 | |
135 | - $sd = isset($_REQUEST['dir']) ? '&dir=' . $_REQUEST['dir'] : '&dir=DESC'; |
|
136 | - $sb = isset($_REQUEST['sort']) ? '&sort=' . $_REQUEST['sort'] : '&sort=createdon'; |
|
137 | - $pg = isset($_REQUEST['page']) ? '&page=' . (int) $_REQUEST['page'] : ''; |
|
138 | - $add_path = $sd . $sb . $pg; |
|
135 | + $sd = isset($_REQUEST['dir']) ? '&dir='.$_REQUEST['dir'] : '&dir=DESC'; |
|
136 | + $sb = isset($_REQUEST['sort']) ? '&sort='.$_REQUEST['sort'] : '&sort=createdon'; |
|
137 | + $pg = isset($_REQUEST['page']) ? '&page='.(int) $_REQUEST['page'] : ''; |
|
138 | + $add_path = $sd.$sb.$pg; |
|
139 | 139 | |
140 | 140 | $icons = array( |
141 | 141 | 'text/html' => $_style['tree_page_html'], |
@@ -153,9 +153,9 @@ discard block |
||
153 | 153 | ); |
154 | 154 | |
155 | 155 | $listDocs = array(); |
156 | - foreach($resource as $k => $children) { |
|
156 | + foreach ($resource as $k => $children) { |
|
157 | 157 | |
158 | - switch($children['id']) { |
|
158 | + switch ($children['id']) { |
|
159 | 159 | case $modx->config['site_start'] : |
160 | 160 | $icon = $_style['tree_page_home']; |
161 | 161 | break; |
@@ -169,10 +169,10 @@ discard block |
||
169 | 169 | $icon = $_style['tree_page_info']; |
170 | 170 | break; |
171 | 171 | default: |
172 | - if($children['isfolder']) { |
|
172 | + if ($children['isfolder']) { |
|
173 | 173 | $icon = $_style['tree_folder_new']; |
174 | 174 | } else { |
175 | - if(isset($icons[$children['contentType']])) { |
|
175 | + if (isset($icons[$children['contentType']])) { |
|
176 | 176 | $icon = $icons[$children['contentType']]; |
177 | 177 | } else { |
178 | 178 | $icon = $_style['tree_page']; |
@@ -187,32 +187,32 @@ discard block |
||
187 | 187 | $class = ($children['deleted'] ? 'text-danger text-decoration-through' : (!$children['published'] ? ' font-italic text-muted' : ' publish')); |
188 | 188 | //$class .= ($children['hidemenu'] ? ' text-muted' : ' text-primary'); |
189 | 189 | //$class .= ($children['isfolder'] ? ' font-weight-bold' : ''); |
190 | - if($modx->hasPermission('edit_document')) { |
|
191 | - $title = '<span class="doc-item' . $private . '">' . $icon . '<a href="index.php?a=27&id=' . $children['id'] . $add_path . '">' . '<span class="' . $class . '">' . $children['pagetitle'] . '</span></a></span>'; |
|
190 | + if ($modx->hasPermission('edit_document')) { |
|
191 | + $title = '<span class="doc-item'.$private.'">'.$icon.'<a href="index.php?a=27&id='.$children['id'].$add_path.'">'.'<span class="'.$class.'">'.$children['pagetitle'].'</span></a></span>'; |
|
192 | 192 | } else { |
193 | - $title = '<span class="doc-item' . $private . '">' . $icon . '<span class="' . $class . '">' . $children['pagetitle'] . '</span></span>'; |
|
193 | + $title = '<span class="doc-item'.$private.'">'.$icon.'<span class="'.$class.'">'.$children['pagetitle'].'</span></span>'; |
|
194 | 194 | } |
195 | 195 | |
196 | - $icon_pub_unpub = (!$children['published']) ? '<a href="index.php?a=61&id=' . $children['id'] . $add_path . '" title="' . $_lang["publish_resource"] . '"><i class="' . $_style["icons_publish_document"] . '"></i></a>' : '<a href="index.php?a=62&id=' . $children['id'] . $add_path . '" title="' . $_lang["unpublish_resource"] . '"><i class="' . $_style["icons_unpublish_resource"] . '" ></i></a>'; |
|
196 | + $icon_pub_unpub = (!$children['published']) ? '<a href="index.php?a=61&id='.$children['id'].$add_path.'" title="'.$_lang["publish_resource"].'"><i class="'.$_style["icons_publish_document"].'"></i></a>' : '<a href="index.php?a=62&id='.$children['id'].$add_path.'" title="'.$_lang["unpublish_resource"].'"><i class="'.$_style["icons_unpublish_resource"].'" ></i></a>'; |
|
197 | 197 | |
198 | - $icon_del_undel = (!$children['deleted']) ? '<a onclick="return confirm(\'' . $_lang["confirm_delete_resource"] . '\')" href="index.php?a=6&id=' . $children['id'] . $add_path . '" title="' . $_lang['delete_resource'] . '"><i class="' . $_style["icons_delete_resource"] . '"></i></a>' : '<a onclick="return confirm(\'' . $_lang["confirm_undelete"] . '\')" href="index.php?a=63&id=' . $children['id'] . $add_path . '" title="' . $_lang['undelete_resource'] . '"><i class="' . $_style["icons_undelete_resource"] . '"></i></a>'; |
|
198 | + $icon_del_undel = (!$children['deleted']) ? '<a onclick="return confirm(\''.$_lang["confirm_delete_resource"].'\')" href="index.php?a=6&id='.$children['id'].$add_path.'" title="'.$_lang['delete_resource'].'"><i class="'.$_style["icons_delete_resource"].'"></i></a>' : '<a onclick="return confirm(\''.$_lang["confirm_undelete"].'\')" href="index.php?a=63&id='.$children['id'].$add_path.'" title="'.$_lang['undelete_resource'].'"><i class="'.$_style["icons_undelete_resource"].'"></i></a>'; |
|
199 | 199 | |
200 | 200 | $listDocs[] = array( |
201 | - 'docid' => '<div class="text-right">' . $children['id'] . '</div>', |
|
201 | + 'docid' => '<div class="text-right">'.$children['id'].'</div>', |
|
202 | 202 | 'title' => $title, |
203 | - 'createdon' => '<div class="text-right">' . ($modx->toDateFormat($children['createdon'] + $server_offset_time, 'dateOnly')) . '</div>', |
|
204 | - 'pub_date' => '<div class="text-right">' . ($children['pub_date'] ? ($modx->toDateFormat($children['pub_date'] + $server_offset_time, 'dateOnly')) : '') . '</div>', |
|
205 | - 'status' => '<div class="text-nowrap">' . ($children['published'] == 0 ? '<span class="unpublishedDoc">' . $_lang['page_data_unpublished'] . '</span>' : '<span class="publishedDoc">' . $_lang['page_data_published'] . '</span>') . '</div>', |
|
206 | - 'edit' => '<div class="actions text-center text-nowrap">' . ($modx->hasPermission('edit_document') ? '<a href="index.php?a=27&id=' . $children['id'] . $add_path . '" title="' . $_lang['edit'] . '"><i class="' . $_style["icons_edit_resource"] . '"></i></a><a href="index.php?a=51&id=' . $children['id'] . $add_path . '" title="' . $_lang['move'] . '"><i |
|
207 | - class="' . $_style["icons_move_document"] . '"></i></a>' . $icon_pub_unpub : '') . ($modx->hasPermission('delete_document') ? $icon_del_undel : '') . '</div>' |
|
203 | + 'createdon' => '<div class="text-right">'.($modx->toDateFormat($children['createdon'] + $server_offset_time, 'dateOnly')).'</div>', |
|
204 | + 'pub_date' => '<div class="text-right">'.($children['pub_date'] ? ($modx->toDateFormat($children['pub_date'] + $server_offset_time, 'dateOnly')) : '').'</div>', |
|
205 | + 'status' => '<div class="text-nowrap">'.($children['published'] == 0 ? '<span class="unpublishedDoc">'.$_lang['page_data_unpublished'].'</span>' : '<span class="publishedDoc">'.$_lang['page_data_published'].'</span>').'</div>', |
|
206 | + 'edit' => '<div class="actions text-center text-nowrap">'.($modx->hasPermission('edit_document') ? '<a href="index.php?a=27&id='.$children['id'].$add_path.'" title="'.$_lang['edit'].'"><i class="'.$_style["icons_edit_resource"].'"></i></a><a href="index.php?a=51&id='.$children['id'].$add_path.'" title="'.$_lang['move'].'"><i |
|
207 | + class="' . $_style["icons_move_document"].'"></i></a>'.$icon_pub_unpub : '').($modx->hasPermission('delete_document') ? $icon_del_undel : '').'</div>' |
|
208 | 208 | ); |
209 | 209 | } |
210 | 210 | |
211 | - $modx->table->createPagingNavigation($numRecords, 'a=3&id=' . $content['id'] . '&dir=' . $dir . '&sort=' . $sort); |
|
212 | - $children_output = $modx->table->create($listDocs, $listTableHeader, 'index.php?a=3&id=' . $content['id']); |
|
211 | + $modx->table->createPagingNavigation($numRecords, 'a=3&id='.$content['id'].'&dir='.$dir.'&sort='.$sort); |
|
212 | + $children_output = $modx->table->create($listDocs, $listTableHeader, 'index.php?a=3&id='.$content['id']); |
|
213 | 213 | } else { |
214 | 214 | // No Child documents |
215 | - $children_output = '<div class="container"><p>' . $_lang['resources_in_container_no'] . '</p></div>'; |
|
215 | + $children_output = '<div class="container"><p>'.$_lang['resources_in_container_no'].'</p></div>'; |
|
216 | 216 | } |
217 | 217 | ?> |
218 | 218 | <script type="text/javascript"> |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | }, |
239 | 239 | cancel: function() { |
240 | 240 | documentDirty = false; |
241 | - document.location.href = 'index.php?<?=($id == 0 ? 'a=2' : 'a=3&r=1&id=' . $id . $add_path) ?>'; |
|
241 | + document.location.href = 'index.php?<?=($id == 0 ? 'a=2' : 'a=3&r=1&id='.$id.$add_path) ?>'; |
|
242 | 242 | }, |
243 | 243 | move: function() { |
244 | 244 | document.location.href = "index.php?id=<?= $_REQUEST['id'] ?>&a=51"; |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | } |
250 | 250 | }, |
251 | 251 | view: function() { |
252 | - window.open('<?= ($modx->config['friendly_urls'] == '1') ? $modx->makeUrl($id) : $modx->config['site_url'] . 'index.php?id=' . $id ?>', 'previeWin'); |
|
252 | + window.open('<?= ($modx->config['friendly_urls'] == '1') ? $modx->makeUrl($id) : $modx->config['site_url'].'index.php?id='.$id ?>', 'previeWin'); |
|
253 | 253 | } |
254 | 254 | }; |
255 | 255 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | <script type="text/javascript" src="media/script/tablesort.js"></script> |
258 | 258 | |
259 | 259 | <h1> |
260 | - <i class="fa fa-info"></i><?= iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']) . (iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '') . ' <small>(' . $_REQUEST['id'] . ')</small>' ?> |
|
260 | + <i class="fa fa-info"></i><?= iconv_substr($content['pagetitle'], 0, 50, $modx->config['modx_charset']).(iconv_strlen($content['pagetitle'], $modx->config['modx_charset']) > 50 ? '...' : '').' <small>('.$_REQUEST['id'].')</small>' ?> |
|
261 | 261 | </h1> |
262 | 262 | |
263 | 263 | <?= $_style['actionbuttons']['static']['document'] ?> |
@@ -284,16 +284,16 @@ discard block |
||
284 | 284 | <tr> |
285 | 285 | <td width="200" valign="top"><?= $_lang['long_title'] ?>:</td> |
286 | 286 | <td> |
287 | - <small><?= $content['longtitle'] != '' ? $content['longtitle'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></small> |
|
287 | + <small><?= $content['longtitle'] != '' ? $content['longtitle'] : "(<i>".$_lang['not_set']."</i>)" ?></small> |
|
288 | 288 | </td> |
289 | 289 | </tr> |
290 | 290 | <tr> |
291 | 291 | <td valign="top"><?= $_lang['resource_description'] ?>:</td> |
292 | - <td><?= $content['description'] != '' ? $content['description'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></td> |
|
292 | + <td><?= $content['description'] != '' ? $content['description'] : "(<i>".$_lang['not_set']."</i>)" ?></td> |
|
293 | 293 | </tr> |
294 | 294 | <tr> |
295 | 295 | <td valign="top"><?= $_lang['resource_summary'] ?>:</td> |
296 | - <td><?= $content['introtext'] != '' ? $content['introtext'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></td> |
|
296 | + <td><?= $content['introtext'] != '' ? $content['introtext'] : "(<i>".$_lang['not_set']."</i>)" ?></td> |
|
297 | 297 | </tr> |
298 | 298 | <tr> |
299 | 299 | <td valign="top"><?= $_lang['type'] ?>:</td> |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | </tr> |
302 | 302 | <tr> |
303 | 303 | <td valign="top"><?= $_lang['resource_alias'] ?>:</td> |
304 | - <td><?= $content['alias'] != '' ? $content['alias'] : "(<i>" . $_lang['not_set'] . "</i>)" ?></td> |
|
304 | + <td><?= $content['alias'] != '' ? $content['alias'] : "(<i>".$_lang['not_set']."</i>)" ?></td> |
|
305 | 305 | </tr> |
306 | 306 | <tr> |
307 | 307 | <td colspan="2"> </td> |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | <td><?= $modx->toDateFormat($content['createdon'] + $server_offset_time) ?> (<b><?= $createdbyname ?></b>) |
315 | 315 | </td> |
316 | 316 | </tr> |
317 | - <?php if($editedbyname != '') { ?> |
|
317 | + <?php if ($editedbyname != '') { ?> |
|
318 | 318 | <tr> |
319 | 319 | <td><?= $_lang['page_data_edited'] ?>:</td> |
320 | 320 | <td><?= $modx->toDateFormat($content['editedon'] + $server_offset_time) ?> (<b><?= $editedbyname ?></b>) |
@@ -329,15 +329,15 @@ discard block |
||
329 | 329 | </tr> |
330 | 330 | <tr> |
331 | 331 | <td><?= $_lang['page_data_status'] ?>:</td> |
332 | - <td><?= $content['published'] == 0 ? '<span class="unpublishedDoc">' . $_lang['page_data_unpublished'] . '</span>' : '<span class="publisheddoc">' . $_lang['page_data_published'] . '</span>' ?></td> |
|
332 | + <td><?= $content['published'] == 0 ? '<span class="unpublishedDoc">'.$_lang['page_data_unpublished'].'</span>' : '<span class="publisheddoc">'.$_lang['page_data_published'].'</span>' ?></td> |
|
333 | 333 | </tr> |
334 | 334 | <tr> |
335 | 335 | <td><?= $_lang['page_data_publishdate'] ?>:</td> |
336 | - <td><?= $content['pub_date'] == 0 ? "(<i>" . $_lang['not_set'] . "</i>)" : $modx->toDateFormat($content['pub_date']) ?></td> |
|
336 | + <td><?= $content['pub_date'] == 0 ? "(<i>".$_lang['not_set']."</i>)" : $modx->toDateFormat($content['pub_date']) ?></td> |
|
337 | 337 | </tr> |
338 | 338 | <tr> |
339 | 339 | <td><?= $_lang['page_data_unpublishdate'] ?>:</td> |
340 | - <td><?= $content['unpub_date'] == 0 ? "(<i>" . $_lang['not_set'] . "</i>)" : $modx->toDateFormat($content['unpub_date']) ?></td> |
|
340 | + <td><?= $content['unpub_date'] == 0 ? "(<i>".$_lang['not_set']."</i>)" : $modx->toDateFormat($content['unpub_date']) ?></td> |
|
341 | 341 | </tr> |
342 | 342 | <tr> |
343 | 343 | <td><?= $_lang['page_data_cacheable'] ?>:</td> |
@@ -357,11 +357,11 @@ discard block |
||
357 | 357 | </tr> |
358 | 358 | <tr> |
359 | 359 | <td><?= $_lang['page_data_web_access'] ?>:</td> |
360 | - <td><?= $content['privateweb'] == 0 ? $_lang['public'] : '<b style="color: #821517">' . $_lang['private'] . '</b> ' . $_style["icons_secured"] ?></td> |
|
360 | + <td><?= $content['privateweb'] == 0 ? $_lang['public'] : '<b style="color: #821517">'.$_lang['private'].'</b> '.$_style["icons_secured"] ?></td> |
|
361 | 361 | </tr> |
362 | 362 | <tr> |
363 | 363 | <td><?= $_lang['page_data_mgr_access'] ?>:</td> |
364 | - <td><?= $content['privatemgr'] == 0 ? $_lang['public'] : '<b style="color: #821517">' . $_lang['private'] . '</b> ' . $_style["icons_secured"] ?></td> |
|
364 | + <td><?= $content['privatemgr'] == 0 ? $_lang['public'] : '<b style="color: #821517">'.$_lang['private'].'</b> '.$_style["icons_secured"] ?></td> |
|
365 | 365 | </tr> |
366 | 366 | <tr> |
367 | 367 | <td colspan="2"> </td> |
@@ -391,13 +391,13 @@ discard block |
||
391 | 391 | <script type="text/javascript">docSettings.addTabPage(document.getElementById("tabChildren"));</script> |
392 | 392 | <div class="container container-body"> |
393 | 393 | <div class="form-group clearfix"> |
394 | - <?php if($numRecords > 0) : ?> |
|
394 | + <?php if ($numRecords > 0) : ?> |
|
395 | 395 | <div class="float-xs-left"> |
396 | - <span class="publishedDoc"><?= $numRecords . ' ' . $_lang['resources_in_container'] ?> (<strong><?= $content['pagetitle'] ?></strong>)</span> |
|
396 | + <span class="publishedDoc"><?= $numRecords.' '.$_lang['resources_in_container'] ?> (<strong><?= $content['pagetitle'] ?></strong>)</span> |
|
397 | 397 | </div> |
398 | 398 | <?php endif; ?> |
399 | 399 | <div class="float-xs-right"> |
400 | - <?= $filter_sort . ' ' . $filter_dir ?> |
|
400 | + <?= $filter_sort.' '.$filter_dir ?> |
|
401 | 401 | </div> |
402 | 402 | |
403 | 403 | </div> |
@@ -407,23 +407,23 @@ discard block |
||
407 | 407 | </div> |
408 | 408 | </div><!-- end tab-page --> |
409 | 409 | |
410 | - <?php if($modx->config['cache_type'] != 2) { ?> |
|
410 | + <?php if ($modx->config['cache_type'] != 2) { ?> |
|
411 | 411 | <!-- Page Source --> |
412 | 412 | <div class="tab-page" id="tabSource"> |
413 | 413 | <h2 class="tab"><?= $_lang['page_data_source'] ?></h2> |
414 | 414 | <script type="text/javascript">docSettings.addTabPage(document.getElementById("tabSource"));</script> |
415 | 415 | <?php |
416 | 416 | $buffer = ""; |
417 | - $filename = $modx->config['base_path'] . "assets/cache/docid_" . $id . ".pageCache.php"; |
|
417 | + $filename = $modx->config['base_path']."assets/cache/docid_".$id.".pageCache.php"; |
|
418 | 418 | $handle = @fopen($filename, "r"); |
419 | - if(!$handle) { |
|
420 | - $buffer = '<div class="container container-body">' . $_lang['page_data_notcached'] . '</div>'; |
|
419 | + if (!$handle) { |
|
420 | + $buffer = '<div class="container container-body">'.$_lang['page_data_notcached'].'</div>'; |
|
421 | 421 | } else { |
422 | - while(!feof($handle)) { |
|
422 | + while (!feof($handle)) { |
|
423 | 423 | $buffer .= fgets($handle, 4096); |
424 | 424 | } |
425 | 425 | fclose($handle); |
426 | - $buffer = '<div class="navbar navbar-editor">' . $_lang['page_data_cached'] . '</div><div class="section-editor clearfix"><textarea rows="20" wrap="soft">' . $modx->htmlspecialchars($buffer) . "</textarea></div>\n"; |
|
426 | + $buffer = '<div class="navbar navbar-editor">'.$_lang['page_data_cached'].'</div><div class="section-editor clearfix"><textarea rows="20" wrap="soft">'.$modx->htmlspecialchars($buffer)."</textarea></div>\n"; |
|
427 | 427 | } |
428 | 428 | echo $buffer; |
429 | 429 | ?> |
@@ -433,12 +433,12 @@ discard block |
||
433 | 433 | </div><!-- end documentPane --> |
434 | 434 | |
435 | 435 | <?php |
436 | -if(isset($_GET['tab']) && is_numeric($_GET['tab'])) { |
|
437 | - echo '<script type="text/javascript"> docSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
436 | +if (isset($_GET['tab']) && is_numeric($_GET['tab'])) { |
|
437 | + echo '<script type="text/javascript"> docSettings.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
438 | 438 | } |
439 | 439 | ?> |
440 | 440 | |
441 | -<?php if($show_preview == 1) { ?> |
|
441 | +<?php if ($show_preview == 1) { ?> |
|
442 | 442 | <div class="sectionHeader"><?= $_lang['preview'] ?></div> |
443 | 443 | <div class="sectionBody" id="lyr2"> |
444 | 444 | <iframe src="<?= MODX_SITE_URL ?>index.php?id=<?= $id ?>&z=manprev" frameborder="0" border="0" id="previewIframe"></iframe> |
@@ -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,16 +1,16 @@ 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 />Please use the EVO Content Manager instead of accessing this file directly."); |
4 | 4 | } |
5 | -if(!$modx->hasPermission('settings')) { |
|
5 | +if (!$modx->hasPermission('settings')) { |
|
6 | 6 | $modx->webAlertAndQuit($_lang['error_no_privileges']); |
7 | 7 | } |
8 | 8 | |
9 | -include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/functions.inc.php'); |
|
9 | +include_once(MODX_MANAGER_PATH.'actions/mutate_settings/functions.inc.php'); |
|
10 | 10 | |
11 | 11 | // check to see the edit settings page isn't locked |
12 | -$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=17 AND internalKey!='" . $modx->getLoginUserID() . "'"); |
|
13 | -if($username = $modx->db->getValue($rs)) { |
|
12 | +$rs = $modx->db->select('username', $modx->getFullTableName('active_users'), "action=17 AND internalKey!='".$modx->getLoginUserID()."'"); |
|
13 | +if ($username = $modx->db->getValue($rs)) { |
|
14 | 14 | $modx->webAlertAndQuit(sprintf($_lang['lock_settings_msg'], $username)); |
15 | 15 | } |
16 | 16 | // end check for lock |
@@ -18,21 +18,21 @@ discard block |
||
18 | 18 | // reload system settings from the database. |
19 | 19 | // this will prevent user-defined settings from being saved as system setting |
20 | 20 | $settings = array(); |
21 | -include_once(MODX_MANAGER_PATH . 'includes/default_config.php'); |
|
21 | +include_once(MODX_MANAGER_PATH.'includes/default_config.php'); |
|
22 | 22 | $rs = $modx->db->select('setting_name, setting_value', '[+prefix+]system_settings'); |
23 | -while($row = $modx->db->getRow($rs)) { |
|
23 | +while ($row = $modx->db->getRow($rs)) { |
|
24 | 24 | $settings[$row['setting_name']] = $row['setting_value']; |
25 | 25 | } |
26 | -$settings['filemanager_path'] = preg_replace('@^' . preg_quote(MODX_BASE_PATH) . '@', '[(base_path)]', $settings['filemanager_path']); |
|
27 | -$settings['rb_base_dir'] = preg_replace('@^' . preg_quote(MODX_BASE_PATH) . '@', '[(base_path)]', $settings['rb_base_dir']); |
|
26 | +$settings['filemanager_path'] = preg_replace('@^'.preg_quote(MODX_BASE_PATH).'@', '[(base_path)]', $settings['filemanager_path']); |
|
27 | +$settings['rb_base_dir'] = preg_replace('@^'.preg_quote(MODX_BASE_PATH).'@', '[(base_path)]', $settings['rb_base_dir']); |
|
28 | 28 | |
29 | 29 | extract($settings, EXTR_OVERWRITE); |
30 | 30 | |
31 | 31 | // load languages and keys |
32 | 32 | $lang_keys = array(); |
33 | 33 | $dir = dir('includes/lang'); |
34 | -while($file = $dir->read()) { |
|
35 | - if(strpos($file, '.inc.php') > 0) { |
|
34 | +while ($file = $dir->read()) { |
|
35 | + if (strpos($file, '.inc.php') > 0) { |
|
36 | 36 | $endpos = strpos($file, '.'); |
37 | 37 | $languagename = substr($file, 0, $endpos); |
38 | 38 | $lang_keys[$languagename] = get_lang_keys($file); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | <input type="hidden" name="site_id" value="<?php echo $site_id; ?>" /> |
70 | 70 | <input type="hidden" name="settings_version" value="<?php echo $modx->getVersionData('version'); ?>" /> |
71 | 71 | <!-- this field is used to check site settings have been entered/ updated after install or upgrade --> |
72 | - <?php if(!isset($settings_version) || $settings_version != $modx->getVersionData('version')) { ?> |
|
72 | + <?php if (!isset($settings_version) || $settings_version != $modx->getVersionData('version')) { ?> |
|
73 | 73 | <div class='sectionBody'><p class='element-edit-message-tab alert alert-warning'><?php echo $_lang['settings_after_install']; ?></p></div> |
74 | 74 | <?php } ?> |
75 | 75 | <div class="tab-pane" id="settingsPane"> |
@@ -78,13 +78,13 @@ discard block |
||
78 | 78 | </script> |
79 | 79 | |
80 | 80 | <?php |
81 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab1_site_settings.inc.php'); |
|
82 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab2_furl_settings.inc.php'); |
|
83 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab3_user_settings.inc.php'); |
|
84 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab4_manager_settings.inc.php'); |
|
85 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab5_security_settings.inc.php'); |
|
86 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab6_filemanager_settings.inc.php'); |
|
87 | - include_once(MODX_MANAGER_PATH . 'actions/mutate_settings/tab7_filebrowser_settings.inc.php'); |
|
81 | + include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab1_site_settings.inc.php'); |
|
82 | + include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab2_furl_settings.inc.php'); |
|
83 | + include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab3_user_settings.inc.php'); |
|
84 | + include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab4_manager_settings.inc.php'); |
|
85 | + include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab5_security_settings.inc.php'); |
|
86 | + include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab6_filemanager_settings.inc.php'); |
|
87 | + include_once(MODX_MANAGER_PATH.'actions/mutate_settings/tab7_filebrowser_settings.inc.php'); |
|
88 | 88 | ?> |
89 | 89 | </div> |
90 | 90 | </div> |
@@ -131,6 +131,6 @@ discard block |
||
131 | 131 | }); |
132 | 132 | </script> |
133 | 133 | <?php |
134 | -if(is_numeric($_GET['tab'])) { |
|
135 | - echo '<script type="text/javascript">tpSettings.setSelectedIndex( ' . $_GET['tab'] . ' );</script>'; |
|
134 | +if (is_numeric($_GET['tab'])) { |
|
135 | + echo '<script type="text/javascript">tpSettings.setSelectedIndex( '.$_GET['tab'].' );</script>'; |
|
136 | 136 | } |