- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
54 lines
1.5 KiB
PHP
54 lines
1.5 KiB
PHP
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/instock/commonRequest.php'; // 구글드라이브 세션 파일 포함
|
|
$title_message = '수입검사 성적서';
|
|
$tablename = 'instock';
|
|
$item = $title_message;
|
|
include $_SERVER['DOCUMENT_ROOT'] . '/load_header.php';
|
|
|
|
?>
|
|
<title> <?=$title_message?> </title>
|
|
<link rel="stylesheet" href="css/style.css">
|
|
<link rel="stylesheet" href="css/style_inspection.css">
|
|
</head>
|
|
<body>
|
|
|
|
<?php
|
|
// JavaScript에서 전달된 변수들 받기
|
|
$num = isset($_REQUEST['num']) ? $_REQUEST['num'] : '';
|
|
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . "/lib/mydb.php");
|
|
|
|
$pdo = db_connect();
|
|
try {
|
|
$sql = "select * from {$DB}.{$tablename} where num = ? ";
|
|
$stmh = $pdo->prepare($sql);
|
|
$stmh->bindValue(1, $num, PDO::PARAM_STR);
|
|
$stmh->execute();
|
|
$count = $stmh->rowCount();
|
|
|
|
$row = $stmh->fetch(PDO::FETCH_ASSOC);
|
|
include "_row.php";
|
|
|
|
} catch (PDOException $Exception) {
|
|
print "오류: " . $Exception->getMessage();
|
|
}
|
|
|
|
$iList = isset($iList) ? json_decode($iList, true) : [];
|
|
|
|
$orderman = $user_name;
|
|
$todayStr = date("m/d");
|
|
|
|
$indateStr = date("m/d", strtotime($inspection_date));
|
|
|
|
// JSON 데이터를 JavaScript 변수로 변환
|
|
echo "<script>";
|
|
echo "var iListData = " . json_encode($iList) . ";" ;
|
|
echo "</script>";
|
|
|
|
$item_name = isset($row['item_name']) ? $row['item_name'] : '';
|
|
$item_name = str_replace(' ', '', $item_name); // 모든 공백 제거
|
|
|
|
$spec = isset($row['specification']) ? $row['specification'] : '';
|
|
$spec = str_replace(' ', '', $spec); // 모든 공백 제거
|
|
|
|
|
|
?>
|