<?php

require_once "inc/models/sound-groups.php";
$soundGroupArray = SoundGroups::selectAll();
if (!isset($msgObject["msg"])) {
    $msgObject["msg"] = '';
}
$again = false;
$view = 'sound-groups-show';
$_SESSION['activeTrail'] = 'objects';
<?php

require_once "inc/models/sound-groups.php";
$action = 'sound-group-create-prepare';
$again = true;
$path = '';
if (isset($_POST['abort'])) {
    $action = 'sound-groups-show-prepare';
} else {
    if (isset($_POST['name']) && $_POST['name'] != '') {
        $name = $_POST['name'];
        $soundGroupObject = new SoundGroups($name);
        $soundGroupObject->insert();
        $action = 'sound-groups-show-prepare';
    } else {
        $action = 'sound-groups-create-prepare';
        $msgObject = array("type" => "danger", "msg" => "Soundgruppe konnte nicht angelegt werden.");
    }
}
<?php 
require_once "inc/models/sound-groups.php";
$action = 'sound-groups-show-prepare';
$again = true;
if (isset($_GET['id'])) {
    if ($_POST['yes']) {
        $id = $_GET['id'];
        SoundGroups::deleteById($id);
    }
}
<?php

require_once "inc/models/sound-groups.php";
if (isset($_GET['id'])) {
    $id = $_GET['id'];
    $soundGroup = SoundGroups::selectById($id);
}
$again = false;
$view = 'sound-group-delete';