<?php
ob_start();
error_reporting(0);
include("connect.php");
session_start(); 
$ver = $_SESSION["admin_id"];
if(!isset($_SESSION["admin_id"])){
   header('location:http://www.btcover.appexperts.net');
}
date_default_timezone_set('Asia/Calcutta');
	$cdate  = date("Y-m-d");
?>
<!DOCTYPE html>
<html dir="ltr" lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon.png">
    <title>BTCOVER : Admin Dashboard</title>
    <!-- Custom CSS -->
    <link rel="stylesheet" type="text/css" href="assets/extra-libs/multicheck/multicheck.css">
    <link href="assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.css" rel="stylesheet">
    <link href="dist/css/style.min.css" rel="stylesheet">
</head>

<body>
   
    <div id="main-wrapper">
	 <?php include("header.php"); ?>
    
     <?php include("menu.php"); ?>
	
	
       
      
        <div class="page-wrapper">
            <!-- ============================================================== -->
            <!-- Bread crumb and right sidebar toggle -->
            <!-- ============================================================== -->
            <div class="page-breadcrumb">
                <div class="row">
                    <div class="col-12 d-flex no-block align-items-center">
                        <h4 class="page-title">Manager Detail</h4>
                        <div class="ml-auto text-right">
                            <nav aria-label="breadcrumb">
                                <ol class="breadcrumb">
                                    <li class="breadcrumb-item"><a href="add-manager.php?id=<?php echo base64_encode($ver)?>"> <span class="label label-info" style="padding:8px 8px 5px; font-size:12px;"> <i class="fas fa-plus" style="font-size:12px;"></i> Add Manager  </span></a></li>
                                </ol>
                            </nav>
                        </div>
                    </div>
                </div>
            </div>
            <div class="container-fluid">
                <div class="row">
                    <div class="col-12">
                        <div class="card">
                            <div class="card-body" style="float:left; width:100%; overflow-Y: auto; height: 500px;" >
                                <div class="table-responsive" >
                                    <table id="zero_config" class="table table-striped table-bordered">
                                        <thead>
                                            <tr>
											  <th><b>#</b></th>
											  <th><b>Manager Name</b></th>
											  <th><b>Phone No</b></th>
											  <th><b>Email</b></th>
											  <th><b>Address</b></th>
											  <th><b>Status</b></th>
											  <th><b>Action</b></th>
											 <!-- <th><b>Logout</b></th>-->
											</tr>
                                        </thead>
                                        <tbody>
										<?php 
										   $c=1;
											$selrenew3=mysqli_query($con,"select * from tbl_manager where admin_id='$ver'  and status!='Deleted' and manage_type='Manager' order by manager_id desc");	
											if(mysqli_num_rows($selrenew3)>0)
											{
												while($recset=mysqli_fetch_array($selrenew3))
												{
										?>
                                        <tr>
											  <td><?php echo $c++; ?></td>
											  <td><?php echo $recset['manager_name']; ?></td>
											  <td><?php echo $recset['manager_phone']; ?></td>
											  <td><?php echo $recset['manager_email']; ?></td>
											  <td><?php echo $recset['address']; ?></td>
											  <td><?php echo $recset['status']; ?></td>
											  <td width='14%'>
											  <a href="edit-manager.php?id=<?php echo base64_encode($recset['manager_id'])?>" style="font-size:12px;padding:1px 5px;" onClick="return confirm('Are you sure to edit')" class="btn btn-primary"><i class="fas fa-edit"></i></a>
											  
											  <?php if($recset['status']=='Deactive') { ?>
													<a href="manager_status_edit.php?id=<?php echo $recset['manager_id'];?>" style="font-size:12px;padding:1px 5px;" onClick="return confirm('Are you sure to edit this status')" class="btn btn-success">Activate</a>
											  <?php } else {
												?>
												<a href="manager_status_edit.php?id=<?php echo $recset['manager_id'];?>" style="font-size:12px;padding:1px 5px;" onClick="return confirm('Are you sure to edit this status')" class="btn btn-danger">Deactivate</a>
												<?php } ?>
												
											  </td>
											<!-- <td>
											 <a href="user-logout.php?manager_id=<?php //echo $recset['manager_id'];?>" style="font-size:12px;padding:1px 5px;" onClick="return confirm('Are you sure to logout manager')" class="btn btn-danger">Logout</a>
											 </td>-->
											</tr>
											<?php }} else { ?>
											 <tr>
											  <td colspan='6'>No Data Available</td>
											</tr>
											<?php } ?>
                                        </tbody>
                                       
                                    </table>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
             
            </div>
         
            <footer class="footer text-center">
                  2019 &copy; All Rights Reserved by BTCOVER. Designed and Developed by <a href="http://www.belltechnology.in/">Bell Technology</a>.
            </footer>
          
        </div>
      
    </div>
  
    <script src="assets/libs/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap tether Core JavaScript -->
    <script src="assets/libs/popper.js/dist/umd/popper.min.js"></script>
    <script src="assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- slimscrollbar scrollbar JavaScript -->
    <script src="assets/libs/perfect-scrollbar/dist/perfect-scrollbar.jquery.min.js"></script>
    <script src="assets/extra-libs/sparkline/sparkline.js"></script>
    <!--Wave Effects -->
    <script src="dist/js/waves.js"></script>
    <!--Menu sidebar -->
    <script src="dist/js/sidebarmenu.js"></script>
    <!--Custom JavaScript -->
    <script src="dist/js/custom.min.js"></script>
    <!-- this page js -->
    <script src="assets/extra-libs/multicheck/datatable-checkbox-init.js"></script>
    <script src="assets/extra-libs/multicheck/jquery.multicheck.js"></script>
    <script src="assets/extra-libs/DataTables/datatables.min.js"></script>
    <script>
        /****************************************
         *       Basic Table                   *
         ****************************************/
        $('#zero_config').DataTable();
    </script>

</body>

</html>