Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
d3410f30
Commit
d3410f30
authored
Feb 08, 2002
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add alternate view; only logged in users.
parent
d177592f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
www/showuser_list.php3
www/showuser_list.php3
+24
-5
No files found.
www/showuser_list.php3
View file @
d3410f30
...
...
@@ -19,15 +19,34 @@ LOGGEDINORDIE($uid);
#
$isadmin
=
ISADMIN
(
$uid
);
#
# Get the project list.
#
if
(
!
$isadmin
)
{
USERERROR
(
"You do not have permission to view the user list!"
,
1
);
}
$query_result
=
DBQueryFatal
(
"SELECT u.* FROM users as u order by u.uid"
);
if
(
isset
(
$alternate_view
)
&&
$alternate_view
)
{
echo
"<b><a href='showuser_list.php3'>
Show All Users</a>
</b><br><br>
\n
"
;
}
else
{
echo
"<b><a href='showuser_list.php3?alternate_view=1'>
Show Logged in Users</a>
</b><br><br>
\n
"
;
$alternate_view
=
0
;
}
if
(
$alternate_view
)
{
$query_result
=
DBQueryFatal
(
"select u.* from login as l "
.
"left join users as u on u.uid=l.uid "
.
"where timeout>=unix_timestamp() "
.
"order by u.uid"
);
}
else
{
$query_result
=
DBQueryFatal
(
"SELECT u.* FROM users as u order by u.uid"
);
}
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
USERERROR
(
"There are no users!"
,
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment