Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
smradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shail
smradius
Commits
4f4291ed
Commit
4f4291ed
authored
16 years ago
by
Robert Anderson
Browse files
Options
Downloads
Patches
Plain Diff
list user's groups
parent
9d3ca58c
Loading
Loading
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webui/user-groups.php
+27
-29
27 additions, 29 deletions
webui/user-groups.php
with
27 additions
and
29 deletions
webui/user-groups.php
+
27
−
29
View file @
4f4291ed
...
...
@@ -34,7 +34,7 @@ printHeader(array(
));
?>
<p
class=
"pageheader"
>
Attribute
List
</p>
<p
class=
"pageheader"
>
Groups
List
</p>
<form
id=
"main_form"
action=
"user-main.php"
method=
"post"
>
<div
class=
"textcenter"
>
...
...
@@ -45,21 +45,17 @@ printHeader(array(
var myobj = document.getElementById('main_form_action');
if (myobj.selectedIndex == 2) {
myform.action = 'attribute-add.php';
} else if (myobj.selectedIndex == 5) {
myform.action = 'attribute-change.php';
myform.action = 'user-group-add.php';
} else if (myobj.selectedIndex == 3) {
myform.action = '
attribute
-delete.php';
myform.action = '
user-groups
-delete.php';
}
myform.submit();
"
>
<option
selected=
"selected"
>
select action
</option>
<option
disabled=
"disabled"
>
- - - - - - - - - - -
</option>
<option
value=
"add"
>
Add Attribute
</option>
<option
value=
"delete"
>
Delete Attribute
</option>
<option
disabled=
"disabled"
>
- - - - - - - - - - -
</option>
<option
value=
"change"
>
Change Attribute
</option>
<option
value=
"add"
>
Assign Group
</option>
<option
value=
"delete"
>
Remove Group Assignment
</option>
</select>
</div>
...
...
@@ -69,42 +65,44 @@ printHeader(array(
<tr
class=
"resultstitle"
>
<td
class=
"textcenter"
>
ID
</td>
<td
class=
"textcenter"
>
Name
</td>
<td
class=
"textcenter"
>
Operator
</td>
<td
class=
"textcenter"
>
Value
</td>
<td
class=
"textcenter"
>
Priority
</td>
<td
class=
"textcenter"
>
Disabled
</td>
<td
class=
"textcenter"
>
Comment
</td>
</tr>
<?php
$_SESSION
[
'attr_user_id'
]
=
$_POST
[
'user_id'
]
;
if
(
isset
(
$_SESSION
[
'
attr
_user_id'
]
))
{
if
(
isset
(
$_POST
[
'user_id'
]
))
{
$_SESSION
[
'
groups
_user_id'
]
=
$_POST
[
'user_id'
];
$temp
=
$_SESSION
[
'attr_user_id'
];
$sql
=
"SELECT ID, Name, Operator, Value, Disabled FROM ${DB_TABLE_PREFIX}user_attributes WHERE UserID =
$temp
ORDER BY ID"
;
$sql
=
"SELECT GroupID FROM ${DB_TABLE_PREFIX}users_to_groups WHERE UserID = "
.
$_POST
[
'user_id'
];
$res
=
$db
->
query
(
$sql
);
while
(
$row
=
$res
->
fetchObject
())
{
$sql
=
"SELECT ID, Name, Priority, Disabled, Comment FROM ${DB_TABLE_PREFIX}groups WHERE ID = "
.
$row
->
groupid
;
$result
=
$db
->
query
(
$sql
);
while
(
$row
=
$result
->
fetchObject
())
{
?>
<tr
class=
"resultsitem"
>
<td><input
type=
"radio"
name=
"
attr
_id"
value=
"
<?php
echo
$row
->
id
?>
"
/>
<?php
echo
$row
->
id
?>
</td>
<td>
<?php
echo
$row
->
name
?>
</td>
<td>
<?php
echo
$row
->
operator
?>
</td>
<td
>
<?php
echo
$row
->
value
?>
</td>
<td
class=
"textcenter"
>
<?php
echo
$row
->
disabled
?
'yes'
:
'no'
?>
</td>
</tr>
<tr
class=
"resultsitem"
>
<td><input
type=
"radio"
name=
"
group
_id"
value=
"
<?php
echo
$row
->
id
?>
"
/>
<?php
echo
$row
->
id
?>
</td>
<td>
<?php
echo
$row
->
name
?>
</td>
<td>
<?php
echo
$row
->
priority
?>
</td>
<td
class=
"textcenter"
>
<?php
echo
$row
->
disabled
?
'yes'
:
'no'
?>
</td>
<td
>
<?php
echo
$row
->
comment
?>
</td>
</tr>
<?php
}
$result
->
closeCursor
();
}
$res
->
closeCursor
();
?>
</table>
</form>
<?php
$res
->
closeCursor
();
}
else
{
?>
<div
class=
"warning"
>
Invocation error, no user ID selected
</div>
<?php
}
else
{
?>
<div
class=
"warning"
>
Invocation error, no user ID selected
</div>
<?php
}
}
?>
<?php
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment