Mini Shell
<?php
include "../classes/autoload.php";
include "../assets/autoload.php";
session_start();
new Header();
new Sidebar();
new Footer();
session_start();
$man = new ManageUsers();
$users = $man->show();
while($user = $users->fetch(\PDO::FETCH_ASSOC)){
$id = $user['id'];
$name = $user['name'];
$email = $user['email'];
}
?>
<div class="main">
<h2>Kullanıcılar</h2>
<table id="data-table" class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>Kullanıcı adı</th>
<th>Kullanıcı E-Postası</th>
<th>Düzenle</th>
<th>Sil</th>
</tr>
<tr>
<th><?php echo $id ?></th>
<td><?php echo $name ?></td>
<td><?php echo $email ?></td>
<td>
<form action="../classes/EditUser.class.php" method="post">
<input type="hidden" value="<?php echo $id ?>" name="id" />
<input type="submit" value="Düzenle" name="edit">
</form>
</td>
<td>
<form action="../classes/DeleteUser.class.php" method="post">
<input type="hidden" value="<?php echo $id ?>" name="id" />
<input type="submit" value="Sil" name="delete">
</form>
</td>
</tr>
</thead>
</table>
<table>
</div>
<?php
if(isset($_SESSION['DeleteError'])){
echo "cannot delete user";
}
?>