Initial Commit
This commit is contained in:
43
index.php
Normal file
43
index.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user