<?php

		//////////////////////////////////////////////////////////
		//////////// Deleted members script, based on ////////////
		//////////////// the base FairyAds script ////////////////
		//////////////// Coded by Jonathan, v0.1 /////////////////
		//////////////////////////////////////////////////////////

header("location:../leaves_options.php");

session_start();

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

if( session_is_registered("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>";
	
	//Get the options of Leaves
	$options = mysql_query ("select * from leaves_options where id='1'");
	$array = mysql_fetch_array($options);
	$joinemail = $array["join_email"];
	
	if($joinemail == 1)
	{
		$query1 = "update leaves_options set join_email='0'";
		$result1 = mysql_query ($query1);
	}
	else
	{
		$query1 = "update leaves_options set join_email='1'";
		$result1 = mysql_query ($query1);
	}
	

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

else  {
	echo "Unauthorised Access!";
    }

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