<?php

session_start();

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

$mip = $_POST['ip'];

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>";
	
	
		//////////////////////////////////////////////////////////
		//////////// E-mail notification to the Admin ////////////
		/////////// Part of the Deleted members script ///////////
		//////////////// Coded by Jonathan, v0.1 /////////////////
		//////////////////////////////////////////////////////////
		//Get the options of Leaves
		$options = mysql_query ("select * from leaves_bannedips where ip='$mip'");
        $array = mysql_fetch_array($options);
		
		$query1 = "delete from leaves_bannedips where ip='$mip'";
			$result = mysql_query ($query1);
		

    echo "The IP ".$mip." has been unbanned.<br><br>";
	
	?>Click <a href="leaves_banip.php?showmip=1">here</a> to return to the banned ip list.<?

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

else  {
	echo "Unauthorised Access!";
    }

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