<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); 

//define('SITEURL','http://localhost/design2/');
include_once('database_connection.php');
    // define the path and name of cached file
 /*   $cachefile = 'v2'.date('M-d-Y').'.html';
    // define how long we want to keep the file in seconds. I set mine to 5 hours.
    $cachetime = 18000;
    // Check if the cached file is still fresh. If it is, serve it up and exit.
    if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile)) {
    include($cachefile);
        exit;
    }
    // if there is either no file OR the file to too old, render the page and capture the HTML.
    ob_start();*/
?>
<!DOCTYPE html>
<!-- saved from url=(0034)<?php echo SITEURL;?> -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keywords" content="">

     <meta name="author" content="ITS Circle LLC">
    <link rel="icon" href="<?php echo SITEURL;?>assets/images/favicon.png" type="image/x-icon">
    <link rel="shortcut icon" href="<?php echo SITEURL;?>assets/images/favicon.png" type="image/x-icon">
    <title>Vision 7i</title>

    <!--Google font-->
    
    <!-- <link href="//fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Raleway:300,400,500,600,700" rel="stylesheet"> -->
    <!-- Font Awesome -->
    <link rel="stylesheet" type="text/css" href="assets/css/fontawesome.css">

    <!-- ico-font -->
    <link rel="stylesheet" type="text/css" href="assets/css/icofont.css">

    <!-- Themify icon -->
    <link rel="stylesheet" type="text/css" href="assets/css/themify.css">

    <!-- Flag icon -->
    <link rel="stylesheet" type="text/css" href="assets/css/flag-icon.css">

    <!-- prism css -->
    <link rel="stylesheet" type="text/css" href="assets/css/prism.css">

    <!-- Owl css -->
    <link rel="stylesheet" type="text/css" href="assets/css/owlcarousel.css">

    <!-- Bootstrap css -->
    <link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css">

    <!-- App css -->
    <link rel="stylesheet" type="text/css" href="assets/css/style.css">

    <!-- Responsive css -->
    <link rel="stylesheet" type="text/css" href="assets/css/responsive.css">
    <style>
        .nav-pills .nav-link:not(.active), .nav-pills .show > .nav-link {
            background-color: #f9f4ff;
        }

        .custom-scrollbar.slim::-webkit-scrollbar {
            
            height: 5px;
        }
    </style>

<style type="text/css">.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}</style>

</head>
<body>

<!-- Loader starts -->

<!-- Loader ends -->

<!--page-wrapper Start-->
<div class="page-wrapper">

    <!--Page Header Start-->
    <div class="page-main-header">
        <div class="main-header-left">
            <div class="logo-wrapper">
                <a href="<?php echo SITEURL;?>index.aspx">
                    <img src="assets/images/its-logo.png" class="image-dark" alt="">
                    <img src="assets/images/its-logo-invert.png" class="image-light" alt="">
                </a>
            </div>
        </div>
        <div class="main-header-right row">
            <div class="mobile-sidebar">
                <div class="media-body text-right switch-sm">
                    <label class="switch">
                        <input type="checkbox" id="sidebar-toggle" checked="">
                        <span class="switch-state"></span>
                    </label>
                </div>
            </div>
            <div class="nav-right col">
                <ul class="nav-menus">
                    <div style="width: 80%;text-align: left;">
                    <li id="menuList" class="custom-scrollbar slim" style="a: left;margin: 0;padding: 0;max-height: 40px;list-style-type: none;max-height: 100%;overflow: hidden;display: inline-block;overflow-x:auto;width: 100%;/* max-width:500px; */display: grid;">

                        <ul class="nav nav-pills custom-scrollbar slim" id="pills-icontab" role="tablist" style="margin: 0;padding: 0;/* max-height: 40px; *//* list-style-type: none; */line-height: 26px;/* max-height: 40px; */overflow: hidden;display: inline-block;white-space: nowrap;overflow-x:auto;position:relative;">
                            
                            <li class="nav-item">
                                <a class="nav-link active" id="pills-0-tab" data-toggle="pill" href="<?php echo SITEURL;?>/#pills-0" role="tab" aria-controls="pills-0" aria-selected="false">
                                    <i class="icon-desktop icon-sidebar" style="margin-left:0px;margin-right:5px;font-size:10px"></i>Dashboard<i class="icon-close" onclick="closeTab(this,&#39;0&#39;)" style="margin-left:5px;margin-right:0px;font-size:10px"></i>
                                </a>
                            </li>

                
                            
                        </ul>


                    </li>
                    </div>
