Mini Shell
<!DOCTYPE html>
<html lang="en">
<head>
<?php include('include/head_admin.php');
$page_id = '18';
if (isset($_GET['type']) && $_GET['type'] != '') {
$type = get_safe_value($con, $_GET['type']);
if ($type == 'status') {
$operation = get_safe_value($con, $_GET['operation']);
$id = get_safe_value($con, $_GET['id']);
if ($operation == 'active') {
$status = '1';
} else {
$status = '0';
}
$update_status_sql = "update about set status='$status' where id='$id'";
mysqli_query($con, $update_status_sql);
}
}
$sql = "select * from about ";
$res = mysqli_query($con, $sql);
?>
</head>
<body>
<!--== MAIN CONTRAINER ==-->
<?php include('include/header_admin.php'); ?>
<!--== BODY CONTNAINER ==-->
<div class="container-fluid sb2">
<div class="row">
<?php include('include/sidebar_admin.php'); ?>
<div class="sb2-2">
<div class="sb2-2-2">
<ul>
<li><a href="index.php"><i class="fa fa-home" aria-hidden="true"></i> Home</a>
</li>
<li class="active-bre"><a href="about-all.php"> about</a>
</li>
</ul>
</div>
<div class="sb2-2-1">
<h2>All about</h2>
<!-- <p>The .table class adds basic styling (light padding and only horizontal dividers) to a table:</p> -->
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Image</th>
<th>Edit</th>
<!-- <th>Delete</th> -->
</tr>
</thead>
<tbody>
<?php
$i = 1;
while ($row = mysqli_fetch_assoc($res)) {
$image = json_decode($row['image']);
?>
<tr>
<td><?php echo $i++ ?></td>
<td>About</td>
<td><?php
echo "<a target='_blank' href='" . "../media/about/" . $image[0] . "'><img width='100px' src='" . "../media/about/" . $image[0] . "'/></a>";
?></td>
<td><a href="about-edit.php?id=<?php echo $row['id']; ?>" class="sb2-2-1-edit"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>
</td>
<!-- <td><a href="?type=delete&id=<?php echo $row['id'] ?>" class="sb2-2-1-edit"><i class="fa fa-trash-o" aria-hidden="true"></i></a> -->
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php include('include/footer_admin.php'); ?>
<?php include('include/foot_admin.php'); ?>
</body>
</html>