예제 #1
0
파일: regstopline.php 프로젝트: Amfys/BST
<!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['id'];
$LINE = $_GET['line'];
$stopData = $Database->getStop($ID);
$lineId = $Database->getLineId($LINE, $userName);
if ($lineId == null) {
    $Database->registerLine($LINE, $userName);
}
$lineId = $Database->getLineId($LINE, $userName);
$Database->registerLineToStop($ID, $lineId);
header("Location: stopdata.php?id={$ID}", true, 303);