5 Description: Add a user to the exclusion list (-nusers).
7 Author: Andrew@DeFaria.com
8 Created: Fri Jul 14 09:44:04 PDT 2006
9 Modified: 2007/05/17 07:45:48
12 (c) Copyright 2006, Andrew@DeFaria.com, all rights reserved.
15 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
16 "http://www.w3.org/TR/html4/strict.dtd">
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">
23 include_once ("../streams.php");
26 # "Command line" parameters...
27 if (!empty ($_GET ["stream"])) {
28 $stream = $_GET ["stream"];
30 if (!empty ($_GET ["user"])) {
31 $user = $_GET ["user"];
34 if (!empty ($stream)) {
36 $heading = "Opening up $stream for $user";
38 $heading = "Opening up $stream for <unknown>";
41 $heading = "Opening up <unknown> for $user";
44 <title><?php echo $heading?></title>
47 <center><h1><?php echo $heading?></h1></center>
51 if (empty ($stream)) {
52 error ("Stream parameter not supplied");
56 error ("User parameter not supplied");
59 $usernames = get_usernames ();
61 foreach ($usernames as $key => $value) {
62 if ($user == $value) {
68 $nusers = get_nusers ($stream);
70 if (count ($nusers) == 0) {
72 $status = chnusers ($stream, $nusers);
75 print "$user is now allowed to access $stream";
77 print "<font color=red><b>ERROR:</b></font> Unable to add $user to nuser list of $stream";
79 } elseif (is_member ($user, $nusers)) {
80 print "<font color=red><b>ERROR:</b></font> $user is already allowed access to $stream<br>";
82 array_push ($nusers, $user);
83 $status = chnusers ($stream, $nusers);
86 print "$user is now allowed to access $stream";
88 print "<font color=red><b>ERROR:</b></font> Unable to add $user to nuser list of $stream";
94 <p><small><a href="/nusers_stream/lsnusers.php?stream=<?=$stream?>">Manage Stream Locks for <?=$stream?></a></small></p>
95 <?php copyright (null ,$version);?>