<!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'); } $timeData = $_GET['time']; $typeData = $_GET['type']; if ($Database->isExistTime($ID, $LINE, $timeData, $typeData)) { $Database->deleteTime($ID, $LINE, $timeData, $typeData); } header("Location: timetable.php?stopid={$ID}&lineid={$LINE}", true, 303);