<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 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 (GetCustomPages() as $value) {
                                  echo LoadAdminPage('manage-custom-pages/list',array('ID' => $value['id'],'TITLE' => $value['page_title'],'NAME' => $value['page_name']));
                              }
                              ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    </div>
    <!-- #END# Vertical Layout -->
<script type="text/javascript">
$(function () {
  $('table').DataTable();
});
function DeleteCustomPage(id) {
  if (id == '') {
    return false;
  }
  if (!confirm('Are you sure you want to delete this page?')) {
    return false;
  }
  $('#' + id).fadeOut(300, function () {
    $(this).remove();
  });
  $.post('{{CONFIG ajax_url}}/ap/delete_page', {id: id}, function(data, textStatus, xhr) {});
}
</script>