 <!-- /.content-wrapper -->
  <footer class="main-footer">
    <strong>Copyright &copy; 2019 <a href="#">Zeesoft</a>.</strong>
    All rights reserved.
    <div class="float-right d-none d-sm-inline-block">
      <b>Version</b> 3.0.0-alpha
    </div>
  </footer>

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
  </aside>
  <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->

<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
  $.widget.bridge('uibutton', $.ui.button)
</script>
<!-- OPTIONAL SCRIPTS -->
<script src="plugins/chart.js/Chart.min.js"></script>
<script src="dist/js/demo.js"></script>
<script src="dist/js/pages/dashboard3.js"></script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Morris.js charts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="plugins/morris/morris.min.js"></script>
<!-- Sparkline -->
<script src="plugins/sparkline/jquery.sparkline.min.js"></script>
<!-- jvectormap -->
<script src="plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- jQuery Knob Chart -->
<script src="plugins/knob/jquery.knob.js"></script>
<!-- daterangepicker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
<script src="plugins/daterangepicker/daterangepicker.js"></script>
<!-- datepicker -->
<script src="plugins/datepicker/bootstrap-datepicker.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.all.min.js"></script>
<!-- Slimscroll -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="dist/js/pages/dashboard.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<!-- DataTables -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>

<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>


<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>





