
<div class="breadcrumb">
    <h1>Faq List</h1>
    <ul>
        <li><a href="<?php echo SITE_URL.ADMIN_DIR ?>">Dashboard</a></li>
        <li>Faq List</li>
    </ul>
</div>
<div class="separator-breadcrumb border-top"></div>

<div class="row mb-4">
  <div class="col-md-6">
  </div>
  <div class="col-md-6 pull-right">
        <div class="button-group">
            <a href="faqadd.php" class="btn btn-dark m-1"><i class="i-Add-User"></i> Add New</a>
      </div>    
  </div>  
</div>   

<div class="widget-body">
    <div class="portlet-body">
                        
    <?php echo (isset($successMsg) && $successMsg!='') ? "<div class='alert alert-success'><button data-dismiss='alert' class='close' type='button'>×</button>".base64_decode($successMsg)."</div>" : '' ; ?>
    <?php echo (isset($failedMsg) && $failedMsg!='') ? "<div class='alert alert-danger'><button data-dismiss='alert' class='close' type='button'>×</button>".base64_decode($failedMsg)."</div>" : '' ?>
   
    <div id="status_msg" style="display: none;"><div class="alert alert-success"><button data-dismiss='alert' class='close' type='button'>×</button>&nbsp;</div></div>
    <div id="alert_msg" style="display: none;"><div class="alert alert-danger"><button data-dismiss='alert' class='close' type='button'>×</button>&nbsp;</div></div>

    </div>
</div>


<div class="row mb-4">
    <div class="col-md-12 mb-4">
        <div class="card text-left">

            <div class="card-body">
                <div class="table-responsive">
                  <form id="listFrm" name="listFrm" action="" method="post">       
                    <input type="hidden" id="action" name="action" value="">
                    <table id="list" class="display table table-striped table-bordered" style="width:100%">
                        <thead>
                            <tr>
                                <th class="center"><input type="checkbox" name="checkall" id="checkall"></th>
                                <th>ID</th>
                                <th>Question</th>
                                <th>Action</th>
                            </tr>
                        </thead>
                    </table>
                  </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="application/javascript">
   $(document).ready(function() {
     $('#list').DataTable( { 
          "ajax": "faqlist.php?act=load",
          "processing": true,
          "serverSide": true,
          "pageLength": 25,
                "aaSorting": [],
                "aoColumnDefs": [
                    { 'bSortable': false, 'aTargets': [0] }
                ],
          language: {
              "processing" : "<div class='loader-bubble loader-bubble-primary m-5'></div>",
              "sEmptyTable" :  "No records found."
          }
          
      } );

    });
</script>