<div class="content-wrapper">
    <div class="container-fluid">

		<div class="row">
        <div class="col-lg-12">
          <div class="card">
            <div class="card-header"><i class="fa fa-car"></i> <?= $pagetitle; ?></div>
            <div class="card-body">
				<?php $pagemsg = $this->session->flashdata('page_message'); 
					if($pagemsg){
						echo $pagemsg;
					}
				?>
				<div class="row">
					<table class="table table-bordered">
						<tr>
							<form action="#" method="post">
							<td>
								<select name="status"class="form-control">
									<option value='-1'>All</option>
									<option value='1' <?php if($status == '1'){echo 'selected';} ?>>Active</option>
									<option value='0' <?php if($status == '0'){echo 'selected';} ?>>In Active</option>
								</select>
							</td>
							<td>
								<button type="submit" class="btn btn-sm btn-success">View</button>
							</td>
							</form>
							<td>
								
							</td>							
							<td align="right">
								<a class="btn btn-sm btn-primary" href="<?= base_url('admin/pages/publish');?>">Add New</a>
							</td>
						</tr>
					</table>
				</div>
			</div>
			<div class="card-body">
              <div class="table-responsive">
              <table id="default-datatable" class="table table-bordered">
                <thead>
                    <tr>
                        <th class="nosort">Sr. No.</th>
                        <th>Name</th>
                        <th>Added On</th>
                        <th>Status</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
					<?php $srno=1;
					for($i=0;$i<count($response);$i++){?>
						 <tr>
							<td><?= $srno; ?></td>
							<td><?= $response[$i]->title; ?></td>
							<td><?= $response[$i]->updatedon; ?></td>
							<td><?php if($response[$i]->status){ echo 'Active';}else{ echo 'Inactive';} ?></td>
							<td align="center">
								<a href="<?= base_url('admin/pages/publish/'.$response[$i]->pageId);?>" class="btn btn-sm btn-warning mb-2"> <i class=" fa fa-pencil-square"></i> Edit</a>
								<br/>
								<a href="<?= base_url('admin/pages/seo/'.$response[$i]->pageId);?>" class="btn btn-sm btn-success mb-2"> <i class=" fa fa-pencil-square"></i> SEO</a>
								<br/>
								<a href="<?= base_url('admin/pages/delete/'.$response[$i]->pageId);?>" class="btn btn-sm btn-danger mb-2"> <i class="fa fa-trash"></i> Delete</a>
							</td>
						</tr>
					<?php $srno++; } ?>
                   
                </tbody>
            </table>
            </div>
            </div>
          </div>
        </div>
      </div><!-- End Row-->