<?php
//needs a session start
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
//returns if user is admin
function isAdmin()
{
	if(isset($_SESSION['admin']))
	{
		if($_SESSION['admin'] > 0)
		{
			return true;
		}
	}
	return false;
}

//returns if user is logged in
function isLogged()
{
	if(isset($_SESSION['email']))
	{
		if($_SESSION['email'] != '')
		{
			return true;
		}
	}
	return false;
}