<!DOCTYPE HTML>
<html>

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>NearFeast Portal</title>
    <script src="<?=base_url()?>assets/theme/vendor/jquery/jquery.min.js"></script>
    <!-- Custom fonts for this template-->
    <link href="<?=base_url()?>assets/theme/vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">

    <!-- Custom styles for this template-->
    <link href="<?=base_url()?>assets/theme/css/sb-admin-2.css" rel="stylesheet">
    <link href="<?=base_url()?>assets/theme/vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
    <link href="<?=base_url()?>assets/plugins/toast/toast.min.css" rel="stylesheet">
    <!-- Bootstrap core JavaScript-->
    <script src="<?=base_url()?>assets/theme/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

    <!-- Core plugin JavaScript-->
    <script src="<?=base_url()?>assets/theme/vendor/jquery-easing/jquery.easing.min.js"></script>


</head>
<body> 
<div id="content-wrapper" class="d-flex flex-column">

    <!-- Main Content -->
    <div id="content">

        <!-- Topbar -->
        <nav class="navbar navbar-expand navbar-light bg-gradient-topbar topbar mb-4 static-top shadow">

            <!-- Sidebar Toggle (Topbar) -->
            <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
                <i class="fa fa-bars"></i>
            </button>

            <!-- Topbar Search -->
            <!-- <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
                <div class="input-group">
                    <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
                    <div class="input-group-append">
                        <button class="btn btn-primary" type="button">
                            <i class="fas fa-search fa-sm"></i>
                        </button>
                    </div>
                </div>
            </form> -->

            <!-- Topbar Navbar -->
            <ul class="navbar-nav ml-auto">

                <!-- Nav Item - Search Dropdown (Visible Only XS) -->
                <li class="nav-item dropdown no-arrow d-sm-none">
                    <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fas fa-search fa-fw"></i>
                    </a>
                    <!-- Dropdown - Messages -->
                    <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">
                        <form class="form-inline mr-auto w-100 navbar-search">
                            <div class="input-group">
                                <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
                                <div class="input-group-append">
                                    <button class="btn btn-primary" type="button">
                                        <i class="fas fa-search fa-sm"></i>
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </li>


                <div class="topbar-divider d-none d-sm-block"></div>

                <!-- Nav Item - User Information -->
                <li class="nav-item dropdown no-arrow">
                    <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <span class="mr-2 d-none d-lg-inline text-white-600 small"><?php echo $this->session->userdata('session_data')['name']; ?></span>
                        <img class="img-profile rounded-circle" src="<?=base_url()?>assets/theme/img/undraw_profile.svg">
                    </a>
                    <!-- Dropdown - User Information -->
                    <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                        <a class="dropdown-item" href="<?=base_url()?>login/logout">
                            <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                            Logout
                        </a>
                    </div>
                </li>

            </ul>

        </nav>
        <!-- End of Topbar -->

        <div class="container">
          

          <h2 style ="text-align:center;">Resturent List</h2>
          <?php foreach($disputesData as $d=>$res){ 
            // echo "<pre>";
            // print_r($res);
            // echo "</pre>";
            
            ?>

            <div class="card-group" style="width:400px">
                <img class="card-img-top" src="<?php echo $res['image']; ?>" alt="Card image">
                <div class="card-body">
                      <h4 class="card-title"><?php echo $res['name']; ?></h4>
                      <p class="card-text"><?php echo $res['details']; ?></p>
                      <?php  $date=date("Y-m-d",strtotime($res['expire_at']));?>
                      <?php if(($res['association']==true) && ($date > date("Y-m-d"))){?>
                      <a href="<?php echo base_url().'Store/resturentlogin/'.$d; ?>" class="btn btn-primary">Login</a>
                      <?php }else{?>
                        <a href="#" class="btn btn-danger">Subscription End</a>
                      <?php } ?>
                  </div>
             </div>

          <?php } ?>


        </div>
    </div>
</div>
 </body>
</html>