<!-- page script -->
<script>
  $(function () {
   
    $('#example2').DataTable({
      "paging": true,
      "lengthChange": true,
      "searching": true,
      "ordering": true,
      "info": true,
      "autoWidth": true
    });
  });

  $(document).ready(function(){
      
   $("#Graph").click(function(){
      $("#homeDAta").css("display","block");
      $("#userDATA").css("display","none");
   })
   
   // $("#showUsers").click(function(){
   //    $("#homeDAta").css("display","none");
   //    $("#userDATA").css("display","block");

   // })
  })


 $(document).ready(function () {
            showGraph();
        });


        function showGraph()
        {
            {
                $.post("data.php",
                function (data)
                {
                   
                     var name = [];
                    var marks = [];

                    for (var i in data) {
                    
                    if( data[i].NUM > 50){    
                        name.push(data[i].shortname);
                        marks.push(data[i].NUM);
                    }
                        
                    }

                      var sum = 0;
                      for(var i=0; i < marks.length; i++){
                          sum += parseInt(marks[i]);
                          
                      }
                      $("#demo2").html("(Total "+sum+" )");
                    var chartdata = {
                        labels: name,
                        datasets: [
                            {
                                label: "Total leads",
                                backgroundColor: ["#35ACF7","#018866", "#722F37", "#722F37", "#1B3808","#633E13", "#633E13","#E62277","#989928","#6F2DA8","#7CF944","#FE2416","#35ACF7","#FCDE52","#35ACF7","#63734F","#63734F","#35ACF7","#63734F","#C71E84","#35ACF7","#7CF944","#63734F","#63734F"],
                                borderColor: '#46d5f1',
                                hoverBackgroundColor: '#CCCCCC',
                                hoverBorderColor: '#666666',
                                data: marks
                            }
                        ]
                    };

                    var graphTarget = $("#visitors-chart1");

                    var barGraph = new Chart(graphTarget, {
                        type: 'bar',
                        data: chartdata
                    });
                      var canvas = document.getElementById('visitors-chart1');
            canvas.onclick = function (evt) {
        var activePoints = barGraph.getElementsAtEventForMode(evt, 'point', barGraph.options);
        var firstPoint = activePoints[0];
        var label =barGraph.data.labels[firstPoint._index];
        var value =barGraph.data.datasets[firstPoint._datasetIndex].data[firstPoint._index];
        var nameDomain = label;
          $.post("response.php",{nameDomain:nameDomain},function(data){
              $("#userDATA").css("display","none");
              $("#homeDAta").html(data);
          })
    };

                });
            }
        }
 $(document).ready(function () {
            showGraph3();
        });


        function showGraph3()
        {
            {
               $.post("weekData.php",
                function (data)
                {
               
                     var name = [];
                    var marks = [];
                    var m = 0;
                    for (var i in data) {

                        
                        name.push(data[i].Day);
                        marks.push(data[i].Visits);

                       
                        
                    }

                       var sum = 0;
                      for(var i=0; i < marks.length; i++){
                          sum += parseInt(marks[i]);
                          $("#demo").html("(Total "+sum+" )")
                      }
                      
                    var chartdata = {
                        labels: name,
                        datasets: [
                            {
                                label: 'Total Leads',
                                backgroundColor: ["#35ACF7","#018866", "#722F37", "#722F37", "#1B3808","#633E13", "#633E13"],
                                borderColor: '#46d5f1',
                                hoverBackgroundColor: '#CCCCCC',
                                hoverBorderColor: '#666666',
                                data: marks
                            }
                        ]
                    };

                    var graphTarget = $("#visitors-chart3");

                    var barGraph = new Chart(graphTarget, {
                        type: 'line',
                        data: chartdata
                    });
                });
            }
        }
       
       
        $(document).ready(function () {
            showGraph4();
        });


        function showGraph4()
        {
            {
               $.post("weekData.php?dailySell=true",
                function (data)
                {
               
                     var name = [];
                    var marks = [];

                    for (var i in data) {

                        
                        name.push(data[i].Day);
                        marks.push(data[i].total);

                        
                    }
                    
                    var chartdata = {
                        labels: name,
                        datasets: [
                            {
                                label: 'Total Sell $',
                                backgroundColor: ["#35ACF7","#018866", "#722F37", "#722F37", "#1B3808","#633E13", "#633E13"],
                                borderColor: '#46d5f1',
                                hoverBackgroundColor: '#CCCCCC',
                                hoverBorderColor: '#666666',
                                data: marks
                            }
                        ]
                    };

                    var graphTarget = $("#sellDaily");

                    var barGraph = new Chart(graphTarget, {
                        type: 'line',
                        data: chartdata
                    });
                });
            }
        }
        $(document).ready(function () {
            showGraph5();
        });


        function showGraph5()
        {
            {
               $.post("weekData.php?monthSell=true",
                function (data)
                {
               
                     var name = [];
                    var marks = [];

                    for (var i in data) {

                        
                        name.push(data[i].month);
                        marks.push(data[i].total);

                        
                    }

                    var chartdata = {
                        labels: name,
                        datasets: [
                            {
                                label: 'Total Sell $',
                                backgroundColor: ["#35ACF7","#018866", "#722F37", "#1B3808","#633E13","#6F2DA8","#7CF944","#FE2416","#35ACF7","#FCDE52","#35ACF7","#63734F","#63734F","#35ACF7","#63734F","#C71E84","#35ACF7"],
                                borderColor: '#46d5f1',
                                hoverBackgroundColor: '#CCCCCC',
                                hoverBorderColor: '#666666',
                                data: marks
                            }
                        ]
                    };

                    var graphTarget = $("#monthSell");

                    var barGraph = new Chart(graphTarget, {
                        type: 'bar',
                        data: chartdata
                    });
                });
            }
        }
// function For get reponse from reponse.php 


