<?php

function class_auto_loader($class)
{
	$class = strtolower($class);
	$the_path = "include/classes/{$class}.php";
	// if (file_exists($the_path)) {
	// 	require_once($the_path);
	// }else{
	// 	die("the file named {$class}.php was not found..");
	// }

	if (is_file($the_path) && !class_exists($class)) {
		include($the_path);
	}
}

spl_autoload_register('class_auto_loader');

function redirect($location)
{
	header("Location: {$location}");
}

function notification($type, $message)
{
	return "<div class='alert alert-$type alert-dismissible ' role='alert'>
    <button type='button' class='close' data-dismiss='alert' aria-label='Close'><span
            aria-hidden='true'>×</span>
    </button>
    $message
    </div>";
}
$message = '';
$today = Date("d-F-Y");
$date = Date("c");