<!-- 
                    <li >
                        <form class="form-inline search-form">
                            <div class="form-group">
                                <label class="sr-only">Email</label>
                                <input type="search"  class="form-control-plaintext" placeholder="Search.." >
                                <span class="d-sm-none mobile-search">
                                </span>
                            </div>
                        </form>
                    </li>
                     -->
                    <li>
                        <a href="<?php echo SITEURL;?>#!" onclick="javascript:toggleFullScreen()" class="text-dark">
                            <img class="align-self-center pull-right mr-2" src="<?php echo SITEURL;?>assets/images/browser.png" alt="header-browser">
                        </a>
                    </li>
                    <!-- <li class="onhover-dropdown">
                        <a href="#!" class="txt-dark">
                            <img class="align-self-center pull-right mr-2" src="./assets/images/dashboard/translate.png" alt="header-translate">
                        </a>
                        <ul class="language-dropdown onhover-show-div p-20">
                            <li>
                                <a href="#" data-lng="en">
                                    <i class="flag-icon flag-icon-ws"></i> English
                                </a>
                            </li>
                            <li>
                                <a href="#" data-lng="es">
                                    <i class="flag-icon flag-icon-va"></i> Spanish
                                </a>
                            </li>
                            <li>
                                <a href="#" data-lng="pt">
                                    <i class="flag-icon flag-icon-id"></i> Portuguese
                                </a>
                            </li>
                            <li>
                                <a href="#" data-lng="fr">
                                    <i class="flag-icon flag-icon-fr"></i> French
                                </a>
                            </li>
                        </ul>
                    </li>
                     -->
                    <li class="onhover-dropdown">
                        <a href="<?php echo SITEURL;?>#!" class="txt-dark">
                            <img class="align-self-center pull-right mr-2" src="<?php echo SITEURL;?>assets/images/notification.png" alt="header-notification">
                            <span class="badge badge-pill badge-primary notification"></span>
                        </a>
                        <ul class="notification-dropdown onhover-show-div">
                            <li>Notification <span class="badge badge-pill badge-secondary text-white text-uppercase pull-right">0 New</span></li>
                            <!-- <li>
                                <div class="media">
                                    <i class="align-self-center notification-icon icofont icofont-shopping-cart bg-primary"></i>
                                    <div class="media-body">
                                        <h6 class="mt-0">Your order ready for Ship..!</h6>
                                        <p class="mb-0">Lorem ipsum dolor sit amet, consectetuer elit.</p>
                                        <span><i class="icofont icofont-clock-time p-r-5"></i>Just Now</span>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="media">
                                    <i class="align-self-center notification-icon icofont icofont-download-alt bg-success"></i>
                                    <div class="media-body">
                                        <h6 class="mt-0 txt-success">Download Complete</h6>
                                        <p class="mb-0">Lorem ipsum dolor sit amet, consectetuer elit.</p>
                                        <span><i class="icofont icofont-clock-time p-r-5"></i>5 minutes ago</span>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <div class="media">
                                    <i class="align-self-center notification-icon icofont icofont-recycle bg-danger"></i>
                                    <div class="media-body">
                                        <h6 class="mt-0 txt-danger">250 MB trush files</h6>
                                        <p class="mb-0">Lorem ipsum dolor sit amet, consectetuer elit.</p>
                                        <span><i class="icofont icofont-clock-time p-r-5"></i>25 minutes ago</span>
                                    </div>
                                </div>
                            </li> -->
                            <li class="text-center">You have Checked <a href="<?php echo SITEURL;?>#">all</a> notification  </li>
                        </ul>

                    </li>
                    <li class="onhover-dropdown">
                        <div class="media  align-items-center">
                            <img class="align-self-center pull-right mr-2" src="<?php echo SITEURL;?>assets/images/user.png" alt="header-user">
                            <div class="media-body">
                                <h6 class="m-0 txt-dark f-16">
                                    
                                    <i class="fa fa-angle-down pull-right ml-2"></i>
                                </h6>
                            </div>
                        </div>
                        <ul class="profile-dropdown onhover-show-div p-20">
                            <li>
                                <a href="<?php echo SITEURL;?>#">
                                    <i class="icon-user"></i>
                                    </a><a href="<?php echo SITEURL;?>#" onclick="changePassword()">Change Passord</a>
                                
                            </li>
                            <!-- <li>
                                <a href="#">
                                    <i class="icon-email"></i>
                                    Inbox
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <i class="icon-check-box"></i>
                                    Task
                                </a>
                            </li>
                            <li>
                                <a href="#">
                                    <i class="icon-comments"></i>
                                    Chat
                                </a>
                            </li> -->
                            <li>
                                <a href="<?php echo SITEURL;?>#">
                                    <i class="icon-power-off"></i>
                                    </a><a href="<?php echo SITEURL;?>#" onclick="formlogout()">Logout</a>
                                
                            </li>
                        </ul>
                    </li>
                </ul>
                <div class="d-lg-none mobile-toggle">
                    <i class="icon-more"></i>
                </div>
            </div>
        </div>
    </div>
    <!--Page Header Ends-->

    
    <!--Page Body Start-->
    <div class="page-body-wrapper" style="padding-left:0px!important;padding-right:0px!important">
        <!--Page Sidebar Start-->
        <div class="page-sidebar custom-scrollbar  navigation-bordered">
            <div class="sidebar-user text-center">
                <div>
                    <!-- <img class="img-50 rounded-circle" src="./assets/images/custom/its-logo.png" alt="#"> -->
                    <img class="img-50 rounded-circle" src="<?php echo SITEURL;?>assets/images/1.png" alt="#">

                </div>
                <h6 class="mt-3 f-12" id="user_name">anas.k@almutakamela.ae</h6>
            </div>
            <ul class="sidebar-menu" id="main-page-sidebar">
                
