<?php
require_once("header.php");
require_once("menu.php");


if(isset($_REQUEST['del']))
{
    $seo_id = base64_decode($_REQUEST['del']);
    $ex = $obj->deleteseometainfo($seo_id);
    echo '<script>window.location="metainfo.php"</script>';
}


?>

<div id="layoutSidenav_content">
<main class="mt-4">
    <div class="container-fluid">        
        <div class="card mb-4">
            <div class="card-header">
                <i class="fas fa-border-style mr-1"></i>Meta Title and Description
                <a href="add_metainfo.php" class="btn btn-primary btn-sm float-right add_right">Add Meta title and Description</a>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                        <thead>
                            <tr>
                                <th>Page Name</th>
                                <th>Page URL</th>
                                <th>Meta Title</th>
                                <th>Meta Description</th>
                                <th>Meta Keyword</th>
								<th>Megicbox Data</th>
                                <th>Action</th>
                               
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                            $ex = $obj->view_metainfo();
                            while($row=mysqli_fetch_array($ex))
                            {
                              
                            ?>
                            <tr>
                                <td><?php echo ucwords($row['seo_meta_page']);?></td>
                                <td><?php echo ucwords($row['seo_meta_url']);?></td>
                                <td><?php echo ucwords($row['seo_meta_title']);?></td>
                                <td><?php echo ucwords($row['seo_meta_description']);?></td>
                                <td><?php echo ucwords($row['seo_meta_keyword']);?></td>
								<td><?php echo ucwords($row['seo_meta_extrabox']);?></td>
                                
                              <td>
                                    <a href="add_metainfo.php?edit=<?php echo base64_encode($row['seo_meta_id']);?>" class="btn btn-primary btn-sm edit_right" title="Edit"><i class="fas fa-edit"></i></a>
                                    <a href="metainfo.php?del=<?php echo base64_encode($row['seo_meta_id']);?>" class="btn btn-danger btn-sm delete_right" title="Delete"><i class="fas fa-trash"></i></a>
                                </td>
                                   
                             
                                     
   
                            </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</main>



<?php require_once("footer.php");?>


