Exemple #1
0
<!DOCTYPE html>
<?php 
require_once '../db.php';
$Database = new DbUtil();
$userName = $Database->getUserName();
if ($userName == null) {
    header('Location: ../login.php', true, 303);
    exit;
}
$ID = $_GET['sid'];
$LINE = $_GET['lid'];
$stopData = $Database->getStop($ID);
$lineName = $Database->getLineName($LINE, $userName);
if ($lineName == null) {
    die('PERMISSION DENIED');
}
$Database->deleteLine($ID, $LINE);
header("Location: stopdata.php?id={$ID}", true, 303);