<!-- 
                <li>
                    <div class="sidebar-title">General</div>
                    <a href="sample-page.html" class="sidebar-header">
                        <i class="icon-file"></i><span> Sample page</span>
                    </a>
                </li> -->

                
                <li class="active">
                    
                    <a href="<?php echo SITEURL;?>#"  class="sidebar-header active">
                        <i class="icon-desktop icon-sidebar"></i><span class="sub-header-title">Dashboard</span>
                    </a>
                </li>
                <li>
<div class="sidebar-title">Sales Module</div>
        <a href="<?php echo SITEURL;?>#" class="sidebar-header">
           <i class="icon-menu-alt icon-sidebar"></i><span class="sub-header-title">Sales Entry</span>
           <i class="fa fa-angle-right pull-right"></i>
        </a>        <ul class="sidebar-submenu">
<li><a href="<?php echo SITEURL;?>dashboard.php"><i class="fa fa-angle-right"></i>Dealers</a></li>
<li><a href="<?php echo SITEURL;?>visit.php" ><i class="fa fa-angle-right"></i>Visits</a></li>

</ul>
</li>

</ul>
            <div class="sidebar-widget text-center">
                <div class="sidebar-widget-top">
                    <h6 class="mb-2 fs-14">Need Help</h6>
                    <i class="icon-bell"></i>
                </div>
                <div class="sidebar-widget-bottom p-10 m-10">
                    <p>+971 43 811 851 (Ext.151)
                        <br>itsupport@almutakamela.ae
                        <!-- <br>ITSUPPORT@ALMUTAKAMELA.AE -->
                        <!-- <br><a href="#">Visit FAQ</a> -->
                    </p>
                </div>
            </div>
        </div>
        <!--Page Sidebar Ends-->

        <div class="page-body" style="padding-left:0px!important;padding-right:0px!important">

            <div class="tab-content" id="pills-icontabContent">
                <div class="tab-pane fade show active" id="pills-0" role="tabpanel" aria-labelledby="pills-0-tab">
                     <iframe src="<?php echo SITEURL;?>viewvisits.php?sidebarid=21#basic" class="container-fluid" style="position:absolute; overflow:hidden; height:100%;border:none;padding-right:0px!important;padding-left:0px!important;" id="frame_body"></iframe> -->
                </div>

            </div>
            


                <!--   -->
            <!--   -->

            <!-- Container-fluid starts -->

            <!-- Container-fluid Ends -->
        </div>
        <!--Page Body Ends-->
    </div>
    <!--Page Body Ends-->

