@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <!-- Template variables --> |
| 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,6 +1,6 @@ |
||
| 1 | 1 | <!-- chunks --> |
| 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,5 +1,5 @@ |
||
| 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 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <!-- snippets --> |
| 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,6 +1,6 @@ |
||
| 1 | 1 | <!-- Templates --> |
| 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,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,32 +1,32 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 4 | 4 | } |
| 5 | 5 | if(!$modx->hasPermission('web_access_permissions')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 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 | 11 | if($modx->db->getRecordCount($rs) < 1) { |
| 12 | - $docgroupselector = "[no groups to add]"; |
|
| 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"; |
|
| 17 | - } |
|
| 18 | - $docgroupselector .= "</select>\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 | + } |
|
| 18 | + $docgroupselector .= "</select>\n"; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | $rs = $modx->db->select('*', $modx->getFullTableName('webgroup_names'), '', 'name'); |
| 22 | 22 | if($modx->db->getRecordCount($rs) < 1) { |
| 23 | - $usrgroupselector = '[no user groups]'; |
|
| 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"; |
|
| 28 | - } |
|
| 29 | - $usrgroupselector .= "</select>\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 | + } |
|
| 29 | + $usrgroupselector .= "</select>\n"; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | ?> |
@@ -88,24 +88,24 @@ 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 |
|
| 91 | + $rs = $modx->db->select('groupnames.*, users.id AS user_id, users.username user_name ', $modx->getFullTableName('webgroup_names') . " AS groupnames |
|
| 92 | 92 | LEFT JOIN " . $modx->getFullTableName('web_groups') . " AS groups ON groups.webgroup = groupnames.id |
| 93 | 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 | - ?> |
|
| 94 | + if($modx->db->getRecordCount($rs) < 1) { |
|
| 95 | + ?> |
|
| 96 | 96 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
| 97 | 97 | <?php |
| 98 | - } else { |
|
| 99 | - ?> |
|
| 98 | + } else { |
|
| 99 | + ?> |
|
| 100 | 100 | <div class="form-group"> |
| 101 | 101 | <?php |
| 102 | - $pid = ''; |
|
| 103 | - while($row = $modx->db->getRow($rs)) { |
|
| 104 | - if($pid != $row['id']) { |
|
| 105 | - if($pid != '') { |
|
| 106 | - echo '</div><div class="form-group">'; |
|
| 107 | - } |
|
| 108 | - ?> |
|
| 102 | + $pid = ''; |
|
| 103 | + while($row = $modx->db->getRow($rs)) { |
|
| 104 | + if($pid != $row['id']) { |
|
| 105 | + if($pid != '') { |
|
| 106 | + echo '</div><div class="form-group">'; |
|
| 107 | + } |
|
| 108 | + ?> |
|
| 109 | 109 | <form method="post" action="index.php" name="accesspermissions"> |
| 110 | 110 | <input type="hidden" name="a" value="92" /> |
| 111 | 111 | <input type="hidden" name="groupid" value="<?= $row['id'] ?>" /> |
@@ -120,21 +120,21 @@ discard block |
||
| 120 | 120 | </form> |
| 121 | 121 | <?= $_lang['web_access_permissions_users_in_group'] ?> |
| 122 | 122 | <?php |
| 123 | - } |
|
| 124 | - if(!$row['user_id']) { |
|
| 125 | - ?> |
|
| 123 | + } |
|
| 124 | + if(!$row['user_id']) { |
|
| 125 | + ?> |
|
| 126 | 126 | <i><?= $_lang['access_permissions_no_users_in_group'] ?></i> |
| 127 | 127 | <?php |
| 128 | - $pid = $row['id']; |
|
| 129 | - continue; |
|
| 130 | - } |
|
| 131 | - ?> |
|
| 128 | + $pid = $row['id']; |
|
| 129 | + continue; |
|
| 130 | + } |
|
| 131 | + ?> |
|
| 132 | 132 | <?= ($pid == $row['id'] ? ', ' : '') ?><a href="index.php?a=88&id=<?= $row['user_id'] ?>"><?= $row['user_name'] ?></a> |
| 133 | 133 | <?php |
| 134 | - $pid = $row['id']; |
|
| 135 | - } |
|
| 136 | - } |
|
| 137 | - ?> |
|
| 134 | + $pid = $row['id']; |
|
| 135 | + } |
|
| 136 | + } |
|
| 137 | + ?> |
|
| 138 | 138 | </div> |
| 139 | 139 | </div> |
| 140 | 140 | </div> |
@@ -159,24 +159,24 @@ 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 |
|
| 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 | 163 | LEFT JOIN " . $modx->getFullTableName('document_groups') . " AS dg ON dg.document_group = dgnames.id |
| 164 | 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 | - ?> |
|
| 165 | + if($modx->db->getRecordCount($rs) < 1) { |
|
| 166 | + ?> |
|
| 167 | 167 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
| 168 | 168 | <?php |
| 169 | - } else { |
|
| 170 | - ?> |
|
| 169 | + } else { |
|
| 170 | + ?> |
|
| 171 | 171 | <div class="form-group"> |
| 172 | 172 | <?php |
| 173 | - $pid = ''; |
|
| 174 | - while($row = $modx->db->getRow($rs)) { |
|
| 175 | - if($pid != $row['id']) { |
|
| 176 | - if($pid != '') { |
|
| 177 | - echo '</div><div class="form-group">'; |
|
| 178 | - } |
|
| 179 | - ?> |
|
| 173 | + $pid = ''; |
|
| 174 | + while($row = $modx->db->getRow($rs)) { |
|
| 175 | + if($pid != $row['id']) { |
|
| 176 | + if($pid != '') { |
|
| 177 | + echo '</div><div class="form-group">'; |
|
| 178 | + } |
|
| 179 | + ?> |
|
| 180 | 180 | <form method="post" action="index.php" name="accesspermissions"> |
| 181 | 181 | <input type="hidden" name="a" value="92" /> |
| 182 | 182 | <input type="hidden" name="groupid" value="<?= $row['id'] ?>" /> |
@@ -191,21 +191,21 @@ discard block |
||
| 191 | 191 | </form> |
| 192 | 192 | <?= $_lang['access_permissions_resources_in_group'] ?> |
| 193 | 193 | <?php |
| 194 | - } |
|
| 195 | - if(!$row['doc_id']) { |
|
| 196 | - ?> |
|
| 194 | + } |
|
| 195 | + if(!$row['doc_id']) { |
|
| 196 | + ?> |
|
| 197 | 197 | <i><?= $_lang['access_permissions_no_resources_in_group'] ?></i> |
| 198 | 198 | <?php |
| 199 | - $pid = $row['id']; |
|
| 200 | - continue; |
|
| 201 | - } |
|
| 202 | - ?> |
|
| 199 | + $pid = $row['id']; |
|
| 200 | + continue; |
|
| 201 | + } |
|
| 202 | + ?> |
|
| 203 | 203 | <?= ($pid == $row['id'] ? ', ' : '') ?><a href="index.php?a=3&id=<?= $row['doc_id'] ?>" title="<?= $modx->htmlspecialchars($row['doc_title']) ?>"><?= $row['doc_id'] ?></a> |
| 204 | 204 | <?php |
| 205 | - $pid = $row['id']; |
|
| 206 | - } |
|
| 207 | - } |
|
| 208 | - ?> |
|
| 205 | + $pid = $row['id']; |
|
| 206 | + } |
|
| 207 | + } |
|
| 208 | + ?> |
|
| 209 | 209 | </div> |
| 210 | 210 | </div> |
| 211 | 211 | </div> |
@@ -217,15 +217,15 @@ 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 |
|
| 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 | 221 | LEFT JOIN " . $modx->getFullTableName('webgroup_access') . " AS groupacc ON groupacc.webgroup = groupnames.id |
| 222 | 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 | - ?> |
|
| 223 | + if($modx->db->getRecordCount($rs) < 1) { |
|
| 224 | + ?> |
|
| 225 | 225 | <div class="text-danger"><?= $_lang['no_groups_found'] ?></div> |
| 226 | 226 | <?php |
| 227 | - } else { |
|
| 228 | - ?> |
|
| 227 | + } else { |
|
| 228 | + ?> |
|
| 229 | 229 | <div class="form-group"> |
| 230 | 230 | <b><?= $_lang["access_permissions_group_link"] ?></b> |
| 231 | 231 | <form method="post" action="index.php" name="accesspermissions"> |
@@ -241,38 +241,38 @@ discard block |
||
| 241 | 241 | <hr> |
| 242 | 242 | <ul> |
| 243 | 243 | <?php |
| 244 | - $pid = ''; |
|
| 245 | - while($row = $modx->db->getRow($rs)) { |
|
| 246 | - if($row['id'] != $pid) { |
|
| 247 | - if($pid != '') { |
|
| 248 | - echo '</ul></li>'; |
|
| 249 | - } // close previous one |
|
| 250 | - ?> |
|
| 244 | + $pid = ''; |
|
| 245 | + while($row = $modx->db->getRow($rs)) { |
|
| 246 | + if($row['id'] != $pid) { |
|
| 247 | + if($pid != '') { |
|
| 248 | + echo '</ul></li>'; |
|
| 249 | + } // close previous one |
|
| 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>'; |
|
| 255 | - $pid = ''; |
|
| 256 | - continue; |
|
| 257 | - } else { |
|
| 258 | - echo '<ul>'; |
|
| 259 | - } |
|
| 260 | - } |
|
| 261 | - if(!$row['dg_id']) { |
|
| 262 | - continue; |
|
| 263 | - } |
|
| 264 | - ?> |
|
| 253 | + if(!$row['dg_id']) { |
|
| 254 | + echo '<i>' . $_lang['no_groups_found'] . '</i></li>'; |
|
| 255 | + $pid = ''; |
|
| 256 | + continue; |
|
| 257 | + } else { |
|
| 258 | + echo '<ul>'; |
|
| 259 | + } |
|
| 260 | + } |
|
| 261 | + if(!$row['dg_id']) { |
|
| 262 | + continue; |
|
| 263 | + } |
|
| 264 | + ?> |
|
| 265 | 265 | <li><?= $row['dg_name'] ?> |
| 266 | 266 | <small><i>(<a class="text-danger" href="index.php?a=92&coupling=<?= $row['link_id'] ?>&operation=remove_document_group_from_user_group"><?= $_lang['remove'] ?></a>)</i></small> |
| 267 | 267 | </li> |
| 268 | 268 | <?php |
| 269 | - $pid = $row['id']; |
|
| 270 | - } |
|
| 271 | - ?> |
|
| 269 | + $pid = $row['id']; |
|
| 270 | + } |
|
| 271 | + ?> |
|
| 272 | 272 | </ul> |
| 273 | 273 | <?php |
| 274 | - } |
|
| 275 | - ?> |
|
| 274 | + } |
|
| 275 | + ?> |
|
| 276 | 276 | </div> |
| 277 | 277 | </div> |
| 278 | 278 | |
@@ -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,9 +1,9 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) { |
| 3 | - die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 3 | + die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly."); |
|
| 4 | 4 | } |
| 5 | 5 | if(!$modx->hasPermission('edit_user')) { |
| 6 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 6 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | 7 | } |
| 8 | 8 | |
| 9 | 9 | ?> |
@@ -18,14 +18,14 @@ discard block |
||
| 18 | 18 | <div class="form-group"><?= $_lang['role_management_msg'] ?> <a class="btn btn-secondary btn-sm" href="index.php?a=38"><i class="<?= $_style["actions_new"] ?> hide4desktop"></i> <?= $_lang['new_role'] ?></a></div> |
| 19 | 19 | <div class="form-group"> |
| 20 | 20 | <?php |
| 21 | - $rs = $modx->db->select('name, id, description', $modx->getFullTableName('user_roles'), '', 'name'); |
|
| 22 | - $limit = $modx->db->getRecordCount($rs); |
|
| 23 | - if($limit < 1) { |
|
| 24 | - ?> |
|
| 21 | + $rs = $modx->db->select('name, id, description', $modx->getFullTableName('user_roles'), '', 'name'); |
|
| 22 | + $limit = $modx->db->getRecordCount($rs); |
|
| 23 | + if($limit < 1) { |
|
| 24 | + ?> |
|
| 25 | 25 | <p><?= $_lang["no_records_found"] ?></p> |
| 26 | 26 | <?php |
| 27 | - } else { |
|
| 28 | - ?> |
|
| 27 | + } else { |
|
| 28 | + ?> |
|
| 29 | 29 | <div class="row"> |
| 30 | 30 | <div class="table-responsive"> |
| 31 | 31 | <table class="table data"> |
@@ -37,24 +37,24 @@ discard block |
||
| 37 | 37 | </thead> |
| 38 | 38 | <tbody> |
| 39 | 39 | <?php |
| 40 | - while($row = $modx->db->getRow($rs)) { |
|
| 41 | - if($row['id'] == 1) { |
|
| 42 | - ?> |
|
| 40 | + while($row = $modx->db->getRow($rs)) { |
|
| 41 | + if($row['id'] == 1) { |
|
| 42 | + ?> |
|
| 43 | 43 | <tr class="text-muted disabled"> |
| 44 | 44 | <td><b><?= $row['name'] ?></b></td> |
| 45 | 45 | <td><span><?= $_lang['administrator_role_message'] ?></span></td> |
| 46 | 46 | </tr> |
| 47 | 47 | <?php |
| 48 | - } else { |
|
| 49 | - ?> |
|
| 48 | + } else { |
|
| 49 | + ?> |
|
| 50 | 50 | <tr> |
| 51 | 51 | <td><a class="text-primary" href="index.php?id=<?= $row['id'] ?>&a=35"><?= $row['name'] ?></a></td> |
| 52 | 52 | <td><?= $row['description'] ?></td> |
| 53 | 53 | </tr> |
| 54 | 54 | <?php |
| 55 | - } |
|
| 56 | - } |
|
| 57 | - ?> |
|
| 55 | + } |
|
| 56 | + } |
|
| 57 | + ?> |
|
| 58 | 58 | </tbody> |
| 59 | 59 | </table> |
| 60 | 60 | </div> |
@@ -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> |
@@ -4,24 +4,24 @@ discard block |
||
| 4 | 4 | } |
| 5 | 5 | |
| 6 | 6 | if(!$modx->hasPermission('category_manager')) { |
| 7 | - $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 7 | + $modx->webAlertAndQuit($_lang["error_no_privileges"]); |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | $_module_params = array( |
| 11 | - 'module_version' => '1.0.0', |
|
| 12 | - 'module_params' => '', |
|
| 13 | - 'module_id' => $_GET['id'], |
|
| 14 | - 'package_name' => 'Module_Categories_Manager', |
|
| 15 | - 'native_language' => 'de', |
|
| 16 | - 'name' => 'Categories Manager', |
|
| 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, |
|
| 23 | - 'request_key' => 'module_categories_manager', |
|
| 24 | - 'messages' => array() |
|
| 11 | + 'module_version' => '1.0.0', |
|
| 12 | + 'module_params' => '', |
|
| 13 | + 'module_id' => $_GET['id'], |
|
| 14 | + 'package_name' => 'Module_Categories_Manager', |
|
| 15 | + 'native_language' => 'de', |
|
| 16 | + 'name' => 'Categories Manager', |
|
| 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, |
|
| 23 | + 'request_key' => 'module_categories_manager', |
|
| 24 | + 'messages' => array() |
|
| 25 | 25 | ); |
| 26 | 26 | |
| 27 | 27 | require_once $_module_params['inc_dir'] . 'Module_Categories_Manager.php'; |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | // assign module_params to internal params |
| 31 | 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 |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | |
| 39 | 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 | 45 | $cm->renderView('main', $categories ); |
@@ -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; |
@@ -28,16 +28,14 @@ |
||
| 28 | 28 | $cm = new Module_Categories_Manager(); |
| 29 | 29 | |
| 30 | 30 | // assign module_params to internal params |
| 31 | -foreach( $_module_params as $param => $value ) |
|
| 32 | -{ |
|
| 31 | +foreach( $_module_params as $param => $value ) { |
|
| 33 | 32 | $cm->set( $param, $value ); |
| 34 | 33 | } |
| 35 | 34 | |
| 36 | 35 | // catch the request actions |
| 37 | 36 | include_once $cm->get('inc_dir') . 'request_trigger.inc.php'; |
| 38 | 37 | |
| 39 | -if( !$categories = $cm->getCategories() ) |
|
| 40 | -{ |
|
| 38 | +if( !$categories = $cm->getCategories() ) { |
|
| 41 | 39 | setcookie('webfxtab_manage-categories-pane', 0 ); |
| 42 | 40 | $cm->addMessage( $cm->txt('Currently no categories available... JUST ADD A NEW ONE!'), 'global' ); |
| 43 | 41 | } |