<?php
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}
//if (!isset($_SESSION['username'])) {
//    // header("Location: http://localhost/Vegbox_dairy/login.php");
//    header("Location: ./login.php");
//    exit;
//}
?>

<!doctype html>
<html lang="en">

    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta http-equiv="Content-Language" content="en">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>Aadimjuth</title>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" />
        <meta name="description" content="This is an example dashboard created using build-in elements and components.">
        <meta name="msapplication-tap-highlight" content="no">
        <!--<script src="custom_js/jquery.min.js" type="text/javascript"></script>-->
        <script type="text/javascript" src="custom_js/jquery.min.js"></script>

        <link href="./main.css" rel="stylesheet"></head>
    <body>
        <div class="app-container app-theme-white body-tabs-shadow fixed-sidebar fixed-header">
            <div class="app-header header-shadow">
                <div class="app-header__logo">
                    <div class="logo-src" style="height: 65%;width: 68%">
                        <b><span class="fa-pol" style="color: green;font-size: 24px">Adim</span><span style="color: red;font-size: 24px">Juth</span></b>
                    </div>
                    <div class="header__pane ml-auto">
                        <div>
                            <button type="button" class="hamburger close-sidebar-btn hamburger--elastic" data-class="closed-sidebar">
                                <span class="hamburger-box">
                                    <span class="hamburger-inner"></span>
                                </span>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="app-header__mobile-menu">
                    <div>
                        <button type="button" class="hamburger hamburger--elastic mobile-toggle-nav">
                            <span class="hamburger-box">
                                <span class="hamburger-inner"></span>
                            </span>
                        </button>
                    </div>
                </div>
                <div class="app-header__menu">
                    <span>
                        <button type="button" class="btn-icon btn-icon-only btn btn-primary btn-sm mobile-toggle-header-nav">
                            <span class="btn-icon-wrapper">
                                <i class="fa fa-ellipsis-v fa-w-6"></i>
                            </span>
                        </button>
                    </span>
                </div>    
                
                <div class="app-header__content">
                    <div class="app-header-right">
                        <div class="header-btn-lg pr-0">
                            <div class="widget-content p-0">
                                <div class="widget-content-wrapper">
                                    <div class="widget-content-left">
                                        <div class="btn-group">
                                            <a data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="p-0 btn">
                                                <img width="42" class="rounded-circle" src="assets/images/hd1.jpg" alt="">
                                                <i class="fa fa-angle-down ml-2 opacity-8"></i>
                                            </a>
                                            <div tabindex="-1" role="menu" aria-hidden="true" class="dropdown-menu dropdown-menu-right">
                                                <button type="button" tabindex="0" class="dropdown-item">Admin</button>

                                                <!--                                                <button type="button" tabindex="0" class="dropdown-item">
                                                                                                    <a href="change_password.php" tabindex="4">
                                                                                                        Change Password
                                                                                                    </a>
                                                                                                </button>-->
                                                <button type="button" tabindex="0" id="btn-logout" class="dropdown-item">Logout</button>
                                                <!--<button type="button" tabindex="0" id="btn_about_click" class="dropdown-item">About</button>-->
                                            </div>
                                        </div>
                                    </div>
                                    <div class="widget-content-left  ml-3 header-user-info">
                                        <div class="widget-heading">
                                            Admin
                                        </div>
                                        <!--                                        <div class="widget-subheading">
                                                                                    VP People Manager
                                                                                </div>-->
                                    </div>

                                </div>
                            </div>
                        </div>        
                    </div>
                </div>
            </div>        <div class="ui-theme-settings">

            </div>        <div class="app-main">
                <div class="app-sidebar sidebar-shadow">
                    <div class="app-header__logo">
                        <div class="logo-src"></div>
                        <div class="header__pane ml-auto">
                            <div>
                                <button type="button" class="hamburger close-sidebar-btn hamburger--elastic" data-class="closed-sidebar">
                                    <span class="hamburger-box">
                                        <span class="hamburger-inner"></span>
                                    </span>
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="app-header__mobile-menu">
                        <div>
                            <button type="button" class="hamburger hamburger--elastic mobile-toggle-nav">
                                <span class="hamburger-box">
                                    <span class="hamburger-inner"></span>
                                </span>
                            </button>
                        </div>
                    </div>
                    <div class="app-header__menu">
                        <span>
                            <button type="button" class="btn-icon btn-icon-only btn btn-primary btn-sm mobile-toggle-header-nav">
                                <span class="btn-icon-wrapper">
                                    <i class="fa fa-ellipsis-v fa-w-6"></i>
                                </span>
                            </button>
                        </span>
                    </div>    <div class="scrollbar-sidebar">
                        <div class="app-sidebar__inner">
                            <ul class="vertical-nav-menu">
                                <li class="app-sidebar__heading">Dashboard</li>
                                <li>
                                    <a href="user_dashboard.php" class="mm-active">
                                        <i class="metismenu-icon pe-7s-rocket"></i>
                                        Dashboard
                                    </a>
                                    <a href="patrak_1_family_entry.php">
                                        <i class="metismenu-icon pe-7s-display2"></i>
                                        Patrak 1 Family Entry
                                    </a>

                                    <a href="patrak_2_common_entry.php">
                                        <i class="metismenu-icon pe-7s-display2"></i>
                                        Patrak 2 Common Detail Entry
                                    </a>

                                    <!--                                    <a href="customer_call_history.php">
                                                                            <i class="metismenu-icon pe-7s-display2"></i>
                                                                            Customer Call Entry
                                                                        </a>-->
                                    <!--                                    <a href="daily_bil_entry.php">
                                                                            <i class="metismenu-icon pe-7s-display2"></i>
                                                                            Daily Bill Entry
                                                                        </a>-->
                                    <!--                                    <a href="generate_bil.php">
                                                                            <i class="metismenu-icon pe-7s-display2"></i>
                                                                            Generate Bill
                                                                        </a>-->
                                    <!--                                     <a href="edit_generated_bill.php">
                                                                            <i class="metismenu-icon pe-7s-display2"></i>
                                                                            Edit Generated Bill
                                                                        </a>-->
                                    <!--                                    <a href="Edit_bill_by_vehicle_no.php">
                                                                            <i class="metismenu-icon pe-7s-display2"></i>
                                                                            Edit Bill By Vehicle No
                                                                        </a>-->


                                    <!--                                    <a href="add_customer.php">
                                                                            <i class="metismenu-icon pe-7s-display2"></i>
                                                                            Manage Customer
                                                                        </a>
                                                                        <a href="add_boat.php">
                                                                            <i class="metismenu-icon pe-7s-display2"></i>
                                                                            Boat Detail
                                                                        </a>
                                                                        <a href="add_milk_rate.php">
                                                                            <i class="metismenu-icon pe-7s-display2"></i>
                                                                            દુધ ભાવની માહિતી
                                                                        </a>-->


                                </li>

                                <li class="app-sidebar__heading">Report</li>
                                <li>
                                    <!--                                    <a href="milk_daily_report.php">
                                                                            <i class="metismenu-icon pe-7s-cart"></i>
                                                                            Daily Milk Report
                                                                        </a>
                                                                        <a href="milk_monthly_report.php">
                                                                            <i class="metismenu-icon pe-7s-notebook"></i>
                                                                            Monthly Milk Report
                                                                        </a>-->
                                </li>
                                <li>
                                    <a href="patrak_1_family_detail_report.php">
                                        <i class="metismenu-icon pe-7s-cart"></i>
                                        Patrak 1 Family Detail Report
                                    </a>
                                    <a href="patrak_2_common_detail_report.php">
                                        <i class="metismenu-icon pe-7s-cart"></i>
                                        Patrak 2 Common Detail Report
                                    </a>
                                </li>
                                <!--<li class="app-sidebar__heading">Manage</li>-->
                                <!--                                <li>
                                                                    <a href="change_password.php">
                                                                        <i class="metismenu-icon pe-7s-display2"></i>
                                                                        Change Password
                                                                    </a>
                                
                                                                    <a href="JavaScript:Void(0);" id="btn-logout">
                                                                        <i class="metismenu-icon pe-7s-display2"></i>
                                                                        Logout
                                                                    </a>
                                                                </li>-->


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


                <script>
                    $(document).ready(function () {

                        $('.btn').focus(function () {
//            alert("focus");
                            $(this).css({'border': '2px solid #3f6ad8'});
                        });
                        $('#btn-logout').click(function () {
//                alert('logout');
                            var send = {'logout': 'logout'};
                            $.ajax({
                                url: './PHP_Code/session_destroy.php',
                                type: 'POST',
                                data: send,
                                success: function (data)
                                {
                                    debugger;
//                        alert('data ' + data);
                                    window.location.href = "./login.php";

                                },
                                error: function (err) {
                                    alert('error ' + err);
                                }
                            });
                        });


//                        $('#btn_about_click').click(function () {
//                            var url = "http://localhost/E_Bill_Software_2021_Patel_Trading/about.php";
//                            window.open(url, '_blank');
//                        });
                    })
                </script>