no message
This commit is contained in:
51
public/employee_update.php
Normal file
51
public/employee_update.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>社員更新 - 社員メンテナンスシステム</title>
|
||||
<!-- Bootstrap 5 CDN -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- ナビバー -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="index.php">社員メンテナンスシステム</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container mt-4">
|
||||
<h1 class="mb-4">社員更新</h1>
|
||||
<!-- エラーメッセージ表示 -->
|
||||
<?php if (!empty($errorMessage)): ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo htmlspecialchars($errorMessage); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($employee) && $employee): ?>
|
||||
<form action="controller.php?action=update" method="post">
|
||||
<input type="hidden" name="id" value="<?php echo htmlspecialchars($employee['id']); ?>">
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">名前</label>
|
||||
<input type="text" id="name" name="name" class="form-control" value="<?php echo htmlspecialchars($employee['name']); ?>" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label">Email</label>
|
||||
<input type="email" id="email" name="email" class="form-control" value="<?php echo htmlspecialchars($employee['email']); ?>" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">更新</button>
|
||||
<a href="controller.php?action=list" class="btn btn-secondary">社員一覧に戻る</a>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<div class="alert alert-warning" role="alert">
|
||||
指定された社員が見つかりません。
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user