mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-05-29 23:03:12 +00:00
Group deleting
This commit is contained in:
parent
89bab971f3
commit
8ecd3f5921
2 changed files with 129 additions and 87 deletions
23
group.php
23
group.php
|
@ -61,7 +61,28 @@
|
|||
|
||||
if ($_GET['mode'] == "edit") {
|
||||
if ($_SESSION['id'] == $group['author'] || $user_info->is_admin($conn, $_SESSION['id'])) {
|
||||
echo "<button class='btn btn-bad'>Delete</button>";
|
||||
echo "<button id='deleteGroup' class='btn btn-bad'>Delete</button>";
|
||||
?>
|
||||
<script>
|
||||
$('#deleteGroup').click(function() {
|
||||
var header = "Are you surrrrrre?";
|
||||
var description = "The images will still be up, but all your hard work setting this group up will be gone!";
|
||||
var actionBox = "<form id='titleForm' method='POST'>\
|
||||
<button id='deleteSubmit' class='btn btn-bad' type='submit'><img class='svg' src='assets/icons/trash.svg'>Delete group</button>\
|
||||
</form>";
|
||||
flyoutShow(header, description, actionBox);
|
||||
|
||||
$("#titleForm").submit(function(event) {
|
||||
event.preventDefault();
|
||||
var deleteSubmit = $("#deleteSubmit").val();
|
||||
$("#sniffle").load("app/image/group.php", {
|
||||
group_id: <?php echo $_GET['id']; ?>,
|
||||
group_delete: deleteSubmit
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
||||
echo "<button id='editTitle' class='btn btn-bad'>Update title</button>";
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue