<?php //print_r($usertype);exit; ?>
    <section class="content-header">
      <h1>
        Deleted Members
      </h1>
      <ol class="breadcrumb">
        <li><a href="<?php echo base_url().'admin';?>"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">List</li>
      </ol>
    </section>

    <section class="content">
      <div class="row">
        <?php echo $this->utility->showMsg();?>
        <div class="col-xs-12">
          <div class="box">
            <div class="box-header">
              <h3 class="box-title">Management</h3>
              
              </div>
               
              <div></div>
            <!-- /.box-header -->
            <div class="box-body">
            <form action="" id="search_frm" method="post" style="margin-bottom: 5%;">
              <input type="text" name="search" class="form-control" placeholder="Search by email" value="<?php if($this->input->post('search')) { echo $this->input->post('search'); }?>" style="width: 25%; float: right;">
              <input type="text" name="search_name" class="form-control" placeholder="Search by pseudonym" value="<?php if($this->input->post('search_name')) { echo $this->input->post('search_name'); }?>" style="width: 25%; float: right;">
              <input type="submit" class="btn btn-primary" value="Search" style="float: right;">
            </form>
            <div class="">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>#</th>
                  <?php if($this->session->userdata('admin_id')=='19624' || $this->session->userdata('admin_id')=='25267'){ ?>
                  <th>Email</th>
                  <?php } ?>
                  <th>Pseudonym</th>
                  <th>Registered</th>
                  <th>Deleted</th>
                  
                </tr>
                </thead>
                 <?php if(count($users)>0)
                {?>
                <tbody>
               <?php
                $i=1;
                foreach ($users as $data) 
                {
                ?>
                <tr>
                    <td><?php echo $i; ?></td>
                    <?php if($this->session->userdata('admin_id')=='19624' || $this->session->userdata('admin_id')=='25267'){ ?>
                    <td><?php echo $data['email']; ?></td>
                    <?php } ?>
                    <td><?php echo $data['username']; ?>
                    </td>
                    <td><?php echo date('d-m-Y h:i:s',$data['created_date']);?></td>
                    <td><?php echo date('d-m-Y h:i:s',$data['delete_date']);?></td>
                    
                </tr>

               <?php $i++; } ?>

                </tbody>
                <?php } ?>
                <tfoot>
               
                </tfoot>
              </table>
            </div>
              <div class="custom_pagination"><?php echo $link; ?></div>
              
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>

<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Update Number</h4>
      </div>
      <div class="modal-body">
        <form action="<?php echo base_url().'admin/users/update_number'; ?>" method="post">
            <div class="box-body">
              <div class="form-group">
                <label class="col-sm-2 control-label">Mobile Number</label>
                <div class="col-sm-6">
                <input type="tel" id="mobile_number" name="mobile_number" class="form-control" placeholder="Enter Mobile" value="">
                <input name="user_id" id="user_id" class="form-control" placeholder="Enter Mobile" value="" style="" type="hidden">
                </div>
              </div>
          </div>
          <div class="text-center">
            <input type="submit" class="btn btn-info " value="Update" id="add">
          </div>
            
        </form>
      </div>
      
    </div>

  </div>
</div>

    <style type="text/css">
      .dataTables_info, .dataTables_paginate {   
      display: none;
      }
    </style>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/12.1.6/css/intlTelInput.css">
<script src="<?php echo base_url(); ?>assets/js/intlTelInput.js"></script>    
<script>
  $(function () {
    $("#example1").DataTable();

    /*******************Mobile Verification*******************/
    $("#mobile_number").intlTelInput();
    $('body').on('click','ul.country-list li',function(){
      $('#mobile_number').val($(this).children('.dial-code').html());
    })
    $('.custom_pagination a').click(function(e){
      e.preventDefault();
      $('#search_frm').attr('action',$(this).attr('href'));
      $('#search_frm').submit();
    })

    $('.update_number').click(function(){
      $('#user_id').val($(this).data('id'));
    })
  });
</script>
<style type="text/css">
  .dataTables_length, .dataTables_filter{ display: none; }
</style>