</div>
<!--page-wrapper Ends-->
<?php
/*

<!-- latest jquery-->
<script src="<?php echo SITEURL;?>assets/js/jquery-3.2.1.min.js"></script>

<!-- Bootstrap js-->
<script src="<?php echo SITEURL;?>assets/js/popper.min.js"></script>
<script src="<?php echo SITEURL;?>assets/js/bootstrap/bootstrap.js"></script>



<!-- Chart JS-->
<script src="<?php echo SITEURL;?>assets/js/chart/Chart.min.js"></script>

<!-- Morris Chart JS-->
<script src="<?php echo SITEURL;?>assets/js/morris-chart/raphael.js"></script>
<script src="<?php echo SITEURL;?>assets/js/morris-chart/morris.js"></script>

<!-- owlcarousel js-->
<script src="<?php echo SITEURL;?>assets/js/owl.carousel.js"></script>

<!-- Sidebar jquery-->
<script src="<?php echo SITEURL;?>assets/js/sidebar-menu.js"></script>

<!--Sparkline  Chart JS-->
<script src="<?php echo SITEURL;?>assets/js/sparkline/sparkline.js"></script>

<!--Height Equal Js-->
<script src="<?php echo SITEURL;?>assets/js/height-equal.js"></script>

<!-- prism js -->
 <script src="<?php echo SITEURL;?>assets/js/prism/prism.min.js"></script> 

<!-- clipboard js -->
<script src="<?php echo SITEURL;?>assets/js/clipboard/clipboard.min.js"></script>

<!-- custom card js  -->
<script src="<?php echo SITEURL;?>assets/js/custom-card/custom-card.js"></script>

<!-- Theme js-->
<script src="<?php echo SITEURL;?>assets/js/script.js"></script>
<!-- <script src="./assets/js/theme-customizer/customizer.js"></script> -->
<!-- <script src="./assets/js/chat-sidebar/chat.js"></script> -->
<!-- <script src="./assets/js/dashboard-default.js" ></script> -->


<!-- Counter js-->
<script src="<?php echo SITEURL;?>assets/js/jquery.waypoints.min.js"></script>
<script src="<?php echo SITEURL;?>assets/js/jquery.counterup.min.js"></script>
<script src="<?php echo SITEURL;?>assets/js/counter-custom.js"></script>

<script src="<?php echo SITEURL;?>assets/js/bootstrap-notify.min.js"></script>
<script src="<?php echo SITEURL;?>assets/js/index.js"></script>

<script src="<?php echo SITEURL;?>assets/js/bootbox.min.js"></script>

*/?>
<script>

    var previousLink;
    var globalWebServicePath = "./";

    var tabDiv = $('#pills-icontabContent');
    var pillsDiv=$('#pills-icontab');
    
    function closeTab(sender,mySBID)
    {
        bootbox.confirm({
            title: "Confirmation",
            message: "Close this tab?",
            buttons: {
                cancel: {
                    label: '<i class="fa fa-times"></i> Cancel'
                },
                confirm: {
                    label: '<i class="fa fa-check"></i> Confirm'
                }
            },
            callback: function (result) {
            
                if (!result) return;
                $(sender).parents('li.nav-item').remove();
                
                $("div#pills-"+mySBID).remove();
                
                
                if ($('#pills-icontab>li.nav-item').length>0)
                {
                    $('#pills-icontab>li.nav-item:last>a.nav-link').click();
                }
                // <ul class="nav nav-pills custom-scrollbar slim" id="pills-icontab" role="tablist" style="margin: 0;padding: 0;/* max-height: 40px; *//* list-style-type: none; */line-height: 26px;/* max-height: 40px; */overflow: hidden;display: inline-block;white-space: nowrap;overflow-x:auto;position:relative;">
                    
                //     <li class="nav-item">
                //         <a class="nav-link active" id="pills-0-tab" data-toggle="pill" href="#pills-0" role="tab" aria-controls="pills-0" aria-selected="false">
                //             <i class="icon-desktop icon-sidebar" style="margin-left:0px;margin-right:5px;font-size:10px"></i>Dashboard<i class="icon-close" onclick="closeTab(this,'0')"  style="margin-left:5px;margin-right:0px;font-size:10px"></i>
                //         </a>
                //     </li>

        
                    
                // </ul>


                    

            }
        });
    }
    
    function navigateTo(sender,pageLink,sideBarName,sideBarID,flag)
    {
        if (flag=="1")
        {
            window.location = pageLink;
            return;
        }
        else if (flag=="2")
        {
            window.open( pageLink, "_blank"); 
            return;
        }
        
        
        if (sender)
        {
            $('.sidebar-menu>li.active').removeClass('active');
            $('.sidebar-submenu a.active').removeClass('active');

            $(sender).addClass('active');
            $(sender).parents('ul').first().parent("li").addClass('active');
            var checkElement = $(sender).parents('ul').first();

            pageLink = pageLink + (pageLink.indexOf("?") == -1 ? "?" : "&") + "refresh=" + Math.random();
            pageLink = pageLink + "&sidebarname=" + sideBarName + "&sidebarid=" + sideBarID;

            //console.log(pageLink)
            //$('#frame_body').attr('src',pageLink)
            previousLink = sender;

        }

        var mySBID;
        
        mySBID = sideBarID;
        mySBID = $('#pills-icontabContent').children('div.tab-pane').length;

        
        var tabHTML='\n'+
        '<li class="nav-item">\n'+
        '    <a class="nav-link" id="pills-' + mySBID + '-tab" data-toggle="pill" href="#pills-'+ mySBID +'" role="tab" aria-controls="pills-'+ mySBID +'" aria-selected="false">\n'+
        '        <i class="icon-desktop icon-sidebar" style="margin-left:0px;margin-right:5px;font-size:10px"></i>'+ sideBarName +'<i class="icon-close" onclick="closeTab(this,\'' + mySBID +'\')"  style="margin-left:5px;margin-right:0px;font-size:10px"></i>\n'+
        '    </a>\n'+
        '</li>\n';

        pillsDiv.append(tabHTML);

        var tabPAGE = '\n'+
        //'<div class="tab-content" id="pills-icontabContent">\n'+
        '    <div class="tab-pane fade show" id="pills-'+mySBID+'" role="tabpanel" aria-labelledby="pills-' + mySBID +'-tab">\n'+
        '        <iframe src="' + pageLink + '" class="container-fluid" style="position:absolute; overflow:hidden; height:100%;border:none;padding-right:0px!important;padding-left:0px!important;" ></iframe>\n'+
        '    </div>\n'+
        '\n';
        
        tabDiv.append(tabPAGE);
        
        
        $("#pills-"+mySBID+ "-tab").click();
        

        //$('#menuList').scrollTo("#pills-"+mySBID+ "-tab");
        $("#pills-"+mySBID+ "-tab")[0].scrollIntoView(true);


        // checkElement.slideUp(300, function() {
        //      checkElement.removeClass('menu-open');
        // });
        

        //$('.switch-state').click();--Removed by mr. Anas

        //alert(pageLink)
        //SetCookies();
    }
    function loadSideBar()
    {
        var SideBar = $('#main-page-sidebar');

        $.ajax({
            url: globalWebServicePath + '/WebService_Inventroid.asmx/GetSideBar', 
            dataType: 'JSON',
            type: 'GET',
            async: true,

            beforeSend: function()
            {
                // var el = $(SideBar).closest("div.page-sidebar");
                // App.blockUI({target: el,animate: true,overlayColor: 'none'});
            },
            complete: function()
            {
                // var el = $(SideBar).closest("div.page-sidebar");
                // App.unblockUI(el);
            },

            success: function (ourData, textStatus, XMLHttpRequest) {
                // <li>
                //     <a href="#" class="sidebar-header">
                //         <i class="icon-shopping-cart-full icon-sidebar"></i><span class="sub-header-title">Accounts</span>
                //         <i class="fa fa-angle-right pull-right"></i>
                //     </a>
                //     <ul class="sidebar-submenu">
                //         <li><a href="#" onclick="javascript: navigateTo(this, './pages/accounts_group.html')"><i class="fa fa-angle-right"></i>Accounts Group</a></li>
                //         <li><a href="#" onclick="javascript: navigateTo(this, './pages/ledger.html')"><i class="fa fa-angle-right"></i>Create Ledger</a></li>
                //         <li><a href="#" onclick="javascript: navigateTo(this, './pages/vouchers.html')"><i class="fa fa-angle-right"></i>Vouchers</a></li>
                //         <li><a href="#" onclick="javascript: navigateTo(this, './reportViewer.aspx?isDebug=1&refresh=1&reportFileName=reports/ChartOfAccounts.trdx')"><i class="fa fa-angle-right"></i>Chart Of Accounts Report</a></li>

                //         <li><a href="#" onclick="javascript: navigateTo(this, './reportViewer.aspx?isDebug=1&refresh=1&reportFileName=reports/TrialBalanceReport.trdx')"><i class="fa fa-angle-right"></i>Trial Balance Report</a></li>
                //         <li><a href="#" onclick="javascript: navigateTo(this, './reportViewer.aspx?isDebug=1&refresh=1&reportFileName=reports/LedgerReport.trdx')"><i class="fa fa-angle-right"></i>Ledger Wise Statement Report</a></li>
                //         <li><a href="#" onclick="javascript: navigateTo(this, './reportViewer.aspx?isDebug=1&refresh=1&reportFileName=reports/VoucherReport.trdx')"><i class="fa fa-angle-right"></i>Voucher Report</a></li>


                //     </ul>
                // </li>

                var data = ourData;
                for (var i=0; i<data.sidebar.length; i++)
                {
                    var start_tag= "";
                    if (i==0)
                        start_tag = "start active open";
                    
                    var separator = "";
                    if (data.sidebar[i].separator)
                    {
                        separator='<div class="sidebar-title">'+ (data.sidebar[i].separator+'') +'</div>\n';
                    }
                    
                    var coding = '<li>\n'+
                    separator +
                    '        <a href="#" class="sidebar-header">\n'+
                    '           <i class="' + data.sidebar[i].sidebarpicture + ' icon-sidebar"></i><span class="sub-header-title">'+ data.sidebar[i].sidebarname +'</span>\n'+
                    '           <i class="fa fa-angle-right pull-right"></i>\n'+
                    '        </a>';
                    coding+='        <ul class="sidebar-submenu">\n';
                    
                    for (var j = 0; j<data.sidebar[i].children.length; j++)
                    {
                        
                        coding+='<li><a href="#" onclick="javascript: navigateTo(this, \'' + data.sidebar[i].children[j].urllink +'\', \'' + data.sidebar[i].children[j].sidebarname +'\', \'' + data.sidebar[i].children[j].sidebarid +'\', \'' + data.sidebar[i].children[j].flag +'\' )"><i class="fa fa-angle-right"></i>' + data.sidebar[i].children[j].sidebarname  + '</a></li>\n';
                        // coding+='                <li class="nav-item ">\n'+// start active open
                        // '                   <a href="'+ data.sidebar[i].children[j].urllink +'" class="ajaxify nav-link ">\n'+
                        // '\n'+
                        // // '                       <img id="sidebar-children-icon" src="' + data.sidebar[i].children[j].sidebarpicture + '">\n'+
                        // '                     <i class="fa ' + data.sidebar[i].children[j].sidebarpicture + '"></i>\n'+
                        // '\n'+
                        // '                       <span class="title" id="sidebar-children">' + data.sidebar[i].children[j].sidebarname  + '</span>\n'+
                        // '                       <span class="selected"></span>\n'+
                        // '                   </a>\n'+
                        // '               </li>\n';
                        
                    }
                    coding+='</ul>\n';
                    coding+='</li>\n';

                    //console.log(coding)
                    $(SideBar).append(coding);
                    coding="";
                    // console.log(coding);
                }//For Loop

                //$('.page-sidebar li > a.ajaxify:first').click();
            },
            // error: function (XMLHttpRequest, textStatus, errorThrown) {console.log(XMLHttpRequest);console.log(textStatus);console.log(errorThrown);alert('error');}
        });
    }
    function changePassword(){
        navigateTo(null,"./pages/reset-password.html","Change password",-1);
    }
    function formlogout() {
        $.ajax({

            url: globalWebServicePath + '/WebService_Inventroid.asmx/AbandonSession',

            dataType: 'JSON',
            type: 'GET',
            async: true,
            success: function (data, textStatus, XMLHttpRequest) {
            
                window.location.replace("./index.aspx");
                return true;

            },
            error: function () {
                // alert('x')
            }

        });
    }

    //loadSideBar();

    window.user_UserName = "";
    window.user_EmployeeName = "";
    
    window.user_SetUser = function (user_name,employee_name) {
        window.user_UserName = user_name;
        window.user_EmployeeName = employee_name;

        $('#user_name').html(window.user_UserName)
    };

</script>

</body></html>
<?php 
  /*  // We're done! Save the cached content to a file
    $fp = fopen($cachefile, 'w');
    fwrite($fp, ob_get_contents());
    fclose($fp);
    // finally send browser output
    ob_end_flush();*/
?>