<?php 
  require 'includes/core.php';
  require 'includes/connect.php';

$refer = $_SERVER['HTTP_REFERER']; 

  
  if (loggedin() && !empty($_SESSION['user_id'])){
    header('Location: index.php');

  }else if (loggedinadmin() && !empty($_SESSION['admin-id'])) {
    
    header('Location: admin/index.php');
    


    }else{


      include 'login.php';
    }
    

?>