 <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0 text-dark">All Event</h1>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="<?php echo base_url() ?>admin/admin/dashboard">Dashboard</a></li>
              <li class="breadcrumb-item"><a href="#">Main Page Setting</a></li>
              <li class="breadcrumb-item active">All Event</li>

            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <div class="card card-default">
          <div class="card-header">
            <h3 class="card-title">View All Event</h3>

            <div class="card-tools">
              <a href="<?php echo base_url()?>/admin/main_page_setting/add_new_event" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add New Event</a>
            </div>
          </div>
            <!-- /.card-header -->
            <div class="card-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>id</th>
                  <th>Image</th>
                  <th>Title</th>
                  <th>Date</th>
                  <th>Location</th>
                  <th>Short Description</th>
                  <th>Language</th>
                  <th></th>
                </tr>
                </thead>
                <tbody>
                <?php $i=1; foreach ($all_event as $key => $event):?>
                <tr>
                  <td><?php echo $i ?></td>
                  <td><img src="<?php echo base_url() ?><?php echo $event->page_event_image ?>" width="50px"> </td>
                  <td><?php echo $event->page_event_title ?></td>
                  <td><?php echo date('M d, Y', strtotime($event->page_event_date_time)); ?> - <?php echo date('h:i A', strtotime($event->page_event_date_time)); ?></td>
                  <td><?php echo $event->page_event_location ?></td>
                  <td>
                    <?php echo mb_strimwidth($event->page_event_short_description, 0, 50, "..."); ?>
                  </td>
                  <td>
                    <?php if($event->page_event_language == 'en'): ?>
                      English
                    <?php else: ?>
                      Hindi
                    <?php endif;?>
                  </td>
                  <td class="text-right py-0 align-middle">
                    <div class="btn-group btn-group-sm">
                      <a href="<?php echo base_url(); ?>/admin/main_page_setting/edit_event/<?php echo $event->page_event_id  ?>" class="btn btn-info"><i class="fas fa-edit"></i></a>
                      <a onclick="return confirm('Are you sure?')" href="<?php echo base_url() ?>/admin/main_page_setting/delete_event/<?php echo $event->page_event_id  ?>" class="btn btn-danger"><i class="fas fa-trash"></i></a>
                    </div>
                  </td>
                </tr>
                <?php $i++; ?>
                <?php endforeach; ?>
                </tbody>
              </table>
            </div>
       
      </div><!--/. container-fluid -->
    </section>
    <!-- /.content -->
  </div>
