<?php
include("config.php");
?>
<?php /*?>function getIp()
{
	$ip_address=$_SERVER['HTTP_X_FORWARDED_FOR'];
	
	if ($ip_address==NULL){
	$ip_address=$_SERVER[REMOTE_ADDR]; }
	return $ip_address;
}

$getipaddress = getIP();
//echo $getipaddress;
$ipadd = explode(".",$getipaddress);

if($_SESSION["IPSUCCESS"]=="true") 
{
}
else
{
	$q = "select * from ipaddress where ip like '" . $ipadd[0] . "%' and ip like '%" .$ipadd[1] . "%' ";
	//echo $q;
	$r = mysql_query($q);
	$n = mysql_num_rows($r);
	if($n)
	{
		while($rw = mysql_fetch_array($r))
		{
			$success = "true";
			$_SESSION["IPSUCCESS"] = "true";
		}
	}
	else
	{
		$success = "false";
		$_SESSION["IPSUCCESS"] = "";
		echo "NOT AUTHENTICATED";
		?>
		<script language="javascript">
		window.location.href = "http://www.kundanstaffportal.com/logout.php?";
		</script>
		<?php 
		exit();
	}
}

<?php */?>
