|
Revision 2, 1.3 kB
(checked in by evilbunny, 2 years ago)
|
Initial import
|
| Line | |
|---|
| 1 |
<? |
|---|
| 2 |
require_once("common.php"); |
|---|
| 3 |
|
|---|
| 4 |
if($_SESSION['_config']['access'] <= 0) |
|---|
| 5 |
{ |
|---|
| 6 |
header("location: login.php"); |
|---|
| 7 |
exit; |
|---|
| 8 |
} else if($_SESSION['_config']['access'] < 90) { |
|---|
| 9 |
$user = $_SESSION['_config']['username']; |
|---|
| 10 |
} else { |
|---|
| 11 |
$user = trim($_REQUEST['user']); |
|---|
| 12 |
} |
|---|
| 13 |
|
|---|
| 14 |
$alias = trim($_REQUEST['alias']); |
|---|
| 15 |
|
|---|
| 16 |
$process = $_POST['process']; |
|---|
| 17 |
|
|---|
| 18 |
if($process == "Yes") |
|---|
| 19 |
{ |
|---|
| 20 |
$fp = @fsockopen($hostname, $hostport); |
|---|
| 21 |
if($fp) |
|---|
| 22 |
{ |
|---|
| 23 |
fputs($fp, "delalias|$user|$alias\n"); |
|---|
| 24 |
fclose($fp); |
|---|
| 25 |
} else { |
|---|
| 26 |
die("Please contact your system administrator as the server has gone missing."); |
|---|
| 27 |
} |
|---|
| 28 |
} |
|---|
| 29 |
|
|---|
| 30 |
if($process) |
|---|
| 31 |
{ |
|---|
| 32 |
if($_SESSION['_config']['access'] < 90) |
|---|
| 33 |
header("location: aliases.php"); |
|---|
| 34 |
else |
|---|
| 35 |
header("location: aliases.php?user=$user"); |
|---|
| 36 |
exit; |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
include_once("header.php"); |
|---|
| 40 |
?> |
|---|
| 41 |
<div class="bodytext" style="padding:12px;" align="justify"> |
|---|
| 42 |
<p>Please enter the new alias for <?=$user?>.</p> |
|---|
| 43 |
<form method="post" action="<?=$_SERVER['REQUEST_URI']?>"> |
|---|
| 44 |
<p>Are you sure you want to delete the alias <?=$alias?> for user <?=$user?>?<br /><br /> |
|---|
| 45 |
<input type="submit" name="process" value="Yes"> <input type="submit" name="process" value="No"> |
|---|
| 46 |
<? if($_SESSION['_config']['access'] >= 90) { ?> |
|---|
| 47 |
<input type="hidden" name="user" value="<?=$user?>"> |
|---|
| 48 |
<? } ?> |
|---|
| 49 |
<input type="hidden" name="alias" value="<?=$alias?>"> |
|---|
| 50 |
</form> |
|---|
| 51 |
</div> |
|---|
| 52 |
<? include_once("footer.php"); ?> |
|---|
| 53 |
|
|---|