<?php
	error_reporting(E_ALL);
	ob_start();
	session_start();
	
	if(isset($_SESSION["fullname"])  && isset($_SESSION["email"])){
		
	}else{
		header('Location: login.php');
	}

	function url(){
	    if(isset($_SERVER['HTTPS'])){
	        $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http";
	    }
	    else{
	        $protocol = 'http';
	    }
	    $urlArr = explode('/',$_SERVER['REQUEST_URI']);
	    $count =count($urlArr);
	    unset($urlArr[$count-1]);
	    $uri = implode('/',$urlArr);
	    return $protocol . "://" . $_SERVER['HTTP_HOST'] . $uri;
	}	
?>