コード例 #1
0
<?php

if (!defined('isIncluded')) {
    header('location: index.php');
}
if (isset($_POST['submit'])) {
    $gebruiker_productlijst = Gebruiker_Productlijst::get($_GET['id']);
    if ($gebruiker_productlijst->delete()) {
        echo '<div class="notification_ok">De productlijst is succesvol ontkoppeld.</div>';
    } else {
        echo '<div class="notification_error">De productlijst kon niet worden ontkoppeld.</div>';
    }
} else {
    if ($_SESSION['GroepID'] == 4 && !empty($_GET['id'])) {
        $gebruiker_productlijst = Gebruiker_Productlijst::get($_GET['id']);
        if (!empty($gebruiker_productlijst)) {
            ?>
					<div class="notification_warning">
						Weet u zeker dat u de volgende productlijst wilt ontkoppelen van de volgende groothandel?
					</div>

					<table class="list">
						<tr>
							<th>#</th>
							<th>Groothandel</th>
							<th>Productlijst</th>
						</tr>

						<tr>
							<td><?php 
            echo $gebruiker_productlijst->getProperty('Gebruiker_ProductlijstID');