Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit a87aee11 authored by 65160394's avatar 65160394
Browse files

Project Round 11

parent dd31de2c
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
<% if (session && session.userId) { %> <% if (session && session.userId) { %>
<a href="/edit/<%= tour.id %>" class="btn-edit">Edit</a> <!-- ปุ่มสำหรับแก้ไขทัวร์ --> <a href="/edit/<%= tour.id %>" class="btn-edit">Edit</a> <!-- ปุ่มสำหรับแก้ไขทัวร์ -->
<a href="/delete/<%= tour.id %>" class="btn-delete">Delete</a> <!-- ปุ่มสำหรับลบทัวร์ --> <form action="/tour/delete/<%= tour.id %>" method="POST" onsubmit="return confirmDelete()">
<button type="submit" class="btn-delete">Delete</button> <!-- ปุ่มสำหรับลบทัวร์ -->
</form>
<% } %> <% } %>
</li> </li>
<% }) %> <% }) %>
...@@ -46,5 +48,12 @@ ...@@ -46,5 +48,12 @@
<footer> <footer>
<p>&copy; 2025 Tour Website</p> <p>&copy; 2025 Tour Website</p>
</footer> </footer>
<script>
// ฟังก์ชันยืนยันการลบ
function confirmDelete() {
return confirm("คุณแน่ใจหรือไม่ว่าต้องการลบทัวร์นี้?");
}
</script>
</body> </body>
</html> </html>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<p><strong>ชื่อทัวร์:</strong> <%= tour.name %></p> <p><strong>ชื่อทัวร์:</strong> <%= tour.name %></p>
<p><strong>คำอธิบาย:</strong> <%= tour.description %></p> <p><strong>คำอธิบาย:</strong> <%= tour.description %></p>
<p><strong>ราคา:</strong> <%= tour.price %></p> <p><strong>ราคา:</strong> <%= tour.price %></p>
<p><strong>ระยะเวลา:</strong> <%= tour.duration %></p> <p><strong>ระยะเวลา:</strong> <%= tour.duration %> วัน</p>
<p><strong>บริษัท:</strong> <%= tour.cname %></p> <p><strong>บริษัท:</strong> <%= tour.cname %></p>
<a href="/" class="btn-edit">ย้อนกลับ</a> <a href="/" class="btn-edit">ย้อนกลับ</a>
</section> </section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment