<style>.setting-avatar {
    width: 100px;
    margin-right: 10px;
    margin: 0 auto;
    display: block;
}
</style>
<div class="container-fluid">
    <div class="block-header">
        <h2>Gifts > Manage Gifts</h2>
    </div>
    <!-- Vertical Layout -->
    <div class="row">
        <div class="col-lg-12 col-md-12">
            <div class="card">
                <div class="header">
                    <h2>Manage Gifts</h2>
                </div>
                <div class="body">
                   <input type="hidden" id="hash_id" name="hash_id" value="<?php echo Wo_CreateSession();?>">
                   <div class="clearfix"></div>
                   <div class="table-responsive1">
                        <table class="table table-bordered table-striped table-hover">
                            <thead>
                                <tr>
                                      <th>ID</th>
					                  <th>Name</th>
					                  <th>Media</th>
					                  <th>Added</th>
					                  <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                               <?php 
				                foreach (Wo_GetAllGifts(50000) as $wo['giftlist']) {
				                  echo Wo_LoadAdminPage('manage-gifts/list');
				                }
				               ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <!-- #END# Vertical Layout -->

<script>
$(function () {
	$('table').DataTable();
});

jQuery(document).ready(function($) {
   $(".delete-gift").click(function(event) {
	    	$("#delete-gift").attr('data-gift-ident', $(this).attr('id')).modal('show');
	    });
});

function Wo_DeleteGift(gift_id) {
  if (confirm("Are you sure you want to delete this gift?'") == false) {
    return false;
  }
  $('#GiftID_' + gift_id).fadeOut(300, function() {
    $(this).remove();
  });
  $.get(Wo_Ajax_Requests_File(),{f:'admin_setting',s:'delete_gift',gift_id: gift_id});
}
</script>