44 lines
1.7 KiB
PHP
44 lines
1.7 KiB
PHP
<html>
|
|
<head>
|
|
<title>RoamEase Portal</title>
|
|
<link rel="shortcut icon" href="./icon/favicon/favicon.ico" type="image/x-icon" />
|
|
<link rel="icon" href="./icon/favicon/favicon.ico" type="image/x-icon" />
|
|
</head>
|
|
|
|
<body>
|
|
<?php
|
|
include "./indexes/ConnectDB.php";
|
|
// Start the session
|
|
session_start();
|
|
// Check if the user is already logged in
|
|
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
|
|
if(isset($_SESSION['usertype']) && $_SESSION['usertype'] === 'buyer'){
|
|
echo "<script type='text/javascript'>
|
|
window.top.location.href = './indexes/user/stays.php';
|
|
</script>";
|
|
}
|
|
if(isset($_SESSION['usertype']) && $_SESSION['usertype'] === 'seller'){
|
|
echo "<script type='text/javascript'>
|
|
window.top.location.href = './indexes/seller/home.php';
|
|
</script>";
|
|
}
|
|
if(isset($_SESSION['usertype']) && $_SESSION['usertype'] === 'admin'){
|
|
echo "<script type='text/javascript'>
|
|
window.top.location.href = './indexes/admin/home.php';
|
|
</script>";
|
|
}
|
|
if(isset($_SESSION['usertype']) && $_SESSION['usertype'] === 'guide'){
|
|
echo "<script type='text/javascript'>
|
|
window.top.location.href = './indexes/guide/home.php';
|
|
</script>";
|
|
}
|
|
}
|
|
else {
|
|
echo "<script type='text/javascript'>
|
|
window.top.location.href = './indexes/user/home.php';
|
|
</script>";
|
|
}
|
|
?>
|
|
</body>
|
|
</html>
|