<?php
     session_start();
      include 'database/shikanisha.kts.php';
        if(!($_SESSION['type'] == 'Manager' || $_SESSION['type'] == 'Cashier' || $_SESSION['type'] == 'Waiter')){
            header("location:logout.php");
}


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>THE FARM</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">

</head>

<body>
<style>
  body {
            background-image: url("./quixlab/images/pharm.webp");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            height: 100vh;
        }
  </style>

    <!--*******************
        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 gradient-9" style="background-image: url('./quixlab/images/room.jpg');">
                        <div class="card-body" style="display: flex; color: black; align-items: center; justify-content: center;">
                            <div class="d-inline-block">
    <h1 class="text-blue" style="color: black;">   THE FARM
</h1>
</div>

                        </div>
                    </div>
                </div>

              </div>
                
             <?php 
             session_start();
       if ($_SESSION['type'] == 'Accountant') {
              echo'
               <div class="row">
                   <div class="col-lg-6 col-sm-6">
                        <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-6 col-sm-6">
                        <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-6 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-6 col-md-6 col-sm-6">
                        <div class="card gradient-12" onclick="redirectToPage(\'reg-customer.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Register Customer</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'] == 'Cashier') {
              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(\'sales.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">My Sales</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-md-6 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-6 col-md-6 col-sm-6">
                        <div class="card gradient-12" onclick="redirectToPage(\'reg-customer.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Register Customer</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'] == 'Manager') {
              echo'
               <div class="row">
                   <div class="col-lg-3 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-3 col-sm-6">
                        <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-3 col-sm-6">
                        <div class="card gradient-3" onclick="redirectToPage(\'sales.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Sales</h2>  
                                </div>
                                <span class="float-right display-5 opacity-5"><i class="fa fa-users"></i></span>
                            </div>
                        </div>
                    </div>
                     <div class="col-lg-3 col-sm-6">
                        <div class="card gradient-12" onclick="redirectToPage(\'reg-customer.php\');">
                            <div class="card-body">
                                <div class="d-inline-block">
                                  <h2 class="text-white">Register Customer</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-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>;' ;}
              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>