<?php
/*
Customer page
Name -Ritu Modi
Date -27-02-24
Description- This file use for fetch data and insert data in database
*/ 
$sidebar_active = 'customers';
include("web_function.php");
include('Customer/web_consumer_function.php');
include('includes/crm_page_start.php');
?>

<body>
<style>
        .form-wrapper {
            text-align: center;
        }
        .form-wrapper form {
            display: inline-block;
        }
        .input-style1::placeholder {
            color: black;
        }
        .button-search {
            padding: 2px;
            justify-content: center;
            align-items: center;
        }
        .search-form {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .search-input {
            margin-bottom: 5px;
        }
    </style>
   <div class="wrapper">
        <div class="container-fluid">
            <div class="row" style="min-height:90vh;">
                <div class="col-sm-2" style="padding-left:0">
                  <?php include('includes/sidebar.php');?>
                </div>
                <?php $token = base64_decode($_GET['token']);
            if($token == 'web_consumer_home'){
              $class = 'col-sm-10 mt-3';
            }else{
              $class = 'col-sm-10 mt-3';
            }?>
            <div class="<?php echo $class;?>" style="padding-left:0">
                <div class="rightpanels"> 
                    <!-- this code change our requirement -->
                    <?php
                        if($token == 'web_consumer_home'){
                            include_once("Customer/web_consumer_home.php");
                        }else if($token == 'web_customer_detail'){
                            include_once("Customer/web_customer_detail.php");
                        }else{
                           // If none of the conditions match, redirect to logout page
                            echo "<script>window.location.href = '../web_logout.php';</script>";
                            exit; // Stop script execution
                        }
                    ?>
                    <!-- End -->
                </div>
            </div>
        </div>
    </div>
    <div class="footer">
        <?php include("includes/web_footer.php"); ?>
    </div>
</div>
</body>
<script src="<?=$SiteURL?>public/js/customer.js"></script>
