Removed /usr/local from CDPATH
[clearscm.git] / cc / msl / lsnusers.php
1 <!--
2 File:           lsnusers.php,v
3 Revision:       1.1.1.1
4
5 Description:    List users on the exclusion list (-nusers) for the stream lock.
6
7 Author:         Andrew@DeFaria.com
8 Created:        Fri Jul 14 09:44:04 PDT 2006
9 Modified:       2007/05/17 07:45:48
10 Language:       PHP
11
12 (c) Copyright 2006, Andrew@DeFaria.com, all rights reserved.
13 -->
14
15 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
16    "http://www.w3.org/TR/html4/strict.dtd">
17 <html>
18 <head>
19   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
20   <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
21   <link rel="stylesheet" type="text/css" href="/css/default.css">
22 <?php
23 include_once ("streams.php");
24 $version = "1.0";
25
26 # "Command line" parameters...
27 if (!empty ($_GET ["stream"])) {
28   $stream = $_GET ["stream"];
29   $heading = "Stream Locks for stream $stream";
30 } else {
31   $heading = "Stream Locks for stream &lt;unknown&gt:";
32 } // if
33
34 ?>
35   <title><?php echo $heading?></title>
36 </head>
37
38 <center><h1><?php echo $heading?></h1></center>
39
40 <?php
41 if (empty ($stream)) {
42   error ("Stream not specified!");
43 } // if
44
45 $nlocked_users          = get_nusers ($stream);
46 $nlocked_usernames      = get_usernames ();
47
48 if (!empty ($nlocked_users)) {
49   print "<p>Users excluded from lock for this stream include:</p>\n";
50   print "<blockquote>\n";
51   sort ($nlocked_users);
52   foreach ($nlocked_users as $user) {
53     //print "<li>$user <small><a href=\"private/rmnusers.php?stream=$stream&user=$user\">delete</a></small></li>\n";
54     print "<a href=\"private/rmnusers.php?stream=$stream&user=$user\"><img align=top src=\"delete.gif\" alt=\"delete\" heigth=15 width=15 border=0></a>&nbsp;&nbsp;";
55     if (array_key_exists ($user, $nlocked_usernames)) {
56       print $nlocked_usernames{$user};
57     } else {
58       print $user;
59     } // if
60     print "<br>\n";
61   } // foreach
62 } else {
63   print "<b><font color=red>Stream $stream is not locked.</font></b>";
64 } // if
65
66 print "</blockquote>\n";
67 print "<p><a href=\"private/addnuser.php?stream=$stream\">Add new user</a></p>\n";
68 ?>
69
70 <center>
71 <p><small><a href="/nusers_stream">Manage Stream Locks Home</a></small></p>
72 <?php copyright (null ,$version);?>
73 </center>
74 </body>
75 </html>