|
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>Realm</th><th>Secret</th><th>Edit</th><th>Delete</th></tr> |
|---|
| 14 |
<? |
|---|
| 15 |
$fp = @fsockopen($hostname, $hostport); |
|---|
| 16 |
if($fp) |
|---|
| 17 |
{ |
|---|
| 18 |
fputs($fp, "getrealms\n"); |
|---|
| 19 |
while(!feof($fp)) |
|---|
| 20 |
{ |
|---|
| 21 |
$line = trim(fgets($fp, 4096)); |
|---|
| 22 |
if($line == "") |
|---|
| 23 |
continue; |
|---|
| 24 |
list($realm, $secret, $ipranges) = explode('|', $line, 3); |
|---|
| 25 |
$ipranges = urlencode($ipranges); |
|---|
| 26 |
|
|---|
| 27 |
echo "<tr><td>$realm</td><td>$secret</td><td><a href='editrealm.php?realm=$realm&secret=$secret&ipranges=$ipranges'>". |
|---|
| 28 |
"Edit</a></td><td><a href='delrealm.php?realm=$realm'>Delete</a></td>\n"; |
|---|
| 29 |
} |
|---|
| 30 |
fclose($fp); |
|---|
| 31 |
} else { |
|---|
| 32 |
echo "<tr><td colspan='4'>Please contact your system administrator as the server has gone missing.</td></tr>"; |
|---|
| 33 |
} |
|---|
| 34 |
?> |
|---|
| 35 |
</table> |
|---|
| 36 |
<? include_once("footer.php"); ?> |
|---|
| 37 |
|
|---|