PluginProbe
User Access Manager / 1.2.14
User Access Manager v1.2.14
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | tpl/adminGroup.php +234 -232 1.0 → 1.2.14 View file →
@@ -8,9 +8,9 @@
8 8 *
9 9 * @category UserAccessManager
10 10 * @package UserAccessManager
11 11 * @author Alexander Schneider <[email protected]>
12 - * @copyright 2008-2010 Alexander Schneider
12 + * @copyright 2008-2016 Alexander Schneider
13 13 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
14 14 * @version SVN: $Id$
15 15 * @link http://wordpress.org/extend/plugins/user-access-manager/
16 16 */
@@ -17,219 +17,219 @@
17 17
18 18 /**
19 19 * Inserts or update a user group.
20 20 *
21 - * @param integer $userGroupId The id of the user group.
22 - *
23 - * @return null
21 + * @param integer $iUserGroupId The _iId of the user group.
24 22 */
25 -function insertUpdateGroup($userGroupId)
23 +function insertUpdateGroup($iUserGroupId)
26 24 {
27 - global $userAccessManager;
25 + global $oUserAccessManager;
28 26
29 - if ($userGroupId != null) {
30 - $uamUserGroup
31 - = &$userAccessManager->getAccessHandler()->getUserGroups($userGroupId);
27 + if (empty($_POST) || !wp_verify_nonce($_POST['uamInsertUpdateGroupNonce'], 'uamInsertUpdateGroup')) {
28 + wp_die(TXT_UAM_NONCE_FAILURE);
29 + }
30 +
31 + if ($iUserGroupId != null) {
32 + $oUamUserGroup = $oUserAccessManager->getAccessHandler()->getUserGroups($iUserGroupId);
32 33 } else {
33 - $uamUserGroup
34 - = new UamUserGroup($userAccessManager->getAccessHandler(), null);
34 + $oUamUserGroup = new UamUserGroup($oUserAccessManager->getAccessHandler(), null);
35 35 }
36 36
37 - $uamUserGroup->setGroupName($_POST['userGroupName']);
38 - $uamUserGroup->setGroupDesc($_POST['userGroupDescription']);
39 - $uamUserGroup->setReadAccess($_POST['readAccess']);
40 - $uamUserGroup->setWriteAccess($_POST['writeAccess']);
41 - $uamUserGroup->setIpRange($_POST['ipRange']);
37 + $oUamUserGroup->setGroupName($_POST['userGroupName']);
38 + $oUamUserGroup->setGroupDesc($_POST['userGroupDescription']);
39 + $oUamUserGroup->setReadAccess($_POST['readAccess']);
40 + $oUamUserGroup->setWriteAccess($_POST['writeAccess']);
41 + $oUamUserGroup->setIpRange($_POST['ipRange']);
42 42
43 43 if (isset($_POST['roles'])) {
44 - $roles = $_POST['roles'];
44 + $aRoles = $_POST['roles'];
45 45 } else {
46 - $roles = null;
46 + $aRoles = null;
47 47 }
48 48
49 - $uamUserGroup->unsetRoles(true);
49 + $oUamUserGroup->unsetObjects(UserAccessManager::ROLE_OBJECT_TYPE, true);
50 50
51 - if ($roles) {
52 - foreach ($roles as $role) {
53 - $uamUserGroup->addRole($role);
51 + if ($aRoles && is_array($aRoles)) {
52 + foreach ($aRoles as $sRole) {
53 + $oUamUserGroup->addObject(UserAccessManager::ROLE_OBJECT_TYPE, htmlentities($sRole));
54 54 }
55 55 }
56 +
57 + $oUamUserGroup->save();
56 58
57 - $uamUserGroup->save();
58 -
59 - $userAccessManager->getAccessHandler()->addUserGroup($uamUserGroup);
59 + $oUserAccessManager->getAccessHandler()->addUserGroup($oUamUserGroup);
60 60 }
61 61
62 62 /**
63 - * Prints the group formular.
63 + * Prints the group form.
64 64 *
65 - * @param integer $groupId The given group id.
66 - *
67 - * @return null
65 + * @param integer $sGroupId The given group id.
68 66 */
69 -function getPrintEditGroup($groupId = null)
67 +function getPrintEditGroup($sGroupId = null)
70 68 {
71 - global $userAccessManager;
72 - $uamUserGroup = &$userAccessManager->getAccessHandler()->getUserGroups($groupId);
69 + global $oUserAccessManager;
70 + $oUamUserGroup = $oUserAccessManager->getAccessHandler()->getUserGroups($sGroupId);
73 71 ?>
74 - <form method="post" action="<?php
75 - echo reset(
76 - explode("?", $_SERVER["REQUEST_URI"])
77 - ) . "?page=" . $_GET['page'];
78 - ?>">
79 - <?php
80 - if (isset($groupId)) {
72 + <form method="post" action="<?php
73 + $aUri = explode("?", $_SERVER["REQUEST_URI"]);
74 + $sUri = reset($aUri);
75 + echo htmlspecialchars($sUri) . "?page=" . $_GET['page'];
76 + ?>">
77 + <?php
78 + wp_nonce_field('uamInsertUpdateGroup', 'uamInsertUpdateGroupNonce');
79 +
80 + if (isset($sGroupId)) {
81 81 ?>
82 - <input type="hidden" value="updateGroup" name="action" />
83 - <input type="hidden" value="<?php echo $groupId; ?>" name="userGroupId" />
84 - <?php
82 + <input type="hidden" value="updateGroup" name="action" />
83 + <input type="hidden" value="<?php echo $sGroupId; ?>" name="userGroupId" />
84 + <?php
85 85 } else {
86 86 ?>
87 - <input type="hidden" value="addGroup" name="action" />
87 + <input type="hidden" value="addGroup" name="action" />
88 88 <?php
89 89 }
90 90 ?>
91 - <table class="form-table">
92 - <tbody>
93 - <tr class="form-field form-required">
94 - <th valign="top" scope="row"><?php echo TXT_GROUP_NAME; ?></th>
95 - <td>
96 - <input type="text" size="40" value="<?php
97 - if (isset($groupId)) {
98 - echo $uamUserGroup->getGroupName();
91 + <table class="form-table">
92 + <tbody>
93 + <tr class="form-field form-required">
94 + <th valign="top" scope="row"><?php echo TXT_UAM_GROUP_NAME; ?></th>
95 + <td>
96 + <input type="text" size="40" value="<?php
97 + if (isset($sGroupId)) {
98 + echo htmlentities($oUamUserGroup->getGroupName());
99 99 }
100 100 ?>" id="userGroupName" name="userGroupName" /><br />
101 - <?php echo TXT_GROUP_NAME_DESC; ?>
102 - </td>
103 - </tr>
104 - <tr class="form-field form-required">
105 - <th valign="top" scope="row"><?php echo TXT_GROUP_DESC; ?></th>
106 - <td>
107 - <input type="text" size="40" value="<?php
108 - if (isset($groupId)) {
109 - echo $uamUserGroup->getGroupDesc();
101 + <?php echo TXT_UAM_GROUP_NAME_DESC; ?>
102 + </td>
103 + </tr>
104 + <tr class="form-field form-required">
105 + <th valign="top" scope="row"><?php echo TXT_UAM_GROUP_DESC; ?></th>
106 + <td>
107 + <input type="text" size="40" value="<?php
108 + if (isset($sGroupId)) {
109 + echo htmlentities($oUamUserGroup->getGroupDesc());
110 110 }
111 111 ?>" id="userGroupDescription" name="userGroupDescription" /><br />
112 - <?php echo TXT_GROUP_DESC_DESC; ?>
113 - </td>
114 - </tr>
115 - <tr class="form-field form-required">
116 - <th valign="top" scope="row"><?php echo TXT_GROUP_IP_RANGE; ?></th>
117 - <td><input type="text" size="40" value="<?php
118 - if (isset($groupId)) {
119 - echo $uamUserGroup->getIpRange('string');
112 + <?php echo TXT_UAM_GROUP_DESC_DESC; ?>
113 + </td>
114 + </tr>
115 + <tr class="form-field form-required">
116 + <th valign="top" scope="row"><?php echo TXT_UAM_GROUP_IP_RANGE; ?></th>
117 + <td><input type="text" size="40" value="<?php
118 + if (isset($sGroupId)) {
119 + echo htmlentities($oUamUserGroup->getIpRange('string'));
120 120 }
121 121 ?>" id="ipRange" name="ipRange" /><br />
122 - <?php echo TXT_GROUP_IP_RANGE_DESC; ?>
123 - </td>
122 + <?php echo TXT_UAM_GROUP_IP_RANGE_DESC; ?>
123 + </td>
124 124 </tr>
125 125 <tr class="form-field form-required">
126 - <th valign="top" scope="row"><?php echo TXT_GROUP_READ_ACCESS; ?></th>
127 - <td>
128 - <select name="readAccess">
129 - <option value="group"
130 - <?php
131 - if (isset($groupId)) {
132 - if ($uamUserGroup->getReadAccess() == "group") {
126 + <th valign="top" scope="row"><?php echo TXT_UAM_GROUP_READ_ACCESS; ?></th>
127 + <td>
128 + <select name="readAccess">
129 + <option value="group"
130 + <?php
131 + if (isset($sGroupId)) {
132 + if ($oUamUserGroup->getReadAccess() == "group") {
133 133 echo 'selected="selected"';
134 134 }
135 135 }
136 136 ?>
137 - >
138 - <?php echo TXT_ONLY_GROUP_USERS ?>
139 - </option>
140 - <option value="all"
141 - <?php
142 - if (isset($groupId)) {
143 - if ($uamUserGroup->getReadAccess() == "all") {
137 + >
138 + <?php echo TXT_UAM_ONLY_GROUP_USERS ?>
139 + </option>
140 + <option value="all"
141 + <?php
142 + if (isset($sGroupId)) {
143 + if ($oUamUserGroup->getReadAccess() == "all") {
144 144 echo 'selected="selected"';
145 145 }
146 146 }
147 147 ?>
148 - >
149 - <?php echo TXT_ALL ?>
150 - </option>
151 - </select><br />
152 - <?php echo TXT_GROUP_READ_ACCESS_DESC; ?>
153 - </td>
154 - </tr>
155 - <tr class="form-field form-required">
156 - <th valign="top" scope="row"><?php echo TXT_GROUP_WRITE_ACCESS; ?></th>
157 - <td>
158 - <select name="writeAccess">
159 - <option value="group"
160 - <?php
161 - if (isset($groupId)) {
162 - if ($uamUserGroup->getWriteAccess() == "group") {
148 + >
149 + <?php echo TXT_UAM_ALL ?>
150 + </option>
151 + </select><br />
152 + <?php echo TXT_UAM_GROUP_READ_ACCESS_DESC; ?>
153 + </td>
154 + </tr>
155 + <tr class="form-field form-required">
156 + <th valign="top" scope="row"><?php echo TXT_UAM_GROUP_WRITE_ACCESS; ?></th>
157 + <td>
158 + <select name="writeAccess">
159 + <option value="group"
160 + <?php
161 + if (isset($sGroupId)) {
162 + if ($oUamUserGroup->getWriteAccess() == "group") {
163 163 echo 'selected="selected"';
164 164 }
165 165 }
166 166 ?>
167 - >
168 - <?php echo TXT_ONLY_GROUP_USERS ?>
169 - </option>
170 - <option value="all"
171 - <?php
172 - if (isset($groupId)) {
173 - if ($uamUserGroup->getWriteAccess() == "all") {
167 + >
168 + <?php echo TXT_UAM_ONLY_GROUP_USERS ?>
169 + </option>
170 + <option value="all"
171 + <?php
172 + if (isset($sGroupId)) {
173 + if ($oUamUserGroup->getWriteAccess() == "all") {
174 174 echo 'selected="selected"';
175 175 }
176 176 }
177 177 ?>
178 - >
179 - <?php echo TXT_ALL ?>
180 - </option>
181 - </select><br />
182 - <?php echo TXT_GROUP_WRITE_ACCESS_DESC; ?>
183 - </td>
184 - </tr>
185 - <tr>
186 - <th valign="top" scope="row"><?php echo TXT_GROUP_ROLE; ?></th>
187 - <td>
188 - <ul class='uam_role'>
189 - <?php
178 + >
179 + <?php echo TXT_UAM_ALL ?>
180 + </option>
181 + </select><br />
182 + <?php echo TXT_UAM_GROUP_WRITE_ACCESS_DESC; ?>
183 + </td>
184 + </tr>
185 + <tr>
186 + <th valign="top" scope="row"><?php echo TXT_UAM_GROUP_ROLE; ?></th>
187 + <td>
188 + <ul class='uam_role'>
189 + <?php
190 190 global $wp_roles;
191 191
192 - if (isset($groupId)) {
193 - $groupRoles = $uamUserGroup->getRoles();
192 + if (isset($sGroupId)) {
193 + $aGroupRoles = $oUamUserGroup->getObjectsFromType(UserAccessManager::ROLE_OBJECT_TYPE);
194 194 }
195 195
196 196 foreach ($wp_roles->role_names as $role => $name) {
197 - if ($role != "administrator") {
197 + if ($role != 'administrator') {
198 198 ?>
199 - <li class="selectit">
200 - <input id="role-<?php echo $role; ?>" type="checkbox"
201 - <?php
202 -
203 - if (isset($groupRoles[$role])) {
199 + <li class="selectit">
200 + <input id="role-<?php echo $role; ?>" type="checkbox"
201 + <?php
202 +
203 + if (isset($aGroupRoles[$role])) {
204 204 echo 'checked="checked"';
205 205 }
206 206 ?>
207 -
208 - value="<?php echo $role; ?> " name="roles[]" />
209 - <label for="role-<?php echo $role; ?>">
210 - <?php echo $role; ?>
211 - </label>
212 - </li>
213 - <?php
207 +
208 + value="<?php echo $role; ?> " name="roles[]" />
209 + <label for="role-<?php echo $role; ?>">
210 + <?php echo $role; ?>
211 + </label>
212 + </li>
213 + <?php
214 214 }
215 215 }
216 216 ?>
217 - </ul>
218 - </td>
219 - </tr>
220 - </tbody>
221 - </table>
222 - <p class="submit">
223 - <input type="submit" value="<?php
224 - if (isset($groupId)) {
225 - echo TXT_UPDATE_GROUP;
217 + </ul>
218 + </td>
219 + </tr>
220 + </tbody>
221 + </table>
222 + <p class="submit">
223 + <input type="submit" value="<?php
224 + if (isset($sGroupId)) {
225 + echo TXT_UAM_UPDATE_GROUP;
226 226 } else {
227 - echo TXT_ADD_GROUP;
227 + echo TXT_UAM_ADD_GROUP;
228 228 }
229 229 ?>" name="submit" class="button" />
230 - </p>
231 - </form>
230 + </p>
231 + </form>
232 232 <?php
233 233 }
234 234
235 235 if (isset($_GET['action'])) {
@@ -250,20 +250,23 @@
250 250 $postAction = null;
251 251 }
252 252
253 253 if ($postAction == 'delgroup') {
254 - if (isset($_POST['delete'])) {
255 - $delIds = $_POST['delete'];
254 + if (empty($_POST)
255 + || !wp_verify_nonce($_POST['uamDeleteGroupNonce'], 'uamDeleteGroup')
256 + ) {
257 + wp_die(TXT_UAM_NONCE_FAILURE);
256 258 }
257 - if (isset($delIds)) {
258 - global $userAccessManager;
259 +
260 + if (isset($_POST['delete']) && is_array($_POST['delete'])) {
261 + global $oUserAccessManager;
259 262
260 - foreach ($delIds as $delId) {
261 - $userAccessManager->getAccessHandler()->deleteUserGroup($delId);
263 + foreach ($_POST['delete'] as $delId) {
264 + $oUserAccessManager->getAccessHandler()->deleteUserGroup($delId);
262 265 }
263 266 ?>
264 267 <div class="updated">
265 - <p><strong><?php echo TXT_DEL_GROUP; ?></strong></p>
268 + <p><strong><?php echo TXT_UAM_DEL_GROUP; ?></strong></p>
266 269 </div>
267 270 <?php
268 271 }
269 272 }
@@ -279,15 +282,15 @@
279 282
280 283 if ($postAction == 'addGroup') {
281 284 ?>
282 285 <div class="updated">
283 - <p><strong><?php echo TXT_GROUP_ADDED; ?></strong></p>
286 + <p><strong><?php echo TXT_UAM_GROUP_ADDED; ?></strong></p>
284 287 </div>
285 288 <?php
286 289 } elseif ($postAction == 'updateGroup') {
287 290 ?>
288 291 <div class="updated">
289 - <p><strong><?php echo TXT_ACCESS_GROUP_EDIT_SUC; ?></strong></p>
292 + <p><strong><?php echo TXT_UAM_ACCESS_GROUP_EDIT_SUC; ?></strong></p>
290 293 </div>
291 294 <?php
292 295 }
293 296 } elseif (($postAction == 'updateGroup' || $postAction == 'addGroup')
@@ -293,9 +296,9 @@
293 296 } elseif (($postAction == 'updateGroup' || $postAction == 'addGroup')
294 297 && empty($_POST['userGroupName'])) {
295 298 ?>
296 299 <div class="error">
297 - <p><strong><?php echo TXT_GROUP_NAME_ERROR; ?></strong></p>
300 + <p><strong><?php echo TXT_UAM_GROUP_NAME_ERROR; ?></strong></p>
298 301 </div>
299 302 <?php
300 303 }
301 304
@@ -301,127 +304,126 @@
301 304
302 305 if (!$editGroup) {
303 306 ?>
304 307 <div class="wrap">
305 - <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
306 - <input type="hidden" value="delgroup" name="action" />
307 - <h2><?php echo TXT_MANAGE_GROUP; ?></h2>
308 + <form method="post" action="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>">
309 + <?php wp_nonce_field('uamDeleteGroup', 'uamDeleteGroupNonce'); ?>
310 + <input type="hidden" value="delgroup" name="action" />
311 + <h2><?php echo TXT_UAM_MANAGE_GROUP; ?></h2>
308 312 <div class="tablenav">
309 313 <div class="alignleft">
310 - <input type="submit" class="button-secondary delete" name="deleteit" value="<?php echo TXT_DELETE; ?>" />
314 + <input type="submit" class="button-secondary delete" name="deleteit" value="<?php echo TXT_UAM_DELETE; ?>" />
311 315 </div>
312 - <br class="clear" />
316 + <br class="clear" />
313 317 </div>
314 318 <br class="clear" />
315 319 <table class="widefat">
316 - <thead>
317 - <tr class="thead">
318 - <th scope="col"></th>
319 - <th scope="col"><?php echo TXT_NAME; ?></th>
320 - <th scope="col"><?php echo TXT_DESCRIPTION; ?></th>
321 - <th scope="col"><?php echo TXT_READ_ACCESS; ?></th>
322 - <th scope="col"><?php echo TXT_WRITE_ACCESS; ?></th>
323 - <th scope="col"><?php echo TXT_GROUP_ROLE; ?></th>
324 - <th scope="col"><?php echo TXT_IP_RANGE; ?></th>
325 - </tr>
326 - </thead>
327 - <tbody>
320 + <thead>
321 + <tr class="thead">
322 + <th scope="col"></th>
323 + <th scope="col"><?php echo TXT_UAM_NAME; ?></th>
324 + <th scope="col"><?php echo TXT_UAM_DESCRIPTION; ?></th>
325 + <th scope="col"><?php echo TXT_UAM_READ_ACCESS; ?></th>
326 + <th scope="col"><?php echo TXT_UAM_WRITE_ACCESS; ?></th>
327 + <th scope="col"><?php echo TXT_UAM_GROUP_ROLE; ?></th>
328 + <th scope="col"><?php echo TXT_UAM_IP_RANGE; ?></th>
329 + </tr>
330 + </thead>
331 + <tbody>
328 332 <?php
329 - if (isset($_GET['page'])) {
330 - $curAdminPage = $_GET['page'];
331 - }
333 + $sCurAdminPage = isset($_GET['page']) ? $_GET['page'] : '';
332 334
333 - global $userAccessManager;
334 - $uamUserGroups = &$userAccessManager->getAccessHandler()->getUserGroups();
335 + global $oUserAccessManager;
336 + $aUamUserGroups = $oUserAccessManager->getAccessHandler()->getUserGroups();
335 337
336 - if (isset($uamUserGroups)) {
337 - foreach ($uamUserGroups as $uamUserGroup) {
338 + if (isset($aUamUserGroups)) {
339 + foreach ($aUamUserGroups as $oUamUserGroup) {
338 340 ?>
339 - <tr class="alternate" id="group-<?php echo $uamUserGroup->getId(); ?>">
340 - <th class="check-column" scope="row">
341 - <input type="checkbox" value="<?php echo $uamUserGroup->getId(); ?>" name="delete[]" />
342 - </th>
343 - <td>
344 - <strong>
345 - <a href="?page=<?php echo $curAdminPage; ?>&amp;action=editGroup&amp;id=<?php echo $uamUserGroup->getId(); ?>">
346 - <?php echo $uamUserGroup->getGroupName(); ?>
347 - </a>
348 - </strong>
349 - </td>
350 - <td><?php echo $uamUserGroup->getGroupDesc() ?></td>
351 - <td>
341 + <tr class="alternate" id="group-<?php echo $oUamUserGroup->getId(); ?>">
342 + <th class="check-column" scope="row">
343 + <input type="checkbox" value="<?php echo $oUamUserGroup->getId(); ?>" name="delete[]" />
344 + </th>
345 + <td>
346 + <strong>
347 + <a href="?page=<?php echo $sCurAdminPage; ?>&amp;action=editGroup&amp;id=<?php echo $oUamUserGroup->getId(); ?>">
348 + <?php echo htmlentities($oUamUserGroup->getGroupName()); ?>
349 + </a>
350 + </strong>
351 + </td>
352 + <td><?php echo htmlentities($oUamUserGroup->getGroupDesc()) ?></td>
353 + <td>
352 354 <?php
353 - if ($uamUserGroup->getReadAccess() == "all") {
354 - echo TXT_ALL;
355 - } elseif ($uamUserGroup->getReadAccess() == "group") {
356 - echo TXT_ONLY_GROUP_USERS;
355 + if ($oUamUserGroup->getReadAccess() == "all") {
356 + echo TXT_UAM_ALL;
357 + } elseif ($oUamUserGroup->getReadAccess() == "group") {
358 + echo TXT_UAM_ONLY_GROUP_USERS;
357 359 }
358 360 ?>
359 361 </td>
360 - <td>
361 - <?php
362 - if ($uamUserGroup->getWriteAccess() == "all") {
363 - echo TXT_ALL;
364 - } elseif ($uamUserGroup->getWriteAccess() == "group") {
365 - echo TXT_ONLY_GROUP_USERS;
362 + <td>
363 + <?php
364 + if ($oUamUserGroup->getWriteAccess() == "all") {
365 + echo TXT_UAM_ALL;
366 + } elseif ($oUamUserGroup->getWriteAccess() == "group") {
367 + echo TXT_UAM_ONLY_GROUP_USERS;
366 368 }
367 369 ?>
368 - </td>
369 - <td>
370 - <?php
371 - if ($uamUserGroup->getRoles()) {
370 + </td>
371 + <td>
372 + <?php
373 + if ($oUamUserGroup->getObjectsFromType(UserAccessManager::ROLE_OBJECT_TYPE)) {
372 374 ?>
373 - <ul>
375 + <ul>
374 376 <?php
375 - foreach ($uamUserGroup->getRoles() as $role) {
377 + foreach ($oUamUserGroup->getObjectsFromType(UserAccessManager::ROLE_OBJECT_TYPE) as $sKey => $sRole) {
376 378 ?>
377 - <li>
379 + <li>
378 380 <?php
379 - echo $role['role_name'];
381 + echo $sKey;
380 382 ?>
381 - </li>
383 + </li>
382 384 <?php
383 385 }
384 386 ?>
385 - </ul>
387 + </ul>
386 388 <?php
387 389 } else {
388 - echo TXT_NONE;
390 + echo TXT_UAM_NONE;
389 391 }
390 392 ?>
391 - </td>
392 - <td>
393 - <?php
394 - if ($uamUserGroup->getIpRange()) {
393 + </td>
394 + <td>
395 + <?php
396 + if ($oUamUserGroup->getIpRange()) {
395 397 ?>
396 - <ul>
398 + <ul>
397 399 <?php
398 - foreach ($uamUserGroup->getIpRange() as $ipRange) {
400 + foreach ($oUamUserGroup->getIpRange() as $sIpRange) {
399 401 ?>
400 - <li>
402 + <li>
401 403 <?php
402 - echo $ipRange;
404 + echo htmlentities($sIpRange);
403 405 ?>
404 - </li>
406 + </li>
405 407 <?php
406 408 }
407 409 ?>
408 - </ul>
410 + </ul>
409 411 <?php
410 412 } else {
411 - echo TXT_NONE;
413 + echo TXT_UAM_NONE;
412 414 }
413 415 ?>
414 - </td>
415 - </tr>
416 - <?php
416 + </td>
417 + </tr>
418 + <?php
417 419 }
418 420 }
419 421 ?>
420 - </tbody>
422 + </tbody>
421 423 </table>
422 424 </form>
423 - </div>
425 + </div>
424 426 <?php
425 427 }
426 428 ?>
427 429 <div class="wrap">
@@ -429,14 +431,14 @@
429 431 <?php
430 432
431 433
432 434 if ($editGroup) {
433 - echo TXT_EDIT_GROUP;
435 + echo TXT_UAM_EDIT_GROUP;
434 436 } else {
435 - echo TXT_ADD_GROUP;
437 + echo TXT_UAM_ADD_GROUP;
436 438 }
437 439 ?>
438 - </h2>
440 + </h2>
439 441 <?php
440 442 if ($editGroup) {
441 443 $groupId = $_GET['id'];
442 444 getPrintEditGroup($groupId);