s1
This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars($user['id']); ?></td>
|
||||
<td><?php echo htmlspecialchars($user['user_id']); ?></td>
|
||||
<td>
|
||||
<td class="badge-cell">
|
||||
<span class="badge <?php echo $user['type'] === 'admin' ? 'badge-primary' : 'badge-secondary'; ?>">
|
||||
<?php echo htmlspecialchars($user['type']); ?>
|
||||
</span>
|
||||
@@ -137,7 +137,12 @@
|
||||
<td><?php echo htmlspecialchars($user['user_phone']); ?></td>
|
||||
<td>
|
||||
<a href="edit_user?id=<?php echo $user['id']; ?>" class="btn btn-sm btn-warning">Edit</a>
|
||||
<a href="delete_user?id=<?php echo $user['id']; ?>" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure?')">Delete</a>
|
||||
<?php if($user['type'] !== 'admin') { ?>
|
||||
<a href="delete_user?id=<?php echo $user['id']; ?>" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure?')">Delete</a>
|
||||
<?php }else{ ?>
|
||||
<a disabled class="btn btn-sm btn-danger">Delete</a>
|
||||
<?php } ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
@@ -148,12 +153,6 @@
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php if ($_SESSION['type'] === 'admin'): ?>
|
||||
<div class="text-right mb-3">
|
||||
<a href="add_user.php" class="btn btn-primary">Add New User</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php $conn->close(); ?>
|
||||
@@ -165,6 +164,29 @@
|
||||
background: red;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.badge-cell {
|
||||
text-align: center; /* horizontally center */
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 0.35em 0.65em;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.badge-primary {
|
||||
background-color: #e95420 ; /* Blue */
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
background-color: #efb73e; /* Gray */
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user