168 lines
5.2 KiB
PHP
168 lines
5.2 KiB
PHP
<?php
|
||
/**
|
||
* トップページ
|
||
*
|
||
* 商品管理システムのメインページです。
|
||
*/
|
||
?>
|
||
|
||
<!DOCTYPE html>
|
||
<html lang="ja">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>商品管理システム - PHP・DB連携演習</title>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
body {
|
||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
min-height: 100vh;
|
||
padding: 20px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
.container {
|
||
max-width: 900px;
|
||
width: 100%;
|
||
background: white;
|
||
padding: 40px;
|
||
border-radius: 15px;
|
||
box-shadow: 0 15px 35px rgba(0,0,0,0.3);
|
||
}
|
||
h1 {
|
||
color: #333;
|
||
margin-bottom: 15px;
|
||
font-size: 32px;
|
||
text-align: center;
|
||
}
|
||
.subtitle {
|
||
color: #666;
|
||
margin-bottom: 40px;
|
||
font-size: 16px;
|
||
text-align: center;
|
||
}
|
||
.menu-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||
gap: 20px;
|
||
margin-bottom: 30px;
|
||
}
|
||
.menu-card {
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
padding: 30px;
|
||
border-radius: 10px;
|
||
text-align: center;
|
||
transition: transform 0.3s, box-shadow 0.3s;
|
||
cursor: pointer;
|
||
text-decoration: none;
|
||
color: white;
|
||
}
|
||
.menu-card:hover {
|
||
transform: translateY(-5px);
|
||
box-shadow: 0 10px 20px rgba(0,0,0,0.2);
|
||
}
|
||
.menu-card .icon {
|
||
font-size: 48px;
|
||
margin-bottom: 15px;
|
||
}
|
||
.menu-card h2 {
|
||
font-size: 20px;
|
||
margin-bottom: 10px;
|
||
}
|
||
.menu-card p {
|
||
font-size: 14px;
|
||
opacity: 0.9;
|
||
}
|
||
.advanced-section {
|
||
margin-top: 40px;
|
||
padding-top: 30px;
|
||
border-top: 2px solid #eee;
|
||
}
|
||
.advanced-section h3 {
|
||
color: #333;
|
||
margin-bottom: 20px;
|
||
text-align: center;
|
||
}
|
||
.advanced-card {
|
||
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
|
||
}
|
||
.info-box {
|
||
background: #e7f3ff;
|
||
border-left: 4px solid #2196F3;
|
||
padding: 20px;
|
||
margin-top: 30px;
|
||
border-radius: 5px;
|
||
}
|
||
.info-box h3 {
|
||
color: #1976D2;
|
||
margin-bottom: 10px;
|
||
font-size: 18px;
|
||
}
|
||
.info-box p {
|
||
color: #555;
|
||
line-height: 1.8;
|
||
font-size: 14px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<h1>🏪 商品管理システム</h1>
|
||
<p class="subtitle">PHP・DB連携 総合演習課題</p>
|
||
|
||
<div class="menu-grid">
|
||
<a href="product_list.php" class="menu-card">
|
||
<div class="icon">📋</div>
|
||
<h2>商品一覧</h2>
|
||
<p>登録されている商品を表示<br>(実装済み・参考用)</p>
|
||
</a>
|
||
|
||
<a href="product_register.php" class="menu-card">
|
||
<div class="icon">📝</div>
|
||
<h2>商品登録</h2>
|
||
<p>新しい商品を登録する<br>(ステップ2)</p>
|
||
</a>
|
||
|
||
<a href="product_update.php" class="menu-card">
|
||
<div class="icon">✏️</div>
|
||
<h2>商品更新</h2>
|
||
<p>既存の商品情報を更新<br>(ステップ3)</p>
|
||
</a>
|
||
|
||
<a href="product_delete.php" class="menu-card">
|
||
<div class="icon">🗑️</div>
|
||
<h2>商品削除</h2>
|
||
<p>商品を削除する<br>(ステップ4)</p>
|
||
</a>
|
||
</div>
|
||
|
||
<div class="advanced-section">
|
||
<h3>🎓 追加課題</h3>
|
||
<div class="menu-grid">
|
||
<a href="product_join.php" class="menu-card advanced-card">
|
||
<div class="icon">🔗</div>
|
||
<h2>JOIN検索</h2>
|
||
<p>複数テーブルを結合した<br>高度な検索機能</p>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="info-box">
|
||
<h3>📚 学習の進め方</h3>
|
||
<p>
|
||
<strong>1.</strong> まず「商品一覧」のコードを読んで理解しましょう<br>
|
||
<strong>2.</strong> 「商品登録」→「商品更新」→「商品削除」の順に実装しましょう<br>
|
||
<strong>3.</strong> 基本課題が完了したら「JOIN検索」に挑戦しましょう<br>
|
||
<strong>4.</strong> 各ファイルのTODOコメントを参考に実装してください
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|