include "header.php"; ?> include "db.php"; ?> $db = new DB($mysql_host, $mysql_user, $mysql_password, $mysql_db); ?>
$reassign = "";
if (isset($_REQUEST["reassign"])) {
$reassign=$_REQUEST["reassign"];
}
$displayform = true;
if (isset($_REQUEST["mount"])) {
$mount=$_REQUEST["mount"];
if (isset($_REQUEST["confirm"])) {
$confirm=$_REQUEST["confirm"];
if ($confirm == "1") {
$displayform = false;
$query = sprintf("delete from ".$table_prefix."mountpoints where mountpoint_name = '%s'", mysql_real_escape_string($mount));
if (mysql_query($query, $db->link)) {
echo "Deleted mountpoint $mount
";
}
else {
echo "Error deleting mountpoint $mount : ".mysql_error()."
";
}
if ($reassign != '') {
$query = sprintf("update users set ".$table_prefix."mountpoint = '%s' where mountpoint = '%s'", mysql_real_escape_string($reassign), mysql_real_escape_string($mount));
$result = mysql_query($query, $db->link);
if (!$result) {
echo "Error reassigning users from $mount to $reassign : ".mysql_error()."
";
}
else {
$users_updated = mysql_affected_rows();
echo " $users_updated users re-assigned from $mount to mountpoint $reassign
";
}
}
else {
echo " No users re-assigned.
";
}
}
}
}
?>
if ($displayform) {
?>
This will delete the mountpoint echo $mount; ?> and optionally re-assign all users subscribed to this mountpoint to another mountpoint
THIS WILL REMOVE THE MOUNTPOINT. PLEASE MAKE SURE YOU WANT TO DO THIS.
Delete echo $mount; ?>