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

<head>
    <!-- Required meta tags-->
    <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="Apartment Visitor Management System in CodeIgniter">
    <meta name="author" content="Anuj Kumar">
    <meta name="keywords" content="PHPGurukul | Programming Blog">

    <!-- Title Page-->
    <title>AVMS</title>

<?php echo link_tag('assets/css/font-face.css'); ?>
<?php echo link_tag('assets/vendor/font-awesome-4.7/css/font-awesome.min.css'); ?>
<?php echo link_tag('assets/vendor/font-awesome-5/css/fontawesome-all.min.css'); ?>
<?php echo link_tag('assets/vendor/mdi-font/css/material-design-iconic-font.min.css'); ?>
<!-- Bootstrap CSS-->
<?php echo link_tag('assets/vendor/bootstrap-4.1/bootstrap.min.css'); ?>
<!-- Vendor CSS-->
<?php echo link_tag('assets/vendor/animsition/animsition.min.css'); ?>
<?php echo link_tag('assets/vendor/bootstrap-progressbar/bootstrap-progressbar-3.3.4.min.css'); ?>
<?php echo link_tag('assets/vendor/wow/animate.css'); ?>
<?php echo link_tag('assets/vendor/css-hamburgers/hamburgers.min.css'); ?>
<?php echo link_tag('assets/vendor/select2/select2.min.css'); ?>
<?php echo link_tag('assets/vendor/perfect-scrollbar/perfect-scrollbar.css'); ?>
<!-- Main CSS-->
<?php echo link_tag('assets/css/theme.css'); ?>

</head>

<body class="animsition">
    <div class="page-wrapper">
        <!-- HEADER MOBILE-->
   <?php include APPPATH.'views/includes/sidebar.php';?>
        <!-- END HEADER MOBILE-->

        <!-- MENU SIDEBAR-->
      
        <!-- END MENU SIDEBAR-->

        <!-- PAGE CONTAINER-->
        <div class="page-container">
            <!-- HEADER DESKTOP-->
            <?php include APPPATH.'views/includes/header.php';?>
            <!-- END HEADER DESKTOP-->

            <!-- MAIN CONTENT-->
            <div class="main-content">
                <div class="section__content section__content--p30">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="table-responsive table--no-card m-b-30">
                                    
<h4 class="m-t-0 header-title">Between Dates Reports Result</h4>
                                  <?php
$fdate=$_POST['fromdate'];
$tdate=$_POST['todate'];
$fromdate = date("d-m-Y", strtotime($fdate));
$todate = date("d-m-Y", strtotime($tdate));
?>
<h4 align="center" style="color:blue">Report from <?php echo $fromdate?> to <?php echo $todate?></h4>
<hr />
  
                                     <table class="table table-borderless table-striped table-earning">
                                         <thead>
                                        <tr>
                                            <tr>
<th>S.NO</th>
<th>Visitor Name</th>
<th>Whom To Visit</th>
<th>Entry Time</th>
<th>Out Time</th>
<th>Action</th>
</tr>
                                        </tr>
                                        </thead>

<?php
count($reportdata);
if(count($reportdata)) :
$cnt=1; 
foreach ($reportdata as $row) :
?>  
              
                <tr>
                  <td><?php echo $cnt;?></td>
            
                  <td><?php  echo $row->VisitorName;?></td>
                <td><?php  echo $row->WhomtoMeet;?><br>
                    <?php  echo $row->Apartment;?>&nbsp;&nbsp;<?php  echo $row->Floor;?>Floor</td>
                <td><?php  echo $row->EnterDate;?></td>
                  <td><?php  $ot=$row->outtime;
if($ot==''):
echo '<span style="color:red">Not Out yet</span>';
else:
echo $ot;
endif;
?></td>
                  <td><?php echo  anchor("Visitor/Details/{$row->ID}",' ','class="fa fa-edit"')?>


                  </td>
                </tr>
 <?php 
$cnt++;
endforeach;
else : ?>

<tr>
<td colspan="6" style="text-align:center">No Record found</td>
</tr>
<?php
endif;
?>  
                                    </table>
                                </div>
                            </div>
                          
                        </div>
                        
                        
          
 <?php include APPPATH.'views/includes/footer.php';?>
          </div>
                </div>
            </div>
        </div>

    </div>
  <script src="<?php echo base_url('assets/vendor/jquery-3.2.1.min.js'); ?>"></script>
    <!-- Bootstrap JS-->
    <script src="<?php echo base_url('assets/vendor/bootstrap-4.1/popper.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/vendor/bootstrap-4.1/bootstrap.min.js'); ?>"></script>
    <!-- Vendor JS       -->
    <script src="<?php echo base_url('assets/vendor/slick/slick.min.js'); ?>">
    </script>
    <script src="<?php echo base_url('assets/vendor/wow/wow.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/vendor/animsition/animsition.min.js'); ?>"></script>
    <script src="<?php echo base_url('vendor/bootstrap-progressbar/bootstrap-progressbar.min.js'); ?>">
    </script>
    <script src="<?php echo base_url('assets/vendor/counter-up/jquery.waypoints.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/vendor/counter-up/jquery.counterup.min.js'); ?>">
    </script>
    <script src="<?php echo base_url('assets/vendor/circle-progress/circle-progress.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/vendor/perfect-scrollbar/perfect-scrollbar.js'); ?>"></script>
    <script src="<?php echo base_url('assets/vendor/chartjs/Chart.bundle.min.js'); ?>"></script>
    <script src="<?php echo base_url('assets/vendor/select2/select2.min.js'); ?>">
    </script>
    <!-- Main JS-->
    <script src="<?php echo base_url('assets/js/main.js'); ?>"></script>

</body>

</html>