$(document).ready(function(){

   $("#showUsers").click(function(){
      var showUsers = "ip";
      $.post("response.php",{showUsers:showUsers},function(data){
        $("#homeDAta").css("display","none");
        $("#userDATA").css("display","block");
        $("#ExportDiv").css("display","block");
        $("#mainCard").html(data);
      })
    })
    
    $("#ipUser").click(function(){
      var ipUser = "ip";
      $.post("response.php",{ipUser:ipUser},function(data){
        $("#homeDAta").css("display","none");
        $("#ExportDiv").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
      })
    })

     $("#decline").click(function(){
      var decline = "decline";
      $.post("response.php",{decline:decline},function(data){

        $("#homeDAta").css("display","none");
         $("#ExportDiv").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
      })
    })
    
    $("#cancel").click(function(){
      var cancel = "cancel";
      $.post("response.php",{cancel:cancel},function(data){

        $("#homeDAta").css("display","none");
         $("#ExportDiv").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
      })
    })
    
    $("#pending").click(function(){
      var pending = "pending";
      $.post("response.php",{pending:pending},function(data){

        $("#homeDAta").css("display","none");
         $("#ExportDiv").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
      })
    })

   $("#advanceSearch").click(function(){
      var date =  $('#reportrange span').html();
       var type =  $('#cus_date').val();
     
      $.post("response.php",{date:date,type:type},function(data){
        $("#homeDAta").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
      })
      
    })

   $("#Export").click(function(){
       var type = $("#type").val();
       var bank = $("#bank").val();
      
      var exportDate =  $('#reportrange2 span').html();
      window.location.href ="response.php?exportDate="+exportDate+"&type="+type+"&bank="+bank;
      
    })

   $("#reporting").click(function(){
     var reporting = "report";
       $.post("response.php",{reporting:reporting},function(data){
        
        $("#userDATA").css("display","none");
        $("#homeDAta").html(data);
      })
   })

   $("#homeDAta").on("click","#customGraph",function(){
        var dateGraph    =  $('#dateGraph').val();
        var webname = $("#websitename").val();
        
        //window.location.href ="WeekData.php?dateGraph="+dateGraph+"&webname="+webname;
       $.getJSON( "weekData.php?dateGraph="+dateGraph+"&webname="+webname, function( data ) {
          $(".chart").html("");

          var convas = '<canvas id="barChart3" style="height: 266px; width: 532px;" width="532" height="266"></canvas>';
           $("#monthTitle").html("");
           $("#monthTitle").html(webname+" "+dateGraph+" days Leads");
          $(".chart").html(convas);
          console.log(data);
                    var name = [];
                    var marks = [];
                    for (var i in data) {
                        name.push(data[i].Day);
                        marks.push(data[i].Visits);
                    }
                    var chartdata = {
                        labels: name,
                        datasets: [
                            {
                                label: 'Total Leads',
                                backgroundColor: ["#35ACF7","#018866", "#722F37", "#722F37", "#1B3808","#633E13", "#633E13"],
                                borderColor: '#46d5f1',
                                hoverBackgroundColor: '#CCCCCC',
                                hoverBorderColor: '#666666',
                                data: marks
                            }
                        ]
                    };
                    var graphTarget = $("#barChart3");
                    var barGraph = new Chart(graphTarget, {
                        type: 'bar',
                        data: chartdata
                    });
        });
      
   })


    $("#userDATA").on("click","#emailTo",function(){

        var payToEmail = $(this).data("value");
        $.post("response.php",{payToEmail:payToEmail},function(data){

        $("#homeDAta").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
        })
    })


    $("#Groups").click(function(){
      var groups = "groups";
      $.post("response.php",{groups:groups},function(data){
        $("#homeDAta").css("display","none");
        $("#userDATA").css("display","block");
        $("#ExportDiv").css("display","none");
        $("#cardData").css("display","none");
        $("#mainCard").html(data);
      })
    })
  
       $("#userDATA").on("click","#addGroup",function(){
    
      var addGroup ="addGroup";
        $.post("response.php",{addGroup:addGroup},function(data){

        $("#homeDAta").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
        })
    })
   $("#userDATA").on("click","input[name='addGroup']",function(){
      var values = [];
      var groupName = $("#groupName").val();
      var groupType = $("#groupType").val();
        $( ".tag" ).each(function( index ) {
          values.push($(this).text());
    // alert( index + ": " + $(this).text() );
});
        $.post("response.php",{values:values,groupName:groupName,groupType:groupType},function(data){
            alert(data);
        })
      
   })

   $("#userDATA").on("click","#viewGroup",function(){
        var groupId = $(this).data('value');
        $.post("response.php",{groupId:groupId},function(data){
        $("#homeDAta").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
        })
   });

   $("#userDATA").on("click","#editGroup",function(){
        var groupEditId = $(this).data('value');
        $.post("response.php",{groupEditId:groupEditId},function(data){
        $("#homeDAta").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
        })
   });

   $("#userDATA").on("click","#editGroupold",function(){
      var values = [];
      var editgroupName = $("#editgroupName").val();
      var editgroupType = $("#editgroupType").val();
      var id = $("#editGroupold").data("value");
      alert(id);
        $( ".tag" ).each(function( index ) {
          values.push($(this).text());
    // alert( index + ": " + $(this).text() );
});
        $.post("response.php",{values:values,editgroupName:editgroupName,editgroupType:editgroupType,id:id},function(data){
            alert(data);
        })
      
   })
   
   $("#userDATA").on("click","#userId",function(){
       var userId = $(this).data("value");
    var r = confirm("Are you sure you want to delete");
                if(r == true)
                {
         
    $.post('response.php',{userId:userId},function(data){
          alert(data);
           // window.location.href="index.php";

        });
                }else{
                    
                    
                }

   })
   
   $("#sellReport").click(function(){
     var sellReport = "report";
       $.post("response.php",{sellReport:sellReport},function(data){
        
        $("#userDATA").css("display","none");
        $("#homeDAta").html(data);
      })
   })
   
   $("#paidUser").click(function(){
      var paid = "decline";
      $.post("response.php",{paid:paid},function(data){

        $("#homeDAta").css("display","none");
         $("#ExportDiv").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
      })
    })
    
    $("#homeDAta").on("click","#customGraphDec",function(){
        var from = $("#from").val();
        var to   = $("#to").val();
        var webname = $("#websitenameDec").val();
       
        //window.location.href ="WeekData.php?dateGraph="+dateGraph+"&webname="+webname;
      $.getJSON( "countryData.php?from="+from+"&to="+to+"&webname="+webname, function( data ) {
          
          $(".chart").html("");

          var convas = '<canvas id="barChart3" style="height: 266px; width: 532px;" width="532" height="266"></canvas>';
          $("#monthTitle").html("");
          $("#monthTitle").html(webname+" "+from+ " to " +to+" Decline");
          $(".chart").html(convas);
         console.log(data);
                    var name = [];
                    var marks = [];
                    for (var i in data) {
                        name.push(data[i].shortname);
                        marks.push(data[i].total);
                    }
                    var chartdata = {
                        labels: name,
                        datasets: [
                            {
                                label: 'Total Leads',
                                backgroundColor: ["#35ACF7","#018866", "#722F37", "#722F37", "#1B3808","#633E13", "#633E13"],
                                borderColor: '#46d5f1',
                                hoverBackgroundColor: '#CCCCCC',
                                hoverBorderColor: '#666666',
                                data: marks
                            }
                        ]
                    };
                    var graphTarget = $("#barChart3");
                    var barGraph = new Chart(graphTarget, {
                        type: 'bar',
                        data: chartdata
                    });
        });
      
  })
$("#searchArea").click(function(){
    var searchAr = "search";
    $.post("response.php",{searchAr:searchAr},function(data){
        
        $("#homeDAta").html(data);
    })
})
 

 
$("#monthReport").click(function(){
    var montheReportSell = "sell";
    $.post("response.php",{montheReportSell:montheReportSell},function(data){
        
        $("#homeDAta").html(data);
    })
})

$("body").on("click",".profile",function(){
    
    
    var profile = $(this).data("value");
    $.post("response.php",{profile:profile},function(data){
        $("#cardData").css("display","none");
        $("#homeDAta").css("display","none");
         $("#ExportDiv").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
    })
})

$("#productReport").click(function(){
    var productReport = "report";
    $.post("response.php",{productReport:productReport},function(data){
        
        $("#homeDAta").html(data);
    })
})

$("#productdecline").click(function(){
    var productDecline = "productDecline";
    $.post("response.php",{productDecline:productDecline},function(data){
        
        $("#homeDAta").html(data);
    })
})
$("#productcancel").click(function(){
    var productcancel = " productcancel";
    $.post("response.php",{ productcancel: productcancel},function(data){
        
        $("#homeDAta").html(data);
    })
})
$("#productpending").click(function(){
    var productpending = "productpending";
    $.post("response.php",{productpending:productpending},function(data){
        
        $("#homeDAta").html(data);
    })
})
$("#productpaid").click(function(){
    var productpaid = "productpaid";
    $.post("response.php",{productpaid:productpaid},function(data){
        
        $("#homeDAta").html(data);
    })
})
 

$(".notificationView").click(function(){
    var notiView = $(this).data("value");
    $.post("response.php",{notiView:notiView},function(data){
        $("#homeDAta").html(data);
    })
})


$(".seeall").click(function(){
    var allMsg = "msg";
    $.post("response.php",{allMsg:allMsg},function(data){
        $("#homeDAta").html(data);
    })
})

});


