<?php
session_start();
$checkID = $_SESSION['company'];
	if($checkID == ""){			
		$checkID = $_SESSION['admin'];
	}
	else{
		echo"<script language=javascript>window.location='http://www.wauhaha.com/smart/company/company.php'</script>";
	}
	if($checkID == ""){
		$checkID = $_SESSION['agent'];
	}
	else{
		echo"<script language=javascript>window.location='http://www.wauhaha.com/smart/admin/admin.php'</script>";
	}
	if($checkID == ""){	
		session_destroy();
		echo"<script language=javascript>alert('Incorrect Url! Please Login Again');window.location='http://www.wauhaha.com/smart/login.php'</script>";
	}
	else{
		echo"<script language=javascript>window.location='http://www.wauhaha.com/smart/agent/agent.php'</script>";
	
	}
?>