<div class="container-fluid">
    <div class="block-header">
        <h2>Pages > Manage Custom Pages</h2>
    </div>
    <div class="row">
        <div class="col-lg-12 col-md-12">
            <div class="card">
                <div class="header">
                    <h2>Manage & Edit Custom Pages</h2> 
                    <a href="<?php echo Wo_LoadAdminLinkSettings('add-new-custom-page'); ?>" class="btn btn-info waves-effect waves-light m-t-20">Create New Custom Page</a>
                </div>
                <div class="body">
                   <div class="table-responsive1">
                        <table class="table table-bordered table-striped table-hover">
                            <thead>
                                <tr>
                                   <th>ID</th>
					               <th>Page Name</th>
					               <th>Page Title</th>
					               <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach (Wo_GetCustomPages() as $wo['page']) { ?>
                                    <tr class="setting-postlist" id="<?php echo $wo['page']['id'];?>">
                                        <td><?php echo $wo['page']['id'];?></td>
                                        <td><a href="<?php echo $wo['site_url'] .'/site-pages/' . $wo['page']['page_name']; ?>"><?php echo $wo['page']['page_name'];?></a></td>
                                        <td><?php echo $wo['page']['page_title'];?></td>
                                        <td>
                                            <a class="btn btn-info waves-effect waves-light" href="<?php echo Wo_LoadAdminLinkSettings('edit-custom-page?id=' . $wo['page']['page_name']); ?>">EDIT</a>
                                            <button class="btn btn-danger waves-effect waves-light" onclick="Wo_DeleteCustomPage(<?php echo $wo['page']['id'];?>);">DELETE</button>
                                        </td>
                                    </tr>
				                <?php } ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    </div>
    <!-- #END# Vertical Layout -->
<script>
$(function () {
  $('table').DataTable();
});
function Wo_DeleteCustomPage(id) {
  if (id == '') {
    return false;
  }
  if (!confirm('Are you sure you want to delete this page?')) {
    return false;
  }
  var hash_id = '<?php echo Wo_CreateSession();?>';
  $('#' + id).fadeOut(300, function () {
	  $(this).remove();
	});
  $.get(Wo_Ajax_Requests_File(), {f: 'admin_setting', s:'delete_page', id:id, hash_id: hash_id});
}
</script>