$("#todayLeads").click(function(){
    var TodayLeads = "msg";
    $.post("response.php",{TodayLeads:TodayLeads},function(data){
        $("#homeDAta").html(data);
    })
});

 $("#homeDAta").on("click","#TodayLeadsSreach",function(){
      var TodayLeadsSreach = $('#reportrange span').html();
      $.post("response.php",{TodayLeadsSreach:TodayLeadsSreach},function(data){
        $("#homeDAta").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
      })
      
    })
    
    
$("#todayLeadsSell").click(function(){
    var TodayLeads = "msg";
    $.post("response.php",{todayLeadsSell:TodayLeads},function(data){
        $("#homeDAta").html(data);
    })
});

 $("#homeDAta").on("click","#TodaySellSreach",function(){
      var TodaySellSreach = $('#reportrange span').html();
      $.post("response.php",{TodaySellSreach:TodaySellSreach},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })


$("body").on("click","#addDispute",function(){
      var addDispute = "addDispute";
      $.post("response.php",{addDispute:addDispute},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })
    
$("body").on("click","#disputeManage",function(){
      var disputeManage = "addDispute";
      $.post("response.php",{disputeManage:disputeManage},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })

$("body").on("click",".view_dispute",function(){
   var disputeId = $(this).data('value');
      $.post("response.php",{disputeId:disputeId},function(data){
        $("#homeDAta").html('');
        $("#homeDAta").html(data);
      })
})


$("body").on("click","#updatedispute",function(){
  var updatedisputeId = $(this).data('value');
  var clientstatus    = $('#clientstatus').val();
   var status         = $('#status').val();
      $.post("response.php",{ updatedisputeId: updatedisputeId,clientstatus:clientstatus,status:status},function(data){
          alert(data);
        if(data == '1'){
            alert('dispute status Update successfully..');
            windo.location.href ='index.php';
        }
      })
})



$("body").on("click","#addRefund",function(){
      var addRefund = "addRefund";
      $.post("response.php",{addRefund:addRefund},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })
    
$("body").on("click","#RefundManage",function(){
      var RefundManage = "addRefund";
      $.post("response.php",{RefundManage:RefundManage},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })


$("body").on("change","#new_status",function(){
      var opt = $(this).val();
      if(opt == "Open"){
          $('#open_status').val('Bank Documnets');
      }else if(opt == "Close"){
          $('#open_status').val('Close By as');
      }
      
    })

$("body").on("click","#search",function(){
      var query = $('#tags').val();
      $.post("response.php",{query:query},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })
$("body").on("click","#updateProfile",function(){
    var showUpdateUsers = "1";
      $.post("response.php",{showUpdateUsers:showUpdateUsers},function(data){
         $("#homeDAta").css("display","none");
         $("#ExportDiv").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
      })
})




$("body").on("click",".profileUpdate",function(){
    
    
    var profile = $(this).data("value");

    $.post("response.php",{profileUpdate:profile},function(data){
        $("#cardData").css("display","none");
        $("#homeDAta").css("display","none");
         $("#ExportDiv").css("display","none");
        $("#userDATA").css("display","block");
        $("#mainCard").html(data);
    })
})



$("body").on("click","#todayRenew",function(){
      var todayRenew = "addRefund";
      $.post("response.php",{todayRenew:todayRenew},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })

$("body").on("click","#totalsellRenew",function(){
      var todayRenew = "addRefund";
      $.post("response.php",{todaysellRenew:todayRenew},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })

$("body").on("click","#requestRenew",function(){
      var todayRenew = "addRefund";
      $.post("response.php",{requestRenew:todayRenew},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })

$("body").on("click","#totalRenew",function(){
      var todayRenew = "addRefund";
      $.post("response.php",{totalRenew:todayRenew},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })




$("body").on("click","#addtemplate",function(){
      var addtemplate  = "addtemplate";
      $.post("response.php",{addtemplate:addtemplate},function(data){
        $("#homeDAta").html('');
       
        $("#homeDAta").html(data);
      })
      
    })



function notiload(){
    var notification = "notification";
   $.post("response.php",{notification:notification},function(data){
        $(".notidrop").html(' ');
        $(".notidrop").html(data);
    })
}

function notiload2(){
    var notification2 = "notification";
   
   $.post("response.php",{notification2:notification2},function(data){
        $(".notidrop2").html(' ');
        $(".notidrop2").html(data);
    })
}

function notiload3(){
    var notification3 = "notification";
   
   $.post("response.php",{notification3:notification3},function(data){
        $(".notidrop3").html(' ');
        $(".notidrop3").html(data);
    })
}


function managetemplate(){
    var managetemplate = "notification";
    alert("working");
   $.post("response.php",{managetemplate:managetemplate},function(data){
         $("#homeDAta").html('');
        $("#homeDAta").html(data);
    })
}


  $(document).ready(function(){
     
         var result =  window.setInterval(notiload, 5000);
         var result2=  window.setInterval(notiload2, 5000);
          var result3= window.setInterval(notiload3, 5000);
          $(".stop").click(function(){
              clearInterval(result);
              clearInterval(result2);
              clearInterval(result3);
          })
     
  })
  
</script>

<script type="text/javascript">
$(function() {

    var start = moment().subtract(29, 'days');
    var end   = moment();

    function cb(start, end) {
        $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
    }

    $('#reportrange').daterangepicker({
        startDate: start,
        endDate: end,
        ranges: {
           'Today': [moment(), moment()],
           'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
           'Last 7 Days': [moment().subtract(6, 'days'), moment()],
           'Last 30 Days': [moment().subtract(29, 'days'), moment()],
           'This Month': [moment().startOf('month'), moment().endOf('month')],
           'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
        }
    }, cb);

    cb(start, end);

    

});

$(function() {

    var start = moment().subtract(29, 'days');
    var end = moment();

    function cb(start, end) {
        $('#reportrange2 span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
    }

    $('#reportrange2').daterangepicker({
        startDate: start,
        endDate: end,
        ranges: {
           'Today': [moment(), moment()],
           'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
           'Last 7 Days': [moment().subtract(6, 'days'), moment()],
           'Last 30 Days': [moment().subtract(29, 'days'), moment()],
           'This Month': [moment().startOf('month'), moment().endOf('month')],
           'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
        }
    }, cb);

    cb(start, end);

    

});
</script>
</body>
</html>
