|
Revision 2, 0.9 kB
(checked in by evilbunny, 2 years ago)
|
Initial import
|
| Line | |
|---|
| 1 |
<? |
|---|
| 2 |
require_once("common.php"); |
|---|
| 3 |
|
|---|
| 4 |
if($_SESSION['_config']['access'] < 90) |
|---|
| 5 |
{ |
|---|
| 6 |
header("location: login.php"); |
|---|
| 7 |
exit; |
|---|
| 8 |
} |
|---|
| 9 |
|
|---|
| 10 |
include_once("header.php"); |
|---|
| 11 |
?> |
|---|
| 12 |
<table border="0" width="80%" cols="5"> |
|---|
| 13 |
<tr><th>Username</th><th>Secret</th><th>Aliases</th><th>Change Secret</th><th>Delete</th></tr> |
|---|
| 14 |
<? |
|---|
| 15 |
$fp = @fsockopen($hostname, $hostport); |
|---|
| 16 |
if($fp) |
|---|
| 17 |
{ |
|---|
| 18 |
fputs($fp, "users\n"); |
|---|
| 19 |
while(!feof($fp)) |
|---|
| 20 |
{ |
|---|
| 21 |
$line = trim(fgets($fp, 4096)); |
|---|
| 22 |
if($line == "") |
|---|
| 23 |
continue; |
|---|
| 24 |
list($username, $secret) = explode('|', $line); |
|---|
| 25 |
echo "<tr><td>$username</td><td>$secret</td><td><a href='aliases.php?user=$username'>Aliases</a></td>"; |
|---|
| 26 |
echo "<td><a href='edituser.php?user=$username&secret=$secret'>Change Secret</a></td><td><a href='deluser.php?user=$username'>Delete</a></td>\n"; |
|---|
| 27 |
} |
|---|
| 28 |
fclose($fp); |
|---|
| 29 |
} else { |
|---|
| 30 |
echo "<tr><td colspan='5'>Please contact your system administrator as the server has gone missing.</td></tr>"; |
|---|
| 31 |
} |
|---|
| 32 |
?> |
|---|
| 33 |
</table> |
|---|
| 34 |
<? include_once("footer.php"); ?> |
|---|
| 35 |
|
|---|