<?php
// Start the session at the beginning
session_start();

// Check if the 'type' session variable is set
if (!isset($_SESSION['type'])) {
    // Redirect to logout.php if 'type' is not set
    header("Location: logout.php");
    exit(); // Make sure to exit after redirecting
}

// Require the database file
require_once 'database/shikanisha.kts.php';
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Jacyjoka Apartments</title>
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="./quixlab/images/favicon.png">
    <!-- Pignose Calender -->
    <link href="./quixlab/plugins/pg-calendar/css/pignose.calendar.min.css" rel="stylesheet">
    <!-- Chartist -->
    <link rel="stylesheet" href="./quixlab/plugins/chartist/css/chartist.min.css">
    <link rel="stylesheet" href="./quixlab/plugins/chartist-plugin-tooltips/css/chartist-plugin-tooltip.css">
    <!-- Custom Stylesheet -->
    <link href="./quixlab/css/design.css" rel="stylesheet">
<style>
 body {
            background-image: url("./imgs/index.jpg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            height: 100vh;
        }
  </style>
    
    
     <style>
        .tabz {
            background-color: rgba(255, 255, 255, 0.5); /* Adjust the alpha (opacity) value as needed */
        }
    </style>
</head>

<body>

    <!--*******************
        Preloader start
    ********************-->
    <div id="preloader">
        <div class="loader">
            <svg class="circular" viewBox="25 25 50 50">
                <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="3" stroke-miterlimit="10" />
            </svg>
        </div>
    </div>
    <!--*******************
        Preloader end
    ********************-->

    
    <!--**********************************
        Main wrapper start
    ***********************************-->
    <div id="main-wrapper">

        <!--**********************************
            Nav header start
        ***********************************-->
          <!--**********************************
            Content body start
        ***********************************-->
       

            <div class="container-fluid mt-4">
              <div class="row">
               <div class="col-lg-12 col-sm-12">
                   
                        <div class="card-body" style="display: flex; color: aqua; align-items: center; justify-content: center;">
                            <div class="d-inline-block">
    <h1 class="text-blue" style="color: white;">Jacyjoka Apartments</h1>
</div>

                        </div>
                 
                </div>

              </div>
                
             <?php 
       if ($_SESSION['type'] == 'Cashier') {
              echo'
               <div class="row">
                   <div class="col-lg-3 col-sm-3">
                        <div class="card gradient-7" onclick="redirectToPage(\'orders.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Point Of Sale</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-shopping-cart"></i></span>
                            </div>
                        </div>
                    </div>
                   
                  <div class="col-lg-3 col-md-3 col-sm-3">
                        <div class="card gradient-11" onclick="redirectToPage(\'inventory.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Inventory</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3 col-md-3 col-sm-3">
                        <div class="card gradient-2" onclick="redirectToPage(\'request.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Issue/Request</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3 col-sm-3">
                        <div class="card gradient-9" onclick="redirectToPage(\'payments.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Add Payment</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                <div class="col-lg-3 col-md-4 col-sm-6">
                        <div class="card gradient-12" onclick="redirectToPage(\'reports.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Reports</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3 col-sm-6">
                      <div class="card gradient-9" onclick="redirectToPage(\'expense.php\');">
                          <div class="card-body">
                            <div class="d-inline-block">
                              <h2 class="text-white">Expenses</h2>
                            </div>
                            <span class="float-right display-5 opacity-5"><i class="fa fa-edit"></i></span>
                          </div>
                        </div>
                    </div>
                    <div class="col-lg-3 col-md-4 col-sm-6">
                        <div class="card gradient-10" onclick="redirectToPage(\'logout.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Logout</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                  <div class="col-lg-3 col-md-4 col-sm-6">
                        <div class="card gradient-11" onclick="redirectToPage(\'swimming.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Swimming Arena</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                </div>';
            }elseif ($_SESSION['type'] == 'Waiter') {
              echo'
                <div class="row">
                   <div class="col-lg-6 col-sm-6">
                        <div class="card gradient-1" onclick="redirectToPage(\'orders.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Point Of Sale</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-shopping-cart"></i></span>
                            </div>
                        </div>
                    </div>
                   
                    
                    <div class="col-lg-6 col-sm-6">
                        <div class="card gradient-8" onclick="redirectToPage(\'payments.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Payments</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                <div class="col-lg-4 col-md-4 col-sm-4">
                        <div class="card gradient-10" onclick="redirectToPage(\'logout.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Logout</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-4">
                        <div class="card gradient-11" onclick="redirectToPage(\'swimming.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Swimming Arena</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-4">
                        <div class="card gradient-10" onclick="redirectToPage(\'logout.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Logout</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                </div>';
            }elseif ($_SESSION['type'] == 'Receptionist') {
              echo'
                <div class="row">
                   
                    <div class="col-lg-4 col-sm-4">
                       <div class="card gradient-3" onclick="redirectToPage(\'inventory.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Inventory </h2>  
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-users"></i></span>
                            </div>
                        </div>
                       </div>
                    <div class="col-lg-4 col-sm-4">
                        <div class="card gradient-4" onclick="redirectToPage(\'payments.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Add Payment</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                   
                   <div class="col-lg-4 col-sm-4">
                        <div class="card gradient-7" onclick="redirectToPage(\'accomodation.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Accomodation</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-shopping-cart"></i></span>
                            </div>
                        </div>
                    </div>
                  </div>
                  <div class="row">
                  <div class="col-lg-4 col-md-4 col-sm-4">
                        <div class="card gradient-11" onclick="redirectToPage(\'swimming.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Swimming Arena</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-md-4 col-sm-4">
                        <div class="card gradient-2" onclick="redirectToPage(\'request.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Issue/Request</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                     <div class="col-lg-4 col-md-4 col-sm-4">
                        <div class="card gradient-10" onclick="redirectToPage(\'logout.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Logout</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                  </div>
                  ';
            }elseif ($_SESSION['type'] == 'CEO') {
              echo'
                <div class="row">
                   
                    <div class="col-lg-4 col-sm-4">
                       <div class="card gradient-3" onclick="redirectToPage(\'inventory.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Inventory </h2>  
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-users"></i></span>
                            </div>
                        </div>
                       </div>
                    <div class="col-lg-4 col-sm-4">
                        <div class="card gradient-4" onclick="redirectToPage(\'reports.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Reports</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                   
                   <div class="col-lg-4 col-sm-4">
                        <div class="card gradient-7" onclick="redirectToPage(\'overall.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Dashboard</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-shopping-cart"></i></span>
                            </div>
                        </div>
                    </div>
                  </div>
                  
                  ';
            }elseif($_SESSION['type'] == 'Manager') {
              echo'
               <div class="row">
                  
                    <div class="col-lg-4 col-sm-4">
                        <div class="card gradient-5" onclick="redirectToPage(\'reports.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Reports</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-file"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-sm-4">
                        <div class="card gradient-2" onclick="redirectToPage(\'balancesheet.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Accounting</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-file"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4 col-sm-4">
                        <div class="card gradient-3" onclick="redirectToPage(\'rooms.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Room Management</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-file"></i></span>
                            </div>
                        </div>
                    </div>
                   
                   
                    </div>
                    <div class="row">
                    <div class="col-lg-3 col-sm-6">
                        <div class="card gradient-8" onclick="redirectToPage(\'employee.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Employees</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-id-card"></i></span>
                            </div>
                        </div>
                    </div>
                            
                    <div class="col-lg-3 col-sm-6">
                        <div class="card gradient-9" onclick="redirectToPage(\'purchases.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Purchases</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-shopping-cart"></i></span>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3 col-sm-6">
                        <div class="card gradient-10" onclick="redirectToPage(\'inventory.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                    <h2 class="text-white">Inventory</h2>
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-inbox"></i></span>
                            </div>
                        </div>
                    </div>
                    

                    <div class="col-lg-3 col-sm-6">
                        <div class="card gradient-4" onclick="redirectToPage(\'payments.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Add Payment</h2> 
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-credit-card"></i></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">                  
                <div class="col-lg-6 col-sm-6">
                      <div class="card gradient-9" onclick="redirectToPage(\'expenses.php\');">
                          <div class="card-body">
                            <div class="d-inline-block">
                              <h2 class="text-white">Expenses</h2>
                            </div>
                            <span class="float-right display-5 opacity-5"><i class="fa fa-edit"></i></span>
                          </div>
                        </div>
                    </div>   
                    <div class="col-lg-6 col-sm-6">
                      <div class="card gradient-1" onclick="redirectToPage(\'logout.php\');">
                          <div class="card-body">
                            <div class="d-inline-block">
                              <h2 class="text-white">Sign Out</h2>
                            </div>
                            <span class="float-right display-5 opacity-5"><i class="fa fa-edit"></i></span>
                          </div>
                        </div>
                    </div></div>;' ;}
              else{
                 header("location:logout.php");
              }

                  
              ?>
           
            <!-- #/ container -->
        </div>
        <!--**********************************
            Content body end<div class="col-lg-3 col-sm-6">
                      <div class="card gradient-11" onclick="redirectToPage(\'expenses.php\');">
                          <div class="card-body">
                            <div class="d-inline-block">
                              <h2 class="text-white">Expenses</h2>
                            </div>
                            <span class="float-right display-5 opacity-5"><i class="fa fa-edit"></i></span>
                          </div>
                        </div>
                    </div>
        ***********************************-->
        
        
        <!--**********************************
            Footer start
        ***********************************-->
        <div class="footer">
            <div class="copyright">
                <p>Copyright &copy; Designed & Developed by <a href="https://kakashitech.com">Kakashi Tech</a> 2023</p>
            </div>
        </div>
        <!--**********************************
            Footer end
        ***********************************-->
    </div>
    <!--**********************************
        Main wrapper end
    ***********************************-->

    <!--**********************************
        Scripts
    ***********************************-->
    <script src="./quixlab/plugins/common/common.min.js"></script>
    <script src="./quixlab/js/custom.min.js"></script>
    <script src="./quixlab/js/settings.js"></script>
    <script src="./quixlab/js/gleek.js"></script>
    <script src="./quixlab/js/styleSwitcher.js"></script>

    <!-- Chartjs -->
    <script src="./quixlab/plugins/chart.js/Chart.bundle.min.js"></script>
    <!-- Circle progress -->
    <script src="./quixlab/plugins/circle-progress/circle-progress.min.js"></script>
    <!-- Datamap -->
    <script src="./quixlab/plugins/d3v3/index.js"></script>
    <script src="./quixlab/plugins/topojson/topojson.min.js"></script>
    <script src="./quixlab/plugins/datamaps/datamaps.world.min.js"></script>
    <!-- Morrisjs -->
    <script src="./quixlab/plugins/raphael/raphael.min.js"></script>
    <script src="./quixlab/plugins/morris/morris.min.js"></script>
    <!-- Pignose Calender -->
    <script src="./quixlab/plugins/moment/moment.min.js"></script>
    <script src="./quixlab/plugins/pg-calendar/js/pignose.calendar.min.js"></script>
    <!-- ChartistJS -->
    <script src="./quixlab/plugins/chartist/js/chartist.min.js"></script>
    <script src="./quixlab/plugins/chartist-plugin-tooltips/js/chartist-plugin-tooltip.min.js"></script>



    <script src="./quixlab/js/dashboard/dashboard-1.js"></script>
      
    <script>
   function redirectToPage(url) {
    window.location.href = url;
    }
  </script>  
      
</body>

</html>