PluginProbe
User Access Manager / 1.2
User Access Manager v1.2
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
user-access-manager / tpl / groupInfo.php

groupInfo.php in User Access Manager 1.2, at tpl/groupInfo.php

109 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * groupInfo.php
4 *
5 * Shows the group informations at the admim panel.
6 *
7 * PHP versions 5
8 *
9 * @category UserAccessManager
10 * @package UserAccessManager
11 * @author Alexander Schneider <alexanderschneider85@googlemail.com>
12 * @copyright 2008-2010 Alexander Schneider
13 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
14 * @version SVN: $Id$
15 * @link http://wordpress.org/extend/plugins/user-access-manager/
16 */
17
18 if (!function_exists('walkPath')) {
19 /**
20 * Retruns the html code for the recursive access.
21 *
22 * @param mixed $object The object.
23 * @param string $objectType The type of the object.
24 *
25 * @return string
26 */
27 function walkPath($object, $objectType)
28 {
29 $out = $object->name;
30
31 if (isset($object->recursiveMember[$objectType])) {
32 $out .= '<ul>';
33
34 foreach ($object->recursiveMember[$objectType] as $recursiveObject) {
35 $out .= '<li>';
36 $out .= walkPath($recursiveObject, $objectType);
37 $out .= '</li>';
38 }
39
40 $out .= '</ul>';
41 }
42
43 return $out;
44 }
45 }
46 ?>
47 <div class="tooltip">
48 <ul class="uam_group_info">
49 <?php
50 global $userAccessManager;
51
52 foreach ($userAccessManager->getAccessHandler()->getAllObjectTypes() as $curObjectType) {
53 if (isset($userGroupsForObject[$uamUserGroup->getId()]->setRecursive[$objectType][$objectId][$curObjectType])) {
54 ?>
55 <li class="uam_group_info_head">
56 <?php echo constant('TXT_UAM_GROUP_MEMBERSHIP_BY_'.strtoupper($curObjectType)); ?>:
57 <ul>
58 <?php
59 foreach ($userGroupsForObject[$uamUserGroup->getId()]->setRecursive[$objectType][$objectId][$curObjectType] as $object) {
60 ?>
61 <li class="recusiveTree"><?php echo walkPath($object, $curObjectType); ?></li>
62 <?php
63 }
64 ?>
65 </ul>
66 </li>
67 <?php
68 }
69 }
70 ?>
71 <li class="uam_group_info_head"><?php echo TXT_UAM_GROUP_INFO; ?>:
72 <ul>
73 <li><?php echo TXT_UAM_READ_ACCESS; ?>:
74 <?php
75 if ($uamUserGroup->getReadAccess() == "all") {
76 echo TXT_UAM_ALL;
77 } elseif ($uamUserGroup->getReadAccess() == "group") {
78 echo TXT_UAM_ONLY_GROUP_USERS;
79 }
80 ?>
81 </li>
82 <li><?php echo TXT_UAM_WRITE_ACCESS; ?>:
83 <?php
84 if ($uamUserGroup->getWriteAccess() == "all") {
85 echo TXT_UAM_ALL;
86 } elseif ($uamUserGroup->getWriteAccess() == "group") {
87 echo TXT_UAM_ONLY_GROUP_USERS;
88 }
89 ?>
90 </li>
91 <li>
92 <?php echo TXT_UAM_GROUP_ROLE; ?>: <?php
93 if ($uamUserGroup->getObjectsFromType('role')) {
94 $out = '';
95
96 foreach ($uamUserGroup->getObjectsFromType('role') as $key => $role) {
97 $out .= trim($key).', ';
98 }
99
100 echo rtrim($out, ', ');
101 } else {
102 echo TXT_UAM_NONE;
103 }
104 ?>
105 </li>
106 </ul>
107 </li>
108 </ul>
109 </div>