<?php
session_start();

include_once "db.class.php";
include_once "functions.class.php";
include_once "html.class.php";
include_once "email.class.php";
include_once "dashboard.class.php";


if (basename($_SERVER['PHP_SELF']) == 'login.php' || basename($_SERVER['PHP_SELF']) == 'signup.php' || basename($_SERVER['PHP_SELF']) == 'forgot_password.php') {
    // echo basename($_SERVER['PHP_SELF']);
    session_destroy();
} else {
    if (!isset($_SESSION['user_id'])) {
        header('Location: login.php');
        // echo $_SESSION['user_id'];
    }
}