<?php

header("location:jse_registrationhandler.php");
session_start();

include "../header.php";
include "../config.php";
include "../style.php";

$jse_domain	= $_POST['domainname'];

if( isset($_SESSION["alogin"]) ) {

    	?><table>
      	<tr>
        <td width="15%" valign=top><br>
        <? include("adminnavigation.php"); ?>
        </td>
        <td valign="top" align="center"><br><br> <?
    echo "<font size=2 face='$fonttype' color='$fontcolour'><p><b><center>";
	
	
	// Load the settings
	$query = "select * from jse_bdomainsettings";
		$result = mysql_query( $query )
			or die( "Connection error. Check database settings!" );

	$array = mysql_fetch_array($result);
	$jse_mode = $array["type"];
	
	if( $jse_mode == 'allow' )
	{
		$query = "delete from jse_allow where domain='".$jse_domain."'";
			$result = mysql_query( $query )
				or die( "Connection Error. Check database settings!" );
	}
	if( $jse_mode == 'reject' )
	{
		$query = "delete from jse_reject where domain='".$jse_domain."'";
			$result = mysql_query( $query )
				or die( "Connection Error. Check database settings!" );
	}

    echo "</table></td></tr></table>";
    }

else  {
	echo "Unauthorised Access!";
    }

include "../footer.php";
mysql_close($dblink);
?>